Learn how to set up a Postman collection for the Checkout API
Use the Reach Checkout API Postman collection to send test requests to the Checkout API from Postman. You can look up information, such as FX rates and payment methods, and create, capture, cancel, and refund test orders.
The Checkout API needs a signature on each POST request. The collection calculates the signatures for you; you only need to change the request details.
Import the Reach Checkout API collection
First, import the Postman collection file in JSON format by completing the following steps:
-
Download the JSON file. Click the button to open the file in Google Drive.
- In Postman, click Use resources or import, then select Import.
- In the Use Resources window in Postman, click files under the Drop anywhere to import section.
- Select the Checkout API collection file from your computer.
Import the Reach environments
Second, import the Reach environments. There are two environment files. Use the Reach Sandbox environment to test, and the Reach Production environment to send requests to your live account.
Each file contains your API username and password, as well as the URLs used by the requests in the collection.
Test with the Reach Sandbox environment first. Requests sent with the Reach Production environment go to your live Reach account.
-
Download the Sandbox environment file by clicking the button to open the file in Google Drive.
- In Postman, click Use resources or import, then select Import.
- In the Use Resources window, click files under the Drop anywhere to import section.
- Select the file from your computer.
- Replace
<your-username>and<your-password>with the API username and password for that environment from your Reach representative. The collection doesn't use the other placeholders, so you can leave them as they are. -
Repeat steps 1-4 to import the Production environment file.
Alternatively, you can copy and paste the file directly from this page into the Import text field on the Use Resources window in Postman.
Reach environment collection files
{
"id": "25179582-0482-4884-b90f-9b0ffaa58a01",
"name": "Reach Sandbox",
"values": [
{
"key": "checkoutBaseUrl",
"value": "https://checkout.rch.how/v2.22",
"type": "default",
"enabled": true
},
{
"key": "apiBaseUrl",
"value": "https://api.sandbox.withreach.com",
"type": "default",
"enabled": true
},
{
"key": "merchantId",
"value": "<your-merchant-id>",
"type": "default",
"enabled": true
},
{
"key": "merchantSecret",
"value": "<your-hmac-secret>",
"type": "secret",
"enabled": true
},
{
"key": "businessPartner",
"value": "<your-business-partner>",
"type": "default",
"enabled": true
},
{
"key": "username",
"value": "<your-username>",
"type": "default",
"enabled": true
},
{
"key": "password",
"value": "<your-password>",
"type": "secret",
"enabled": true
},
{
"key": "payload",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "payloadSignature",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "cardDetails",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "deviceFingerprint",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "merchantReference",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "sessionId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "orderId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "refundId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "quoteId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "billingProfileId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "billingProfileReference",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "pspTransactionId",
"value": "",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_using": "Reach API collections"
}{
"id": "96544eef-8987-4a93-ad1f-dc8a989311d4",
"name": "Reach Production",
"values": [
{
"key": "checkoutBaseUrl",
"value": "https://checkout.rch.io/v2.22",
"type": "default",
"enabled": true
},
{
"key": "apiBaseUrl",
"value": "https://api.withreach.com",
"type": "default",
"enabled": true
},
{
"key": "merchantId",
"value": "<your-merchant-id>",
"type": "default",
"enabled": true
},
{
"key": "merchantSecret",
"value": "<your-hmac-secret>",
"type": "secret",
"enabled": true
},
{
"key": "businessPartner",
"value": "<your-business-partner>",
"type": "default",
"enabled": true
},
{
"key": "username",
"value": "<your-username>",
"type": "default",
"enabled": true
},
{
"key": "password",
"value": "<your-password>",
"type": "secret",
"enabled": true
},
{
"key": "payload",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "payloadSignature",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "cardDetails",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "deviceFingerprint",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "merchantReference",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "sessionId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "orderId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "refundId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "quoteId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "billingProfileId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "billingProfileReference",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "pspTransactionId",
"value": "",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_using": "Reach API collections"
}Send a request
The collection has 17 requests:
- 7 GET requests look up information, such as FX rates, payment methods, and card details. They don't need a signature.
- 10 POST requests create and manage orders, refunds, contracts and reports. Each one has a pre-request script that signs the request with your
merchantSecret.
To change what a POST request sends, edit the payload values at the top of its pre-request script. Don't edit the body: the script fills it in for you. The sample card is the Visa test card 4111 1111 1111 1111. For other sandbox test cards, contact Reach Support at [email protected].
Checkout, Checkout - Authorize Only, and Checkout - UPI save the order's ID to orderId. Capture, Query, Cancel, Modify, and Refund use it.
POST responses are URL-encoded, in the form response=...&signature=....
Before you send, check the following:
- Get Rate: replace
REPLACE_WITH_RATE_OFFER_IDwith anIdfrom the Get Rates response. - List Reports: set
businessPartnerin the Reach Sandbox environment to your Settlement BP from the Reach Admin Portal.
