Transaction Status
https://api-sandbox.epag.io/payment/MY_PAYMENT_TOKEN
Description
After receiving a transaction update callback, use this GET request to retrieve the most current status of the transaction. Identify the transaction using the paymentToken
.
Request
- Path parameter:
paymentToken
(string): The unique identifier of the transaction.
Response
The response will contain the following fields:
paymentToken (string): The unique identifier of the payment transaction.
paymentToken
(string): The unique identifier of the payment transaction.createdAt
(string/date/yyyy-MM-dd'T'HH:mm:ss.SSS): The timestamp indicating the creation time of the transaction.transactionStatus
(string): The status of the payment transaction.expirationDate:
(string/date/yyyy-MM-dd'T'HH:mm:ss.SSS): The maximum period defined for making a payment.errorCode:
(string): Code for payment decline.currency
(string): The currency used for the transaction.amount_received
(number): The amount received for the transaction.refunded_amount
(number): The refunded amount for the transaction.reference
(string): The reference associated with the transaction.cancellation_details
(object): An object containing the description of the cancellation details, if any.description
(string): Description of the cancellation details, if applicable.
extra_data
(object): Additional data related to the transaction.my-conciliation-number
(string): The conciliation number associated with the transaction.
refresh_token
(string): The refresh token associated with the transaction.
Usage
Replace https://api-sandbox.epag.io
with the base URL and MY_PAYMENT_TOKEN
with the actual payment token to retrieve the status of the specific transaction.
AUTHORIZATION | API Key |
---|---|
Key | X-Auth-Token |
Value | MY_ACCESS_TOKEN |
Example Request
- 200 - Success
- 401 - Unauthorized
- 404 - Not Found
Example Request
200 - Success
curl --location 'https://api-sandbox.epag.io/identityValidation/CONTRACT_ID/BR/12345678909'
Example Response
Header
Content-Type: application/json
Body
{
"paymentToken": "2f1c0103-b6fe-4e99-864c-d20c68b97a85",
"createdAt": "2024-01-16T20:03:46.618",
"transactionStatus": "PAID",
"currency": "BRL",
"amount_received": 10,
"refunded_amount": 0,
"reference": "MY_REFERENCE_ID",
"expiration_date": "2024-01-18T20:03:46.618",
"errorCode": "00.00.0000",
"extra_data": {
"my-conciliation-number": "xxxxxx"
},
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
401 - Unauthorized
curl --location 'https://api-sandbox.epag.io/identityValidation/CONTRACT_ID/BR/12345678909'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-05-14T18:21:23.021+00:00",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/identityValidation/CONTRACT_ID/BR/12345678909"
}
Example Request
404 - Not Found
curl --location 'https://api-sandbox.epag.io/payment/MY_PAYMENT_TOKEN' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-19T13:26:33.412+0000",
"status": 404,
"error": "Not Found",
"message": "This transaction id (00000000-0000-0000-0000-000000000000) could not be found.",
"path": "/payment/00000000-0000-0000-0000-000000000000",
"errors": [
{
"code": "00.01.0038",
"description": "This transaction id (00000000-0000-0000-0000-000000000000) could not be found."
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}