Chat 2 Pay API

Update application's integration status

put

This API can be used to disable/enable integration with Chat 2 Pay programmatically.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Body
applicationUuidstringRequired

Unique identifier generated for each custom application the customer links to the account

statusstring · enumRequired

Status

Example: ACTIVATED/DEACTIVATEDPossible values:
Responses
chevron-right
200

Success

*/*
updateTimestring · date-timeOptional

Last modified time

put
/api/v2/integration

Reverse authorization and void a capture

post

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.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Path parameters
paymentLinkRefstringRequired

The unique reference number for the payment link generated

Responses
chevron-right
200

Success

*/*
transactionTypestring · enumOptional

The type of transaction executed

Possible values:
totalAmountnumberOptional

The total amount of the transaction

paymentGatewayDecisionstringOptional

Decision received back from the Payment Gateway for the payment request

paymentGatewayReqReferenceNumberstringOptional

Payment Reference number received back from the Payment Gateway for the payment request

paymentGatewayResponseTimestampstring · date-timeOptional

Timestamp received back from the Payment Gateway for the payment request

paymentGatewayResponseCodeinteger · int32Optional

Response code received back from the Payment Gateway for the payment request

paymentGatewayErrorDecisionstringOptional

Error description received back from Payment Gateway if error occurred

paymentGatewayAuthReconciliationReferenceNumberstringOptional

Unique number generated by Payment Gateway to identify the transaction for the payment request

cardTypestringOptional

The type of card used for the transaction, as received back from the Payment Gateway for the payment request

maskedCardNumberstringOptional

The masked card number used for the transaction, as received back from the Payment Gateway for the payment request

cardExpiryDatestringOptional

The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request

paymentStatusstringOptional

New payment status if it was changed

paymentStatusIdstringOptional

The ID of the new payment status

post
/api/v2/payment/{paymentLinkRef}/reverse

Request to capture the payment amount

post

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).

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Path parameters
paymentLinkRefstringRequired

The unique reference number for the payment link generated

Query parameters
amountnumberOptional

The amount for capture. The total amount will be used if not specified.

Responses
chevron-right
200

Success

*/*
transactionTypestring · enumOptional

The type of transaction executed

Possible values:
totalAmountnumberOptional

The total amount of the transaction

paymentGatewayDecisionstringOptional

Decision received back from the Payment Gateway for the payment request

paymentGatewayReqReferenceNumberstringOptional

Payment Reference number received back from the Payment Gateway for the payment request

paymentGatewayResponseTimestampstring · date-timeOptional

Timestamp received back from the Payment Gateway for the payment request

paymentGatewayResponseCodeinteger · int32Optional

Response code received back from the Payment Gateway for the payment request

paymentGatewayErrorDecisionstringOptional

Error description received back from Payment Gateway if error occurred

paymentGatewayAuthReconciliationReferenceNumberstringOptional

Unique number generated by Payment Gateway to identify the transaction for the payment request

cardTypestringOptional

The type of card used for the transaction, as received back from the Payment Gateway for the payment request

maskedCardNumberstringOptional

The masked card number used for the transaction, as received back from the Payment Gateway for the payment request

cardExpiryDatestringOptional

The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request

paymentStatusstringOptional

New payment status if it was changed

paymentStatusIdstringOptional

The ID of the new payment status

post
/api/v2/payment/{paymentLinkRef}/capture

Generate and send a payment link

post

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.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Body
channelstring · enumRequired

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)

Possible values:
fromstringOptional

The mobile number of the sender used when sending payment link

tostringRequired

The end-user’s mobile number that the payment link must be sent to.

orderNumberstring · max: 32Required

The order number associated with this payment

timestampstring · date-timeRequired

The date and time that the system sends the request (ISO 8601 format)

currencystringRequired

The currency that the end-user is using to transact (Three-character ISO Standard Currency Codes)

Pattern: [A-Za-z]{3}
taxAmountnumberOptional

Tax due on this purchase

subTotalAmountnumberOptional

Amount due before tax

totalAmountnumberRequired

Amount that the end-user needs to pay

paymentGatewaySettingsIdstringOptional

ID of payment gateway settings if multiple payment gateway settings were configured

additionalDataobjectOptional

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

returnPaymentLinkbooleanOptional

Returns the payment link in the response if set to ‘true’

applicationIdstringOptional

Unique reference number generated by Clickatell to identify the client’s application. This ID can be retrieved from the Clickatell customer portal.

paymentReviewAutoReversalbooleanOptional

Make automatically transaction reversal in case of REVIEW state

Default: false
transactionTypestring · enumOptional

Specifies 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.

Possible values:
reconciliationIdstring · max: 60Optional

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. This name is displayed on the cardholder’s statement. Check your payment gateway integration guides for restrictions on maximum data length and allowed characters.

Responses
post
/api/v2/chat-2-pay

Create payment receipt

post

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.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Body
receiptLinkstringRequired

The link that is sent to the end-user to direct them to their order receipt

paymentLinkRefstringRequired

The unique reference number for the payment link generated

timestampstring · date-timeRequired

The date and time the instruction to create the link was sent

Responses
post
/api/v2/order-receipt

Cancels a payment link

post

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.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Path parameters
paymentLinkRefstringRequired

The unique reference number for the payment link generated

Responses
chevron-right
200

Success

*/*
paymentLinkRefstringOptional

Payment Link Reference Number

transactionStatusstringOptional

Transaction status of payment link

transactionStatusIdstringOptional

The ID of transaction status for payment link

additionalDatastringOptional

Additional data field for payment link

timestampstring · date-timeOptional

Timestamp of payment link

post
/api/v2/cancel/{paymentLinkRef}

Get transaction details

get

Get a detailed breakdown of a transaction, including the transaction statuses and payment outcome.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Query parameters
orderNumberstringOptional

The order number associated with the payment

paymentLinkRefstringOptional

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

receiptLinkRefstringOptional

The unique reference number for the receipt link generated

Responses
chevron-right
200

Success

*/*
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.

get
/api/v2/chat-2-pay/transaction-status

Get Chat 2 Pay configuration

get

This API returns the configuration data for the configured Chat 2 Pay product.

Authorizations
AuthorizationstringRequired

Chat 2 Pay API Key Authorization

Responses
chevron-right
200

Success

*/*
updateTimestring · date-timeOptional

Last modified time

whatsappChannelEnabledbooleanOptional

Checks if WA omni integration is enabled

smsChannelEnabledbooleanOptional

Checks if SMS omni integration is enabled

apiKeystringOptional

Api key

environmentstringOptional

Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)

get
/api/v2/config

Last updated