Download both the collection and the environment file to begin making requests.
Collection File
In Postman select "Import" and choose the "Raw Text" tab. Copy the contents from below and hit continue.
{
"info": {
"_postman_id": "533034b0-c379-4212-93ec-7c1cd0548573",
"name": "Reach Drop-In (For Merchants)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Session API",
"item": [
{
"name": "Create",
"item": [
{
"name": "Create Session - Full Request",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{$randomUUID}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 12.00,\n \"Quantity\": 2\n }\n ],\n \"BillingProfile\": {\n \"BillingProfileReference\": \"MerchantSupplied-reference\",\n \"Name\": \"First Last\",\n \"Email\": \"[email protected]\",\n \"Birthdate\": \"1980-01-02\",\n \"Company\": \"Umbrella corp\",\n \"NationalIdentifier\": \"43.236.560/0001-52\",\n \"Address\": {\n \"Street\": \"123 Sreet\",\n \"City\": \"City\",\n \"Region\": \"SC\",\n \"Country\": \"BR\",\n \"Postcode\": \"12345678\",\n \"Phone\": \"4031234567\"\n }\n },\n \"ShippingDetails\": {\n \"ShippingAmount\": 0.00,\n \"DutyAmount\": 0.00,\n \"Name\": \"First Last\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Sreet\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"Discounts\": [\n {\n \"Name\": \"Discount 1\",\n \"Amount\": 2.00\n },\n {\n \"Name\": \"Discount 2\",\n \"Amount\": 3.00\n }\n ],\n \"TaxAmount\": 1.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.send-user-here-after-success-redirect.com\",\n \"CancelUrl\": \"https://www.send-user-here-after-failed-redirect.com\",\n \"ViaAgent\": false\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session"
]
},
"description": "This request is using all the fields.\n\nA random UUID is generated for the MerchantReference so we can guarantee uniqueness. A merchant can use whatever unique value they want in this field."
},
"response": []
},
{
"name": "Create Session - Minimal Request",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{$randomUUID}}\",\n \"Currency\": \"GBP\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n }\n ],\n \"BillingProfile\": {\n \"Name\": \"First Last\",\n \"Email\": \"[email protected]\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Country\": \"GB\",\n \"Phone\": \"4031234567\"\n }\n },\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.send-user-here-after-success-redirect.com\",\n \"CancelUrl\": \"https://www.send-user-here-after-failed-redirect.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session"
]
},
"description": "This request is using the minimum number fields needed.\n\nA random UUID is generated for the MerchantReference so we can guarantee uniqueness. A merchant can use whatever unique value they want in this field."
},
"response": []
},
{
"name": "Create Session - Using BillingProfileId",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{$randomUUID}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 18.99,\n \"Quantity\": 2\n },\n {\n \"Name\": \"Item 3\",\n \"Amount\": 2.50,\n \"Quantity\": 1\n }\n ],\n \"BillingProfileId\": \"{{billing_profile_id}}\",\n \"ShippingDetails\": {\n \"ShippingAmount\": 20.00,\n \"DutyAmount\": 1.11,\n \"Name\": \"First Name\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"TaxAmount\": 5.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.google.com\",\n \"CancelUrl\": \"https://www.google.com\",\n \"ViaAgent\": false\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session"
]
},
"description": "This request is using a BillingProfileId instead of passing a new BillingProfile object. A Session would have been created using a BillingProfile object before this request and the BillingProfileId from that response would be used in this request.\n\nA random UUID is generated for the MerchantReference so we can guarantee uniqueness. A merchant can use whatever unique value they want in this field."
},
"response": []
},
{
"name": "Create Session - Using BillingProfileReference",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{$randomUUID}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 18.99,\n \"Quantity\": 2\n },\n {\n \"Name\": \"Item 3\",\n \"Amount\": 2.50,\n \"Quantity\": 1\n }\n ],\n \"BillingProfileReference\": \"{{billing_profile_reference}}\",\n \"ShippingDetails\": {\n \"ShippingAmount\": 20.00,\n \"DutyAmount\": 1.11,\n \"Name\": \"First Name\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"TaxAmount\": 5.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.google.com\",\n \"CancelUrl\": \"https://www.google.com\",\n \"ViaAgent\": false\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session"
]
},
"description": "This request is using a BillingProfileReference instead of passing a new BillingProfile object. A Session would have been created using a BillingProfile object before this request and the BillingProfileReference from that response would be used in this request.\n\nA random UUID is generated for the MerchantReference so we can guarantee uniqueness. A merchant can use whatever unique value they want in this field."
},
"response": []
}
]
},
{
"name": "Update",
"item": [
{
"name": "Update Session",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{merchant_reference}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 18.99,\n \"Quantity\": 2\n }\n ],\n \"BillingProfile\": {\n \"BillingProfileReference\": \"{{$randomUUID}}\",\n \"Name\": \"First Last\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031234567\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"ShippingDetails\": {\n \"ShippingAmount\": 20.00,\n \"DutyAmount\": 1.11,\n \"Name\": \"First Name\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"TaxAmount\": 5.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.google.com\",\n \"CancelUrl\": \"https://www.google.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session/{{session_id}}",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session",
"{{session_id}}"
]
}
},
"response": []
},
{
"name": "Update Session - BillingProfileId",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{merchant_reference}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 18.99,\n \"Quantity\": 2\n }\n ],\n \"BillingProfileId\": \"{{billing_profile_id}}\",\n \"ShippingDetails\": {\n \"ShippingAmount\": 20.00,\n \"DutyAmount\": 1.11,\n \"Name\": \"First Name\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"TaxAmount\": 5.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.google.com\",\n \"CancelUrl\": \"https://www.google.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session/{{session_id}}",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session",
"{{session_id}}"
]
}
},
"response": []
},
{
"name": "Update Session - BillingProfileReference",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.SessionId != null) {",
" postman.setEnvironmentVariable(\"session_id\", jsonData.SessionId);",
"}",
"if(jsonData.MerchantReference != null) {",
" postman.setEnvironmentVariable(\"merchant_reference\", jsonData.MerchantReference)",
"}",
"if(jsonData.BillingProfile != null) {",
" if(jsonData.BillingProfile.BillingProfileReference != null) {",
" postman.setEnvironmentVariable(\"billing_profile_reference\", jsonData.BillingProfile.BillingProfileReference)",
" }",
" if(jsonData.BillingProfile.BillingProfileId != null) {",
" postman.setEnvironmentVariable(\"billing_profile_id\", jsonData.BillingProfile.BillingProfileId)",
" }",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"MerchantReference\": \"{{merchant_reference}}\",\n \"Currency\": \"CAD\",\n \"Items\": [\n {\n \"Name\": \"Item 1\",\n \"Amount\": 10.00,\n \"Quantity\": 1\n },\n {\n \"Name\": \"Item 2\",\n \"Amount\": 18.99,\n \"Quantity\": 2\n }\n ],\n \"BillingProfileReference\": \"{{billing_profile_reference}}\",\n \"ShippingDetails\": {\n \"ShippingAmount\": 20.00,\n \"DutyAmount\": 1.11,\n \"Name\": \"First Name\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"4031231234\",\n \"Address\": {\n \"Street\": \"123 Street\",\n \"City\": \"City\",\n \"Region\": \"AB\",\n \"Country\": \"CA\",\n \"Postcode\": \"X0X0X0\"\n }\n },\n \"TaxAmount\": 5.00,\n \"AutoCapture\": true,\n \"CompleteUrl\": \"https://www.google.com\",\n \"CancelUrl\": \"https://www.google.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{env_url}}/v1/session/{{session_id}}",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session",
"{{session_id}}"
]
}
},
"response": []
}
]
},
{
"name": "Retrieve Session",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.Order != null) {",
" postman.setEnvironmentVariable(\"order_id\", jsonData.Order.OrderId); ",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{env_url}}/v1/session/{{session_id}}",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session",
"{{session_id}}"
]
}
},
"response": []
},
{
"name": "Cancel Session",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{env_url}}/v1/session/{{session_id}}/cancel",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"session",
"{{session_id}}",
"cancel"
]
}
},
"response": []
}
]
},
{
"name": "Order API",
"item": [
{
"name": "Retrieve Order",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{env_url}}/v1/order/{{order_id}}",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"order",
"{{order_id}}"
]
}
},
"response": []
},
{
"name": "Capture Order",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{env_url}}/v1/order/{{order_id}}/capture",
"host": [
"{{env_url}}"
],
"path": [
"v1",
"order",
"{{order_id}}",
"capture"
]
}
},
"response": []
}
]
}
],
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{api-password}}",
"type": "string"
},
{
"key": "username",
"value": "{{api-username}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
Environment File
In Postman select "Import" and choose the "Raw Text" tab. Copy the contents from below and hit continue.
Be sure to put your credentials within the environment once it is imported (replace the values PUT_API_USERNAME_HERE
and PUT_API_PASSWORD_HERE
).
{
"id": "eafe3372-4a83-47a5-b8b3-18e7688e0535",
"name": "Reach Drop-In (For merchant)",
"values": [
{
"key": "api-username",
"value": "PUT_API_USERNAME_HERE",
"enabled": true
},
{
"key": "api-password",
"value": "PUT_API_PASSWORD_HERE",
"enabled": true
},
{
"key": "env_url",
"value": "https://api.sandbox.withreach.com",
"enabled": true
},
{
"key": "session_id",
"value": "",
"enabled": true
},
{
"key": "merchant_reference",
"value": "",
"enabled": true
},
{
"key": "billing_profile_reference",
"value": "",
"enabled": true
},
{
"key": "billing_profile_id",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2022-05-07T03:18:38.192Z",
"_postman_exported_using": "Postman/8.12.5"
}