Chat 2 Pay API
This API can be used to disable/enable integration with Chat 2 Pay programmatically.
Chat 2 Pay API Key Authorization
Unique identifier generated for each custom application the customer links to the account
Status
ACTIVATED/DEACTIVATEDPossible values: Success
Last modified time
Invalid Chat 2 Pay API key
Chat 2 Pay configuration not found
PUT /api/v2/integration HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 59
{
"applicationUuid": "text",
"status": "ACTIVATED/DEACTIVATED"
}{
"updateTime": "2026-01-01T00:00:00.000Z"
}This API can be used to reverse payment authorizations or void unsettled captures that were performed via Chat 2 Pay. Reversals cannot be performed on settled payments – a refund will need to be performed via the Payment Gateway back-office.
Chat 2 Pay API Key Authorization
The unique reference number for the payment link generated
Success
The type of transaction executed
The total amount of the transaction
Decision received back from the Payment Gateway for the payment request
Payment Reference number received back from the Payment Gateway for the payment request
Timestamp received back from the Payment Gateway for the payment request
Response code received back from the Payment Gateway for the payment request
Error description received back from Payment Gateway if error occurred
Unique number generated by Payment Gateway to identify the transaction for the payment request
The type of card used for the transaction, as received back from the Payment Gateway for the payment request
The masked card number used for the transaction, as received back from the Payment Gateway for the payment request
The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request
New payment status if it was changed
The ID of the new payment status
Operation failed because of Chat 2 Pay validation rules
Invalid Chat 2 Pay API key
Configured extension or transaction not found
Payment gateway error
POST /api/v2/payment/{paymentLinkRef}/reverse HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Accept: */*
{
"transactionType": "VOID",
"totalAmount": 1,
"paymentGatewayDecision": "VOIDED",
"paymentGatewayReqReferenceNumber": "6432992054556063104004",
"paymentGatewayResponseTimestamp": "2022-01-27T16:00:05.000+00:00",
"paymentGatewayResponseCode": 200,
"paymentStatus": "VOIDED",
"paymentStatusId": "7"
}This API can be used to capture payment authorizations that were performed via Chat 2 Pay. Only one successful payment capture can be performed against one payment authorization (multiple partial captures against one authorization are not supported currently).
Chat 2 Pay API Key Authorization
The unique reference number for the payment link generated
The amount for capture. The total amount will be used if not specified.
Success
The type of transaction executed
The total amount of the transaction
Decision received back from the Payment Gateway for the payment request
Payment Reference number received back from the Payment Gateway for the payment request
Timestamp received back from the Payment Gateway for the payment request
Response code received back from the Payment Gateway for the payment request
Error description received back from Payment Gateway if error occurred
Unique number generated by Payment Gateway to identify the transaction for the payment request
The type of card used for the transaction, as received back from the Payment Gateway for the payment request
The masked card number used for the transaction, as received back from the Payment Gateway for the payment request
The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request
New payment status if it was changed
The ID of the new payment status
Operation failed because of Chat 2 Pay validation rules
Invalid Chat 2 Pay API key
Chat 2 Pay configuration or transaction not found
Payment gateway error
POST /api/v2/payment/{paymentLinkRef}/capture HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Accept: */*
{
"transactionType": "CAPTURE",
"totalAmount": 1,
"paymentGatewayDecision": "PENDING",
"paymentGatewayReqReferenceNumber": "6432990331036057204005",
"paymentGatewayResponseTimestamp": "2022-01-27T15:57:13.000+00:00",
"paymentGatewayResponseCode": 200
}Generate and send a Chat 2 Pay message containing the payment link to the end-user and create a transaction log entry for the Chat 2 Pay request.
Chat 2 Pay API Key Authorization
The channel used to send the payment link to the end-user. Values: sms, whatsapp, none (only used if you do not want to send the payment link through a channel configured on Chat 2 Pay)
The mobile number of the sender used when sending payment link
The end-user’s mobile number that the payment link must be sent to.
The order number associated with this payment
The date and time that the system sends the request (ISO 8601 format)
The currency that the end-user is using to transact (Three-character ISO Standard Currency Codes)
[A-Za-z]{3}Tax due on this purchase
Amount due before tax
Amount that the end-user needs to pay
ID of payment gateway settings if multiple payment gateway settings were configured
Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response
Returns the payment link in the response if set to ‘true’
Unique reference number generated by Clickatell to identify the client’s application. This ID can be retrieved from the Clickatell customer portal.
Make automatically transaction reversal in case of REVIEW state
falseSpecifies the type of transaction that will be performed by the Payment Gateway. Allowed values are: Sale or Authorization. If a value is not supplied, the default transaction type that was set as part of the payment settings for the Chat 2 Pay configuration in the Clickatell Portal will be used.
Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN.
Merchant's business name. This name is displayed on the cardholder’s statement. Check your payment gateway integration guides for restrictions on maximum data length and allowed characters.
Payment link created
The unique reference number for the payment link generated
The status of the transaction
The ID of the transaction status
Timestamp generated by Clickatell’s application (in ISO 8601 format)
Contains the unique payment link for this payment. It will only return in the response if returnPaymentLink was set to true in the request.
Time to live in minutes for the Payment Link
Time to live in minutes for the Payment Page
Invalid Chat 2 Pay request, various validation rules broken
Invalid Chat 2 Pay API key
Chat 2 Pay configuration not found
HTTP error code that is returned from the channel API in case of an error when sending a message (see list of OneAPI error codes)
POST /api/v2/chat-2-pay HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 132
{
"channel": "sms",
"to": "16102347315",
"currency": "USD",
"orderNumber": "001",
"totalAmount": 1,
"timestamp": "2021-04-27T17:35:58.000+0000"
}{
"paymentLinkRef": "00e5dbdb-541e-4f9b-9e93-5dccef6a0854",
"transactionStatus": "PAYMENT_LINK_SENT",
"transactionStatusId": 2,
"timestamp": "2021-06-22T12:31:08.102+00:00"
}Use this endpoint in conjunction with the Chat 2 Pay API to send your end-users a link to their order receipt via the same channel used to send the payment link.
Chat 2 Pay API Key Authorization
The link that is sent to the end-user to direct them to their order receipt
The unique reference number for the payment link generated
The date and time the instruction to create the link was sent
Created, receipt link sent successfully
The unique reference number for the receipt link generated
The order number that the receipt is for
The date and time the instruction to create the link was received (In ISO 8601 format)
The current status of the transaction
The ID of the transaction status
Created, receipt link sent failed
Invalid Chat 2 Pay API key
Chat 2 Pay configuration or transaction not found
HTTP error code that is returned from the channel API in case of an error when sending a message (see list of OneAPI error codes)
POST /api/v2/order-receipt HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 144
{
"paymentLinkRef": "6753076e-1ee0-4323-b13c-9f67799036c6",
"timestamp": "2021-04-27T17:35:58.000+0000",
"receiptLink": "https://your.domain/receipt"
}{
"receiptLinkRef": "0e5f63d3-8964-49cf-a3a0-3d6620a4f479",
"orderNumber": "001",
"timestamp": "2021-06-22T13:56:28.000+00:00",
"transactionStatus": "RECEIPT_LINK_SENT",
"transactionStatusId": 7
}This API can be used to cancel the payment link. It is only possible to cancel a payment link that hasn’t been clicked yet. The cancellation of a payment link doesn’t affect a payment that is in progress.
Chat 2 Pay API Key Authorization
The unique reference number for the payment link generated
Success
Payment Link Reference Number
Transaction status of payment link
The ID of transaction status for payment link
Additional data field for payment link
Timestamp of payment link
Operation failed because of validation rules
Invalid Chat 2 Pay API key
Configured extension or transaction not found
POST /api/v2/cancel/{paymentLinkRef} HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Accept: */*
{
"paymentLinkRef": "621ff1eb-8eee-4f0e-a2d0-490bb82003d2",
"transactionStatus": "Payment Link Cancelled",
"transactionStatusId": "19",
"additionalData": "null",
"timestamp": "2022-02-14T11:38:04.249+00:00"
}Get a detailed breakdown of a transaction, including the transaction statuses and payment outcome.
Chat 2 Pay API Key Authorization
The order number associated with the payment
The payment link reference of the transaction you requested the details for
The unique reference number for the receipt link generated
Success
The order number associated with the payment
The payment link reference of the transaction you requested the details for
The status of the payment
The ID of the payment status
The date and time the payment outcome from the Payment Gateway was received (ISO 8601 format)
The total amount of the transaction
The receipt link reference number for the transaction
The name of the channel used for the transaction
The currency that the transaction was conducted in
The tax amount of the transaction
The sub-total of the transaction (before tax)
Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response
This field will contain the timestamp received from the payment gateway when a transaction which was in a Review status was finalized.
Make automatically transaction reversal in case of REVIEW state
falseSpecifies the type of transaction that was be performed by Payment Gateway.
Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)
Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN.
Merchant's business name.
Invalid Chat 2 Pay API key
GET /api/v2/chat-2-pay/transaction-status HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Accept: */*
[
{
"orderNumber": "v2-01",
"paymentLinkRef": "16a14fe3-d145-4e70-8fc2-fe6b5155e9cf",
"transactionStatuses": [
{
"transactionStatusId": 12,
"transactionStatusName": "Payment Status Notification Delivery Successful",
"created": "2022-02-10T10:13:41.000+00:00"
},
{
"transactionStatusId": 5,
"transactionStatusName": "Payment Status Notification Sent",
"created": "2022-02-10T10:13:15.000+00:00"
},
{
"transactionStatusId": 4,
"transactionStatusName": "Payment Status Received",
"created": "2022-02-10T10:12:52.000+00:00"
},
{
"transactionStatusId": 20,
"transactionStatusName": "Payment Link Clicked",
"created": "2022-02-10T10:10:40.000+00:00"
},
{
"transactionStatusId": 1,
"transactionStatusName": "Payment Link Request Received",
"created": "2022-02-10T10:10:19.000+00:00"
}
],
"paymentStatuses": [
{
"transactionType": "AUTHORIZATION",
"totalAmount": 10,
"paymentGatewayDecision": "ACCEPT",
"paymentGatewayReqReferenceNumber": "6444879418826376804001",
"paymentGatewayResponseTimestamp": "2022-02-10T10:12:22.000+00:00",
"paymentGatewayResponseCode": 100,
"paymentGatewayAuthReconciliationReferenceNumber": "235314875619",
"cardType": "Visa",
"maskedCardNumber": "XXXXXXXXXXXX1111",
"cardExpiryDate": "02/2022"
}
],
"paymentStatus": "SUCCESS",
"paymentStatusId": "1",
"paymentStatusTimestamp": "2022-02-10T10:13:40.000+00:00",
"totalAmount": 10,
"channelName": "NONE",
"currency": "ZAR",
"additionalData": "null",
"integrator": {
"applicationId": "95cbfe96-b53b-4fd0-b168-ea01072beb16",
"name": "Custom App"
},
"paymentReviewAutoReversal": false,
"transactionType": "AUTHORIZATION",
"environment": "SANDBOX",
"reconciliationId": "56343512"
}
]This API returns the configuration data for the configured Chat 2 Pay product.
Chat 2 Pay API Key Authorization
Success
Last modified time
Checks if WA omni integration is enabled
Checks if SMS omni integration is enabled
Api key
Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)
Invalid Chat 2 Pay API key
GET /api/v2/config HTTP/1.1
Host: chat2pay-service.clickatell.com/
Authorization: YOUR_API_KEY
Accept: */*
{
"updateTime": "2022-02-11T12:05:51.000+00:00",
"whatsappChannelEnabled": false,
"smsChannelEnabled": true,
"integrators": [
{
"applicationId": "95cbfe96-b53b-4fd0-b168-ea01072beb16",
"name": "Custom App",
"status": "ACTIVATED"
},
{
"applicationId": "1",
"name": "Salesforce",
"status": "ACTIVATED"
},
{
"applicationId": "2",
"name": "ChatDesk",
"status": "ACTIVATED"
}
],
"apiKey": "0ba7430e091841b9a87e25f1946c3320",
"supportedCurrencies": [
{
"id": 156,
"iso": "ZAR",
"name": "South African rand",
"symbol": "R",
"isDefault": true
}
],
"environment": "SANDBOX"
}Last updated