Callback Notification
Checkout service sends the callback on the merchant notification_URL as a result of an operation.
Content Type: application/x-www-form-urlencoded
Method: POST
caution
With all Payment Platform POST requests at Callback Notification URL, merchant must return
- the HTTP Status Code "200 - OK" in case of notification successfully received OR
- string "ERROR".
Merchant can receive the callback for the below operation types:
- SALE
- 3DS
- REDIRECT
- REFUND
- VOID
- RECURRING
- CHARGEBACK
Notification Frequency
- Real Time - right after transaction is completed
- After 15 minutes of transaction completion if TESS did not receive 200 - OK for 1st attempt
- After 30 minutes of transaction completion if TESS did not receive 200 - OK for 2nd attempt
- After 45 minutes of transaction completion if TESS received 200 - OK for 3rd attempt
Possible Transaction Statuses
| Status | Operation type | Description |
|---|---|---|
| SUCCESS | sale, 3ds, redirect, refund, void, recurring, chargeback | Transaction is successfully completed in Payment Platform |
| FAIL | sale, refund, void, recurring | Transaction has the errors and is not validated by Payment Platform |
| WAITING | sale, refund, void, recurring | Transaction is being processed by Payment Platform |
danger
The successful transaction does not mean successful final status for payment.
Example:
- Payment is not completed if transaction has
status= success andtype= redirect/waiting/3ds etc. - Payment is successfully completed if transaction has
status= success andtype= sale.
Callback parameters
Callback includes the following data:
| Parameter | Type | Mandatory, Limitations | Description |
|---|---|---|---|
id | String | Required | Transaction ID Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002 |
order_number | String | Required Up to 255 characters | Order ID Example: order-1234 |
order_amount | Float | Required Format: XX.XX, without leading zeroes | Product price Example: 0.19 |
order_currency | String | Required Up to 3 characters | Currency (3-characters code) Example: QAR |
order_description | String | Required Up to 1024 characters | Product description Example: Important gift |
type | String | Required Up to 36 characters | Operation type: sale, 3ds, redirect, refund, void, chargeback Example: sale |
status | String | Required Up to 20 characters | Transaction status: success, fail, waiting Example: success |
reason | String | Optional Up to 1024 characters | Decline or error reason (for "sale" and "refund" operation types only). It displays only if the transaction has FAIL status Example: The operation was rejected. Please contact the site support |
rrn | String | Optional | Retrieval Reference Number value from the acquirer system |
approval_code | String | Optional | Approval code value from the acquirer system |
card | String | Optional Format: ХХХХХХ****ХХХХ | Card number mask Example: 411111******1111 |
card_expiration_date | String | Optional | Card expiration date Example: 12/2022 |
card_token | String | Optional | Card token. It is available if the parameter req_token was enabledExample: VjFRaUxDSmhiR2NpT2lKU1V6STFO |
customer_name | String | Optional | Customer's first and last name Example: John Rickher |
customer_email | String | Optional Format: example@mail.com | Customer's email address Example: fdfd@dfsds.ds |
customer_country | String | Optional Up to 3 characters | Customer's country Example: US |
customer_state | String | Optional Up to 32 characters | Customer's state Example: California |
customer_city | String | Optional | Customer's city Example: Los Angeles |
customer_address | String | Optional Up to 32 characters | Customer's address Example: 123 Sample Street |
customer_ip | String | Required | Customer's IP Example: 255.41.45.57 |
date | Date | Optional Format: YYYY-MM-DD hh:mm:ss (UTC+0 Format) | Transaction date Example: 2020-08-05 07:41:10 |
recurring_init_trans_id | String | Optional | Reference to the first transaction that initializes the recurring (provided if recurring was initialized) Example: dc66cdd8-d702-11ea-9a2f-0242c0a87099 |
recurring_token | String | Optional | Recurring token (provided if recurring was initialized) Example: e5f60b35485e |
schedule_id | String | Optional | It is available if schedule is used for recurring sale |
hash | String | Required | Special signature, used to validate callback. For details, click here |
Examples
Merchant successful sale callback
{
id=f0a51dfa-fc43-11ec-8128-0242ac120004
order_number=order-1234
order_amount=3.01
order_currency=QAR
order_description=bloodline
type=sale
status=success
card=411111****1111
card_expiration_date=12/2022
schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007
recurring_init_trans_id=f0a51dfa-fc43-11ec-8128-0242ac120004
recurring_token=f0e24964-fc43-11ec-a7e0-0242ac120004
date=2022-07-05 09:22:09
hash=6d8d440e25bdfc5288616ce567496948d2562852
customer_name=D D
customer_email=success@gmail.com
customer_country=US
customer_state=California
customer_city=Los Angeles
customer_address=Moor Building 35274 State ST Fremont. U.S.A
customer_ip=10.10.10.2
}
Merchant successful refund callback
{
id=f0a51dfa-fc43-11ec-8128-0242ac120004
order_number=order-1234
order_amount=3.01
order_currency=QAR
order_description=bloodline
type=refund
status=success
card=411111****1111
card_expiration_date=12/2022
schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007
date=2022-07-05 09:28:01
hash=6d8d440e25bdfc5288616ce567496948d2562852
customer_name=D D
customer_email=success@gmail.com
customer_country=US
customer_state=California
customer_city=Los Angeles
customer_address=Moor Building 35274 State ST Fremont. U.S.A
customer_ip=10.10.10.2
}
Merchant unsuccessful sale callback
{
id=1f34f446-fc45-11ec-a50f-0242ac120004
order_number=order-1234
order_amount=3.01
order_currency=QAR
order_description=bloodline
type=sale
status=fail
card=411111****1111
card_expiration_date=12/2022
reason=Declined by processing.
date=2022-07-05 09:30:35
hash=7f15d178e9b2c8507dea57f8ed1efddb9573fa6b
customer_name=D D
customer_email=success@gmail.com
customer_country=US
customer_state=California
customer_city=Los Angeles
customer_address=Moor Building 35274 State ST Fremont. U.S.A
customer_ip=10.10.10.2
}
Merchant unsuccessful refund callback
{
id=ba290c62-fc45-11ec-9e91-0242ac120004
order_number=order-1234
order_amount=3.01
order_currency=QAR
order_description=bloodline
type=refund
status=fail
card=411111****1111
card_expiration_date=12/2022
reason=Declined by processing.
schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007
recurring_init_trans_id=ba290c62-fc45-11ec-9e91-0242ac120004
recurring_token=ba51844e-fc45-11ec-932c-0242ac120004
date=2022-07-05 09:38:00
hash=bcd78ff8b8e6b75aa1743910641217be6edc3a43
customer_name=D D
customer_email=success@gmail.com
customer_country=US
customer_state=California
customer_city=Los Angeles
customer_address=Moor Building 35274 State ST Fremont. U.S.A
customer_ip=10.10.10.2
}