This guide is for merchant developers integrating Resolve into their e-commerce site. The goal is for your business to offer Resolve as a payment option to your customers as quickly and easily as possible. After integrating Resolve, your site will:
- Offer Resolve as payment option on the checkout page
- Process Resolve authorizations in your order management system
- Load Resolve's credit application on your website
- Request a sandbox account
- Add Resolve.js to your website
- Add Resolve credit terms application on your website
- Initiate a checkout
- Capture the authorization to receive funds
- Test your integration
- Deploy to production
Develop and test the Resolve integration in your development environment connected to our sandbox. To get started, reach out to your Resolve account manager to request sandbox API credentials.
Go to https://app-sandbox.resolvepay.com/<your_merchant_id> and submit a test customer application. Resolve will approve your sandbox buyer account for testing purposes.
Add the Resolve.js embed code to the head of your global page template.
<script src="//app.resolvepay.com/js/resolve.js"></script>Before a customer can pay with credit terms, they must have applied and been approved for a Resolve account. You'll want to allow customers to apply directly from your website.
Common placement locations include:
- home page via a banner
- product detailed page
- dedicated financing landing page
- wholesale, large orders, or commercial/trade program landing page
- checkout page
After adding the Resolve.js embed code, you'll use the following command to open the credit application. If you prefer to redirect to Resolve's hosted application page rather than open a modal on your website, then set modal: false.
resolve.application({
sandbox: true, // Do not include this line if implementing in production environment
modal: true,
merchant: {
id: 'MERCHANT_ID',
},
});When a customer is ready to pay with credit terms, you should launch the Resolve checkout. Typically, Resolve will add as another payment method in your checkout flow.
The following command does the following:
- Sends the checkout object to our checkout API
- Redirects the customer to the Resolve checkout process on the resolvepay.com domain or shows them a Resolve modal
- Validates the required data in the checkout object
resolve.checkout({
sandbox: true,
modal: true,
merchant: {
id: 'MERCHANT_ID',
success_url: 'https://www.merchantsite.com/confirm',
cancel_url: 'https://www.merchantsite.com/cancel',
},
customer: {
first_name: 'First',
last_name: 'Last',
name: 'First Last',
phone: '',
email: '',
},
shipping: {
name: 'First Last',
company_name: 'Company Name',
phone: '4153334567',
address_line1: '633 Folsom St',
address_line2: 'FL 7',
address_city: 'San Francisco',
address_state: 'CA',
address_postal: '94017',
address_country: 'US',
},
billing: {
name: '',
company_name: '',
phone: '',
address_line1: '',
address_line2: '',
address_city: '',
address_state: '',
address_postal: '',
address_country: '',
},
items: [{
name: 'Product Name',
sku: 'ABC-123',
unit_price: 19.99,
quantity: 3,
}],
order_number: 'ORDER_NUMBER',
po_number: '',
shipping_amount: 10.00,
tax_amount: 5.00,
total_amount: 74.97,
metadata: {
platform_resolve: '1.0.0',
platform_type: 'checkout-sdk',
platform_version: '1.0.0',
},
});Set modal: false for a full-page checkout instead of a modal window.
Resolve Checkout SDK supports two post-checkout authorization models:
chargemodel: checkout returns acharge_id, and the merchant captures the authorization with the Charges API.ordermodel: checkout returns anorder_id, and the merchant manages the authorization with the Orders API, including partial or multiple captures.
To use the Checkout SDK order model, your merchant must opt in to Checkout - Order Authorization.
When this setting is enabled, successful Checkout SDK completions return an order_id, and the merchant manages that authorization through the order object.
When this setting is not enabled, successful Checkout SDK completions return a charge_id, and the merchant manages that authorization through the charge object.
Resolve supports both authorization models, but each Checkout SDK completion follows the model configured for that merchant.
After a successful checkout, Resolve creates an authorization. Depending on your merchant configuration and selected model, that authorization may be represented as either a charge or an order.
The customer is redirected to your success_url with one of the following query parameters appended:
https://www.merchantsite.com/confirm?charge_id=czTrT9opfkBaYZNhor
https://www.merchantsite.com/confirm?order_id=ORDlaE5wbg0On your success page:
- Redirect the customer to the order confirmation page or display an order confirmation message.
- Store the returned identifier in your order management system:
charge_idif you are using the charge modelorder_idif you are using the order model
- Mark the order payment as pending.
For immediate fulfillment, capture the authorization right away. Otherwise, consult your account manager about capture timing best practices.
For invoices in the "Pay Now" flow, see the Checkout SDK Invoice Flows guide. For a detailed operational guide to the charge model after checkout, see Charge Management. For a detailed operational guide to the order model after checkout, see Checkout SDK Order Management.
If the customer cancels the checkout, they will be redirected back to cancel_url. Typically, this page is the payment method selection page in the checkout flow.
If the customer never reaches the success page, assume the payment failed and do not fulfill the order.
To receive funds and start the Net 30-60-90 clock for the customer, you will need to capture the authorization after fulfillment.
You can do this in one of two ways:
Use the charge_id returned by checkout.
| Environment | Endpoint |
|---|---|
| Production | POST https://app.resolvepay.com/api/charges/<charge_id>/capture |
| Sandbox | POST https://app-sandbox.resolvepay.com/api/charges/<charge_id>/capture |
Use the order_id returned by checkout.
| Environment | Endpoint |
|---|---|
| Production | POST https://app.resolvepay.com/api/orders/<order_id>/capture |
| Sandbox | POST https://app-sandbox.resolvepay.com/api/orders/<order_id>/capture |
The order model supports partial capture and multiple captures against a single authorization. Each capture creates its own invoice and charge under the order.
For legacy integrations, see the v2 API documentation.
Use either HTTP Basic Auth (merchant_id + secret_key) or Bearer token auth.
For request/response schemas and live examples, see the Merchant API reference:
After completing your integration, do a thorough testing of both your front-end and back-end integration in our sandbox to ensure that both the user experience and your order management system work as expected.
Before deploying the Resolve integration to your production site, Resolve will need to test it in your development or staging environment connected to our live environment.
For production credential setup and authentication configuration, see the Direct API Access and Authentication guide.
Remove any { sandbox: true } options from your application and checkout code to use our live environment.