Get Payment Status
curl --request GET \
--url https://api.atoa.me/api/payments/v1/payment-status/{id}
{
"userUuid": "65abed89-7e7f-44e1-8855-0ca696f9a75b",
"paymentRequestId": "75abed89-7e7f-44e1-8855-0ca696f9a75b",
"customerId": "string",
"merchantId": "eed6202f-4dfd-42fc-9bc6-48323556b59d ",
"merchantName": "John",
"applicationUserId": "99abed89-7e7f-44e1-8855-0ca696f9a75b",
"callback": "string",
"avatar": "string",
"orderId": "e21d31cc3",
"signatureHash": "string",
"redirectUrlParams": {},
"redirectUrl": "https://paywithatoa.co.uk",
"status": "COMPLETED",
"paidAmount": "100",
"currency": "GBP",
"taxAmount": "2",
"serviceAmount": "16",
"tipAmount": "5",
"storeDetails": {
"id": "d77e02d5-4e93-46cf-a8be-50da650df562",
"address": "London",
"locationName": "Location 1"
},
"transactionDetails": [
{
"paymentIdempotencyId": "ATOA1692417435050",
"consumerId": "eed6202f-4dfd-42fc-9bc6-48323556b59d ",
"consumerName": "Doe",
"institutionId": "modelo-sandbox",
"tracingId": "e21d31cc354d44559d3c7b92ca07060a",
"statusDetails": {
"status": "COMPLETED",
"statusUpdateDate": "2023-08-19T03:31:49.073Z",
"isoStatus": {
"code": "ACSC",
"name": "AcceptedSettlementCompleted"
}
},
"paidAmount": "100",
"currency": "GBP",
"bankName": "Barclays",
"bankAccountNo": "756",
"createdAt": "2023-08-19T03:57:20.871Z",
"updatedAt": "2023-08-19T03:57:20.871Z",
"taxAmount": "2",
"serviceAmount": "16",
"tipAmount": "5",
"notes": "string",
"errorDescription": "Insufficient funds",
"paymentDevice": {},
"splitBill": false
}
]
}
If the status is PENDING, you should Poll for success at regular intervals. It should take 2-3 minutes at maximum for payment to be completed (dependent on the bank used).For a more effective approach, consider implementing an exponential back-off strategy.
So this API can be used to check the status of an individual payment transaction through polling, in case your integration hasn’t been set up for webhook usage.
NOTE: If the customer hasn’t initiated any payment, calling this API will result in a ‘200 OK’ with message: Payment not initiated.
The PaymentRequestId is required for this step, which you’ll receive it from the process-payment API when generating a payment request.
pass env=sandbox in case of sandbox env.
RESPONSE
Unique user id
Payment Request Id
Customer id
Merchant id
Merchant name
Application user id
callback
avatar
signatureHash
Redirect Url Params
Status of the Payment
Paid Amount
currency
tax charges
Service Amount
tipAmount
curl --request GET \
--url https://api.atoa.me/api/payments/v1/payment-status/{id}
{
"userUuid": "65abed89-7e7f-44e1-8855-0ca696f9a75b",
"paymentRequestId": "75abed89-7e7f-44e1-8855-0ca696f9a75b",
"customerId": "string",
"merchantId": "eed6202f-4dfd-42fc-9bc6-48323556b59d ",
"merchantName": "John",
"applicationUserId": "99abed89-7e7f-44e1-8855-0ca696f9a75b",
"callback": "string",
"avatar": "string",
"orderId": "e21d31cc3",
"signatureHash": "string",
"redirectUrlParams": {},
"redirectUrl": "https://paywithatoa.co.uk",
"status": "COMPLETED",
"paidAmount": "100",
"currency": "GBP",
"taxAmount": "2",
"serviceAmount": "16",
"tipAmount": "5",
"storeDetails": {
"id": "d77e02d5-4e93-46cf-a8be-50da650df562",
"address": "London",
"locationName": "Location 1"
},
"transactionDetails": [
{
"paymentIdempotencyId": "ATOA1692417435050",
"consumerId": "eed6202f-4dfd-42fc-9bc6-48323556b59d ",
"consumerName": "Doe",
"institutionId": "modelo-sandbox",
"tracingId": "e21d31cc354d44559d3c7b92ca07060a",
"statusDetails": {
"status": "COMPLETED",
"statusUpdateDate": "2023-08-19T03:31:49.073Z",
"isoStatus": {
"code": "ACSC",
"name": "AcceptedSettlementCompleted"
}
},
"paidAmount": "100",
"currency": "GBP",
"bankName": "Barclays",
"bankAccountNo": "756",
"createdAt": "2023-08-19T03:57:20.871Z",
"updatedAt": "2023-08-19T03:57:20.871Z",
"taxAmount": "2",
"serviceAmount": "16",
"tipAmount": "5",
"notes": "string",
"errorDescription": "Insufficient funds",
"paymentDevice": {},
"splitBill": false
}
]
}