Customer callbacks

Transaction status change notification

  • A transaction status change notification is sent after the following events: payment link creation, link cancellation, link clicked, link expiration, and payment status change.

  • Notifications are sent to the integrator that created the payment link (specified by applicationId).

  • The URL for the notifications can be specified in the Transaction Status Event field when configuring Chat 2 Pay’s Callback Notifications section in the Clickatell Portal.

Transaction status change notification

post

A transaction status change notification is sent after the following events: payment link creation, link cancellation, link clicked, link expiration, payment status change. Notifications are sent to the integrator that created the payment link (specified by ‘applicationId’). The URL for the notifications can be specified in the ‘Transaction Status Event’ field when configuring Chat 2 Pay’s ‘Callback Notifications’ section in the Clickatell Portal.

Body
orderNumberstringOptional

The order number associated with the payment

paymentLinkRefstringOptional

The payment link reference of the transaction you requested the details for

paymentStatusstring · enumOptional

The status of the payment

Possible values:
paymentStatusIdstringOptional

The ID of the payment status

paymentStatusTimestampstring · date-timeOptional

The date and time the payment outcome from the Payment Gateway was received (ISO 8601 format)

totalAmountnumberOptional

The total amount of the transaction

receiptLinkRefstringOptional

The receipt link reference number for the transaction

channelNamestringOptional

The name of the channel used for the transaction

currencystringOptional

The currency that the transaction was conducted in

taxAmountnumberOptional

The tax amount of the transaction

subTotalAmountnumberOptional

The sub-total of the transaction (before tax)

additionalDatastringOptional

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

paymentStatusConversionTimestring · date-timeOptional

This field will contain the timestamp received from the payment gateway when a transaction which was in a Review status was finalized.

paymentReviewAutoReversalbooleanOptional

Make automatically transaction reversal in case of REVIEW state

Default: false
transactionTypestring · enumOptional

Specifies the type of transaction that was be performed by Payment Gateway.

Possible values:
environmentstringOptional

Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)

reconciliationIdstringOptional

Reference number that you use to reconcile your transaction reports with your processor reports. Also known as Transaction Reference Number or TRN.

merchantDescriptorstringOptional

Merchant's business name.

Responses
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

post
/api/v2/callback/transaction-status
POST /api/v2/callback/transaction-status HTTP/1.1
Host: chat2pay-service.clickatell.com/
Content-Type: application/json
Accept: */*
Content-Length: 1251

{
  "orderNumber": "v2-01",
  "paymentLinkRef": "16a14fe3-d145-4e70-8fc2-fe6b5155e9cf",
  "transactionStatuses": [
    {
      "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.00",
      "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:12:52.087+00:00",
  "totalAmount": "10.00",
  "channelName": "NONE",
  "currency": "ZAR",
  "additionalData": "null",
  "integrator": {
    "applicationId": "95cbfe96-b53b-4fd0-b168-ea01072beb16",
    "name": "Custom App"
  },
  "paymentReviewAutoReversal": false,
  "transactionType": "AUTHORIZATION",
  "environment": "SANDBOX"
}
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

Payment status change notification

  • A payment status change notification is sent after each payment status change, e.g., payment status received, capture, reversal.

  • The URL for the notifications can be specified in the Payment Status field when configuring Chat 2 Pay’s Callback Notifications section in the Clickatell Portal.

Payment status change notification

post

A payment status change notification is sent after each payment status change, e.g., payment status received, capture, reversal. The URL for the notifications can be specified in the ‘Payment Status’ field when configuring Chat 2 Pay’s ‘Callback Notifications’ section in the Clickatell Portal.

Body
orderNostringOptional

The order number associated with the payment

paymentLinkRefstringOptional

The payment link reference of the transaction you requested the details for

fromstringOptional

The mobile number of the sender used when sending payment link.

tostringOptional

The end-user’s mobile number that the payment link was sent to (In international format, e.g., 27831234567).

paymentStatusstringOptional

The new status of the payment

paymentStatusIdstringOptional

The ID of the payment status

currencystringOptional

The currency that the transaction was conducted in

totalAmountnumberOptional

The total amount of the transaction

additionalDatastringOptional

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

paymentStatusConversionTimestringOptional

This field will contain the timestamp received from the Payment Gateway when a transaction which was in a Review status was finalized.

environmentstringOptional

Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)

Responses
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

post
/api/v2/callback/payment-status
POST /api/v2/callback/payment-status HTTP/1.1
Host: chat2pay-service.clickatell.com/
Content-Type: application/json
Accept: */*
Content-Length: 648

{
  "orderNo": "v2-01",
  "paymentLinkRef": "16a14fe3-d145-4e70-8fc2-fe6b5155e9cf",
  "to": "16102347315",
  "paymentStatus": "SUCCESS",
  "paymentStatusId": "1",
  "currency": "ZAR",
  "totalAmount": "10.00",
  "additionalData": "null",
  "paymentStatuses": [
    {
      "transactionType": "AUTHORIZATION",
      "totalAmount": "10.00",
      "paymentGatewayDecision": "ACCEPT",
      "paymentGatewayReqReferenceNumber": "6444879418826376804001",
      "paymentGatewayResponseTimestamp": "2022-02-10T10:12:22.000+00:00",
      "paymentGatewayResponseCode": 100,
      "paymentGatewayAuthReconciliationReferenceNumber": "235314875619",
      "cardType": "Visa",
      "maskedCardNumber": "XXXXXXXXXXXX1111",
      "cardExpiryDate": "02/2022"
    }
  ],
  "environment": "SANDBOX"
}
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

Chat 2 Pay configuration change notification

A Chat 2 Pay configuration change notification is sent after the following events: API key added or removed, currency added or removed, channel added or removed. Notifications are sent to each active integrator. The URL for the notifications can be specified in the ‘Chat 2 Pay Settings’ field when configuring Chat 2 Pay’s ‘Callback Notifications’ section in the Clickatell Portal.

Chat 2 Pay configuration change notification

post

A Chat 2 Pay configuration change notification is sent after the following events: API key added or removed, currency added or removed, channel added or removed. Notifications are sent to each active integrator. The URL for the notifications can be specified in the ‘Chat 2 Pay Settings’ field when configuring Chat 2 Pay’s ‘Callback Notifications’ section in the Clickatell Portal.

Body
apiKeystringOptional

API key required to access the C2P APIs

enabledChannelsstring[]Optional

List of enabled channels used to send the payment link

mc2AccountIdstringOptional

MC2 account ID

chatFlowClientIdstringOptional

ChatFlow client ID

configIdstringOptional

Chat 2 Pay configuration ID

environmentstringOptional

Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)

Responses
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

post
/api/v2/callback/config-change
POST /api/v2/callback/config-change HTTP/1.1
Host: chat2pay-service.clickatell.com/
Content-Type: application/json
Accept: */*
Content-Length: 384

{
  "mc2AccountId": "6bf76e31c0a34302875f5ef5784c7968",
  "configId": "2c9acd1e7ac31290017ac87a03c600a8",
  "environment": "SANDBOX",
  "apiKey": "0e05d3fc016d46d09993341ab45ef5c9",
  "enabledChannels": [
    "SMS"
  ],
  "supportedCurrencies": [
    {
      "id": 1,
      "iso": "AED",
      "name": "United Arab Emirates dirham",
      "symbol": "د.إ",
      "isDefault": true
    },
    {
      "id": 2,
      "iso": "AFN",
      "name": "Afghan afghani",
      "symbol": "؋",
      "isDefault": false
    }
  ]
}
200

Return 200 code if the callback was received and processed successfully. Chat 2 Pay will retry this notification delivery for any other response code.

No content

Last updated