Skip to main content

Transaction Status By Reference

https://api-sandbox.letpay.io/payment/reference/MY_REFERENCE_ID

Get Payment Details by Reference ID

When the transaction ID is not available, use the reference ID with this endpoint to retrieve the corresponding payment details.

Request

  • Method: GET
  • URL: https://api-sandbox.letpay.io/payment/reference/MY_REFERENCE_ID

Response

The response for this request is a JSON object with the following schema:

{
{
"payments": [
{
"paymentToken": "",
"createdAt": "",
"transactionStatus": "",
"currency": "",
"amount_received": 10,
"refunded_amount": 0,
"reference": "",
"extra_data": {
"my-conciliation-number": ""
}
}
],
"refresh_token": ""
}
}

The payments array contains the payment details, including paymentToken, createdAt, transactionStatus, expiration_date, currency, refunded_amount, reference, and extra_data which may include additional information related to the payment. The refresh_token field may also be included in the response.

AUTHORIZATIONAPI Key
KeyX-Auth-Token
ValueMY_ACCESS_TOKEN

Example Request

200 - Success
    curl --location 'https://api-sandbox.letpay.io/payment/reference/MY_REFERENCE_ID' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN'

Example Response

Header
  Content-Type: application/json
Body
    {
"payments": [
{
"paymentToken": "bf1fe0df-8f22-4e86-a718-db9cad56e845",
"createdAt": "2024-01-16T13:26:38.605",
"transactionStatus": "PAID",
"currency": "BRL",
"amount_received": 10,
"refunded_amount": 0,
"reference": "MY_REFERENCE_ID",
"expirationDate": "2024-01-18T13:26:38.000",
"extra_data": {
"my-conciliation-number": "xxxxxx"
}
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}