API that will allow you to see the current status of one or multiple payments depending on the filter you use.

To validate the status of a payment you must do it through the following endpoint: [API_URL]/merchant/check_payment_status using a POST request.

The parameters you can use to filter are the following:

merchant_api_token * Authorization token received upon delivery of the ‣.
session_token Session token that is generated at the time of creating payment session
merchant_order_id identifier provided by the merchant at the time of creating payment session
payment_token identifier of the process carried out by the final payer, this comes as a response both in the redirection and in the notification.

the merchant_api_token field is mandatory, it is also mandatory to include at least one of the 3 optional fields.

Example:

{
    "merchant_api_token": <STRING>", //Required
    "session_token": <STRING>,  //Optional
    "merchant_order_id": <STRING/INT>, //Optional
    "payment_token": <STRING> //Optional
}

The response received by this API is an array since in the case of merchant_order_id the field can be repeated, in that case it will return all payments matching that filter. The response format is identical to the webhook format in the notification process.

Example:

[
    {
        "payment_token": "prN[...]Pfd",
        "session_token": "wWk[...]0L5",
        "merchant_order_id": "oc1234566",
        "merchant_amount": 1,
        "merchant_currency": "CLP",
        "user_bank": "Banco de prueba",
        "user_rut": "111111111",
        "user_account": "Cuenta Corriente 12345678",
        "payment_status": "success",
        "payment_date": "31-01-2022 18:07:34",
        "validationWeb": true,
        "validationMail": false,
        "reason": "",
        "code": "",
        "confirmated_at": ""
    }
]

Back to TNB Integration with API Rest