Check Status
To get order status you can use GET_TRANS_STATUS request. Use payment public_id from Payment Platform in the request.
API Endpoint
Request URL: {{CHECKOUT_HOST}}/api/v1/payment/status
Request Method: POST
Request Body: JSON
Request Parameters
| Parameter | Type | Mandatory, Limitations | Description |
|---|---|---|---|
merchant_key | String | Required | Key for Merchant identification Example: xxxxx-xxxxx-xxxxx |
payment_id | String | Required Up to 255 characters | Payment ID (public) Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002 |
hash | String | Required | Special signature to validate your request to Payment Platform. For details, click here |
Response Parameters
| Parameter | Type | Mandatory, Limitations | Description |
|---|---|---|---|
payment_id | String | Required Up to 255 characters | Payment ID (public) Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002 |
date | String | Required Format: YYYY-MM-DD hh:mm:ss | Transaction date Example: 2020-08-05 07:41:10 |
status | String | Required | Payment status: prepare, settled, pending, 3ds, redirect, decline, refund, void, reversal, chargeback Example: settled |
reason | String | Optional | Decline reason translation for unsuccessful payment. It displays only if the transaction is unsuccessful Example: The operation was rejected. Please contact the site support |
| order | Object | ||
number | String | Required Up to 255 characters | Order ID Example: order-1234 |
amount | String | Required Format: XX.XX | Product price (currency will be defined by the first payment) Example: 0.19 |
currency | String | Required Up to 3 characters | Currency Example: QAR |
description | String | Required Up to 1024 characters | Product name Example: Very important gift |
| customer | Object | ||
name | String | Required | Customer's name Example: John Doe |
Examples
Request
GET_TRANS_STATUS request (setteled)
curl --location -g --request POST '{{CHECKOUT_HOST}}/api/v1/payment/status' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"payment_id": "63c781cc-de3d-11eb-a1f1-0242ac130006",
"hash": "{{operation_hash}}"
}
'
GET_TRANS_STATUS request (declined)
curl --location -g --request POST '{{CHECKOUT_HOST}}/api/v1/payment/status' \
--data-raw '{
"merchant_key": "xxxxx-xxxxx-xxxxx",
"payment_id": "03e46e96-de42-11eb-aea7-0242ac140002",
"hash": "{{operation_hash}}"
}
'
Response
Status Settled
{
"payment_id": "24f7401c-fc47-11ec-8d07-0242ac120015",
"date": "2022-07-05 09:45:03",
"status": "settled",
"order": {
"number": "f0a51dfa-fc43-11ec-8128-0242ac120004-1",
"amount": "3.01",
"currency": "QAR",
"description": "bloodline"
},
"customer": {
"name": "John Doe",
"email": "success@gmail.com"
}
}
Status Declined
{
"payment_id": "03e46e96-de42-11eb-aea7-0242ac140002",
"date": "2021-07-06 10:07:47",
"status": "decline",
"reason": "Declined by processing",
"order": {
"number": "order-1234",
"amount": "0.19",
"currency": "QAR",
"description": "Important gift"
},
"customer": {
"name": "John Doe",
"email": "test@mail.com"
}
}