Get Transaction Details API
To Confirm If Your Transaction Was Success Or Declined, You Can Call Bellow New API.
This API Call Is Optional, It Is Just For Security And Transaction Confirmation. You Do Not Need To Call This API To Complete Transaction.
Authorization
To authenticate the user we have to pass API-KEY
in our request
header. Please find below how we can pass API-KEY in header during request.
Authorization: Bearer 1|3WIXuhS9eYVh1vFjG8JoyfztPTqeE9EVXyeJS77676
If we do not pass API-KEY
in header then we will get this error
in our response.
{
"responseCode": "6",
"responseMessage": "Unauthorised request, please pass API Key in Header",
"data": {
"transaction": {
"order_id": null,
"customer_order_id": "TX121212",
"amount": "12.50",
"currency": "USD"
},
"client": {
"first_name": "Test",
"last_name": "Test",
"email": "test@gmail.com",
"phone_no": "+4477676767",
"address": "Test",
"zip": "123456",
"city": "Test",
"state": "Test",
"country": "GB"
},
"card": {
"card_no": "424242XXXXXX4243",
"ccExpiryMonth": "05",
"ccExpiryYear": "2023",
"cvvNumber": "XXX"
}
}
}
Request Parameter *
Paramters | Required | Data Type | Description |
---|---|---|---|
order_id | Optional | String | Value you returned from Transaction API. |
customer_order_id | Optional | String | Merchant side unique transaction Ref. |
https://portal.gatewaypay.io/api/get/transaction
POST
Note: order_id
or
customer_order_id
One Parameter Should Be Pass. Both Parameter
Can Be Pass, But At Least One Is Required.
Response Codes
After a successful CURL request, the response code will be sent in JSON format.
These are the response code with their meanings:
1.) "0" : "Fail" => It means transaction get declined.
2.) "1" :"Success" => It means transaction processed successfully.
3.) "2" :"Pending" => It means user not complete the transaction process or there is some other issue that's why transaction got stuck in between.
4.) "3" :"Cancelled" => It means user cancelled the transaction.
5.) "4" :"to_be_confirm" => It means when there is some delay in bank response to confirm the transaction status.
6.) "5" :"Blocked" => It means when transaction blocked due to restricted country or per day transaction or card limit.
7.) "6" :"Unathorized" => It means when user pass wrong API-KEY or wrong order_id.
8.) "7" :"Redirected" => It means redirect user to 3ds link to complete the transaction.
9.) "8" :"Abandoned" => It means the user abandoned the transaction.
IF TRANSACTION NOT FOUND IN RECORD.
{
"responseCode": "6",
"responseMessage": "Not found."
}
After successful CURL request example :
If there will be no validation errors in request, response will be like:
{
"responseCode": "1",
"responseMessage": "Your transaction has been processed successfully.",
"data": {
"transaction": {
"order_id": "1681120036EW1ZKPM259",
"customer_order_id": null,
"amount": "5.00",
"currency": "USD"
},
"client": {
"first_name": "GatewayPay",
"last_name": "Test",
"email": "test@gmail.com",
"phone_no": "887123456",
"address": "suit 1 ,a.l.evelyn ltd building, charlestown , nevis",
"zip": "30001",
"city": "London",
"state": "London",
"country": "GB"
}
}
}