CRM Open API DocumentationCRM Open API Documentation
REST API
Webhooks
PSP Open API
External Exchange Rates
REST API
Webhooks
PSP Open API
External Exchange Rates
  • PSP Open API Introduction
  • Signature Algorithm
  • API Specifications

    • 1. PSP Get Payment URL
    • 2. PSP Payment Callback
  • Errors

1. PSP Get Payment URL

This API allows the CRM to request the payment page URL from the tenant's system. The URL can either point to the tenant's custom-built payment page or a PSP (Payment Service Provider) page.

POST {APP_URL}/pay/url

Headers

KetValue
crm-pay-tokenThe token CRM generates

Note

API parameter keys are now customizable.

Request Body

NameTypeRequiredDescription
merchant_idstringMandatoryMerchant ID generated by CRM after PSP Integration is created.
order_nostringMandatoryUnique Order ID generated by CRM for each payment.
amountnumberMandatoryPayment amount.
currencystringMandatoryCurrency code (e.g., USD, EUR).
user_idstringOptionalCRM customer ID.
user_namestringOptionalCRM customer name.
emailstringOptionalCRM customer email.
phonestringOptionalCRM customer phone number.
nationalitystringOptionalCRM customer nationality (ISO-2 code, e.g., us, sg).
languagestringOptionalLanguage used on the client portal (e.g., en-us, de).
devicestringOptionalDevice used (mobile, pc).
signstringMandatoryData signature (refer to Signature Algorithm).

Sample Request

{
  "merchant_id": "136421f3-da9e-4d5c-b960-0e15a19df46e",
  "order_no": "sh4ykq5vj8e",
  "currency": "USD",
  "amount": 162.48,
  "user_id": "7du6r2mg",
  "user_name": "John Doe",
  "email": "[email protected]",
  "phone": "+1 123456",
  "nationality": "us",
  "language": "en-us",
  "device": "pc",
  "custom_1": "AUTO_VALUE",
  "custom_2": "AUTO_VALUE",
  "sign": "Will be generated after clicking the button"
}

Expected HTTP status code

  • 200

Response

NameTypeDescription
data.urlstringThe payment page redirection URL
resultbooleanRequest status (true for success, false for fail)
msgstringError message in case of failure

Sample Response

{
  "data": {
    "url": "https://pay.xxx.com?amount=100&currency=USD..."
  },
  "result": true,
  "msg": ""
}
Last Updated:: 10/16/24, 7:13 AM
Next
2. PSP Payment Callback