Skip to content

Instantly share code, notes, and snippets.

@charles-lehman
Created August 28, 2025 16:00
Show Gist options
  • Select an option

  • Save charles-lehman/000b6347045f40b39b1221f4b11db602 to your computer and use it in GitHub Desktop.

Select an option

Save charles-lehman/000b6347045f40b39b1221f4b11db602 to your computer and use it in GitHub Desktop.
SynchPay Postman Collection - 2025.08.28
{
"info": {
"_postman_id": "e0f0798d-fc22-410d-b90e-1f61147ca415",
"name": "SynchApi",
"description": "See [https://apidocs.synchpay.dev/](https://apidocs.synchpay.dev/) for the most current documentation.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "37644456"
},
"item": [
{
"name": "No Registration Flow",
"item": [
{
"name": "0. Authorization",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let accessToken = _.get(jsonData, 'accessToken');\r",
"pm.environment.set('accessToken', accessToken);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"ClientId\": \"69eba71f-c047-4243-b0d8-2a617474af45\",\r\n \"ClientSecret\": \"very-strong-password-42\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/auth/token",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"auth",
"token"
]
}
},
"response": []
},
{
"name": "1. Company External Auth Link",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"MobileNumber\": \"+48123456789\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/company/{{companyId}}/externalauthlink",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"company",
"{{companyId}}",
"externalauthlink"
]
}
},
"response": []
},
{
"name": "2. Create Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n// \"RegistrationId\": \"{{registrationId}}\",\r\n \"ContactNumber\": \"+48123456789\",\r\n \"EmailAddress\": \"email@example.com\",\r\n \"CompanyId\": \"{{companyId}}\",\r\n \"Amount\": 200, // USD in cents (200 => $2.00)\r\n \"DueDate\": \"2025-07-25\",\r\n \"FeePayer\": \"partner\"\r\n// \"EnableDebitAuth\": true,\r\n// \"DebitAuthLimit\": 10000,\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/payment/create",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"payment",
"create"
]
}
},
"response": []
}
]
},
{
"name": "User Registration Flow",
"item": [
{
"name": "0. Authorization",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let accessToken = _.get(jsonData, 'accessToken');\r",
"pm.environment.set('accessToken', accessToken);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"ClientId\": \"{{clientId}}\",\r\n \"ClientSecret\": \"{{clientSecret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/auth/token",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"auth",
"token"
]
}
},
"response": []
},
{
"name": "1. Company External Auth Link",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"MobileNumber\": \"+48123456789\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/company/{{companyId}}/externalauthlink",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"company",
"{{companyId}}",
"externalauthlink"
]
}
},
"response": []
},
{
"name": "2. Register User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let registrationId = _.get(jsonData, 'registrationId');\r",
"if(registrationId){\r",
" pm.environment.set('registrationId', registrationId);\r",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"RedirectUrl\": \"https://synchpay.com\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/user/register",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"register"
]
}
},
"response": []
},
{
"name": "3. User Status",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{base_url}}/user/{{registrationId}}/status",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"{{registrationId}}",
"status"
]
}
},
"response": []
},
{
"name": "4. Create Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n// \"RegistrationId\": \"{{registrationId}}\",\r\n \"ContactNumber\": \"+16463549133\",\r\n \"EmailAddress\": \"email@example.com\",\r\n \"CompanyId\": \"{{companyId}}\",\r\n \"Amount\": 200, // USD in cents (200 => $2.00)\r\n \"DueDate\": \"2025-07-25\",\r\n \"FeePayer\": \"partner\"\r\n// \"EnableDebitAuth\": true,\r\n// \"DebitAuthLimit\": 10000,\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/payment/create",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"payment",
"create"
]
}
},
"response": []
}
]
},
{
"name": "Multi Company Flow",
"item": [
{
"name": "0. Authorization",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let accessToken = _.get(jsonData, 'accessToken');\r",
"pm.environment.set('accessToken', accessToken);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"ClientId\": \"{{clientId}}\",\r\n \"ClientSecret\": \"{{clientSecret}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/auth/token",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"auth",
"token"
]
}
},
"response": []
},
{
"name": "1. Create Company",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let companyId = _.get(jsonData, 'companyId');\r",
"if(companyId){\r",
" pm.environment.set('companyId', companyId);\r",
"}\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"Name\": \"Example Company2\",\r\n \"EmailAddress\": \"contact@example.com\",\r\n \"ContactNumber\": \"+12025555555\",\r\n \"TaxId\": \"123456789\",\r\n \"CompanyReferenceId\": \"test-31347\",\r\n \"TaxIdType\": \"EIN\",\r\n \"Owner\": {\r\n \"Name\": \"John Doe\",\r\n \"EmailAddress\": \"john.doe@example.com\",\r\n \"ContactNumber\": \"+12025555555\",\r\n \"Title\": \"Owner\",\r\n \"DocumentNumber\": \"D1234567\",\r\n \"DocumentType\": \"DriversLicense\"\r\n },\r\n \"Employees\": [],\r\n \"StreetNumberAndName\": \"123 Fitness St\",\r\n \"ApartmentNumber\": \"Suite 100\",\r\n \"City\": \"Fitville\",\r\n \"State\": \"CA\",\r\n \"ZipCode\": \"90001\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/company/create",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"company",
"create"
]
}
},
"response": []
},
{
"name": "2. Company Status",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{base_url}}/company/{{companyId}}/status",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"company",
"{{companyId}}",
"status"
]
}
},
"response": []
},
{
"name": "3. Company External Auth Link",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"MobileNumber\": \"+48123456789\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/company/{{companyId}}/externalauthlink",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"company",
"{{companyId}}",
"externalauthlink"
]
}
},
"response": []
},
{
"name": "4. Register User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"let registrationId = _.get(jsonData, 'registrationId');\r",
"if(registrationId){\r",
" pm.environment.set('registrationId', registrationId);\r",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"RedirectUrl\": \"https://synchpay.com\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/user/register",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"register"
]
}
},
"response": []
},
{
"name": "5. User Status",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{base_url}}/user/{{registrationId}}/status",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"{{registrationId}}",
"status"
]
}
},
"response": []
},
{
"name": "6. Create Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n// \"RegistrationId\": \"{{registrationId}}\",\r\n \"ContactNumber\": \"+48123456789\",\r\n \"EmailAddress\": \"email@example.com\",\r\n \"CompanyId\": \"{{companyId}}\",\r\n \"Amount\": 200, // USD in cents (200 => $2.00)\r\n \"DueDate\": \"2025-07-25\",\r\n \"FeePayer\": \"partner\"\r\n// \"EnableDebitAuth\": true,\r\n// \"DebitAuthLimit\": 10000,\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/payment/create",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"payment",
"create"
]
}
},
"response": []
}
]
},
{
"name": "Debit Auth",
"item": [
{
"name": "Create User DebitAuth",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"CompanyId\": \"{{companyId}}\",\r\n \"Enabled\": true,\r\n \"Limit\": 1000 // USD in cents (1000 => $10.00)\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/user/{{registrationId}}/debitauth",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"{{registrationId}}",
"debitauth"
]
}
},
"response": []
},
{
"name": "Get User DebitAuth",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{base_url}}/user/{{registrationId}}/debitauth?companyId={{companyId}}",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"user",
"{{registrationId}}",
"debitauth"
],
"query": [
{
"key": "companyId",
"value": "{{companyId}}"
}
]
}
},
"response": []
}
]
},
{
"name": "Other",
"item": [
{
"name": "Transactions Report",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{base_url}}/transaction/report?from=2025-07-12&companyId={{companyId}}",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"transaction",
"report"
],
"query": [
{
"key": "cursor",
"value": "MjAyNS0wMy0xMlQxNzoxMToxOS4zOTUwMTQwWg==",
"disabled": true
},
{
"key": "status",
"value": "Pending",
"disabled": true
},
{
"key": "from",
"value": "2025-07-12"
},
{
"key": "to",
"value": "2025-12-31",
"disabled": true
},
{
"key": "companyId",
"value": "{{companyId}}"
}
]
}
},
"response": []
},
{
"name": "Refund Payment",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"amount\": 199,\r\n \"description\": \"test\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://{{base_url}}/payment/refund/1ce70842-a11e-40c9-8c03-c98c4ddae712",
"protocol": "https",
"host": [
"{{base_url}}"
],
"path": [
"payment",
"refund",
"1ce70842-a11e-40c9-8c03-c98c4ddae712"
]
}
},
"response": []
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [
""
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment