Skip to main content
Skip table of contents

Query API

The Query API allows you to query a transaction previously generated by the Authorization API.

REQUEST

Path

Method: GET

URL: {{base}}/charges/{{merchant_code}}/{{merchant_operation_number}}/{{transaction_id}}

Field

Description

Accepted Value

Type

merchant_code

Merchant ID

Alfanumeric

String

merchant_operation_number

Merchant Operation number

Alfanumeric

String

transaction_id

Unique transaction identifier. It is used only to perform transaction queries.

Alfanumeric

String

Headers

For all payment methods, the following parameters will be sent in the request header:

Field

Description

Accepted Value

Type

Authorization

Identification token for API usage previously created in Oauth API

Alfanumeric

String

RESPONSE

Operation

Field

Description

Accepted Value

Type

Madatory

success

Indicates whether the process was successful

Alfanumeric:

  • true

  • false

String

YES

merchant_code

Merchant ID

Alfanumeric

String

YES

operation

Object containing the details of the operation

 

Object

YES

operation.merchant_operation_number

Merchant order number of the operation that was cancelled or extended

Numeric greater than or equal to 6 digits

String

YES

operation.amount

Transaction amount

Numeric

String

YES

operation.currency

Transaction currency code

Numeric

String

YES

operation.created_at

Date and time of operation creation

Date and Time

String

YES

operation.state

Current status of the operation

  • REGISTRADO

  • PENDIENTE

  • AUTORIZADO

  • CANCELADO

  • EXPIRADO

  • LIQUIDADO

  • DEPOSITADO

String

YES

operation.additional_fields

Additional data of the transaction that was sent at the time of authorization

 

JSON

YES

operation.transactions

Array containing the list of transactions performed on the operation.

 

Array

YES

operation.transactions.[].transaction_id

Unique transaction identifier

Alfanumeric

String

YES

operation.transactions.[].state

Current status of the transaction

  • REGISTRADO

  • PENDIENTE

  • AUTORIZADO

  • CANCELADO

  • EXPIRADO

  • LIQUIDADO

  • DEPOSITADO

String

YES

operation.transactions.[].amount

Transaction amount

Numeric

String

YES

operation.transactions.[].currency

Transaction currency code

Numeric

String

YES

operation.transactions.[].created_at

Transaction currency code

Date and Time

String

YES

operation.transactions.[].authorize_at

Date and Time of transaction authorization

Date and Time

String

YES

operation.transactions.[].expired_at

Transaction expiration date and time

Date and Time

String

YES

operation.transactions.[].payment_method

Object containing information about the payment method used in the transaction.

 

Object

YES

operation.transactions.[].payment_method.method_name

Name of the payment method used in the transaction

Alfanumeric

String

YES

operation.transactions.[].lifecycle

Array containing a list of the statuses through which the transaction has passed

 

Array

YES

meta

Object containing metadata of the executed flow

 

Object

YES

meta.status

Object containing the result of the executed flow

 

Object

YES

meta.status.code

Code representing the result of the executed flow

Numeric

String

YES

meta.status.message_ilgn

Object that contains the message resulting from the flow.

 

Object

YES

meta.status.message_ilgn.[].locale

Language-level locale for the message of the executed stream

Alfanumeric

String

YES

meta.status.message_ilgn.[].value

Message resulting from the executed flow

Alfanumeric

String

YES

Example

JSON
{
    "success": true,
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "operation": {
        "merchant_operation_number": "2391645",
        "amount": "15000",
        "currency": "604",
        "created_at": "2024-01-17T17:27:30.705256+00:00",
        "state": "AUTORIZADO",
        "additional_fields": null,
        "transactions": [
            {
                "transaction_id": "5hk8rwa3h3cq9oyfs3a28v1ms",
                "state": "AUTORIZADO",
                "amount": "15000",
                "currency": "604",
                "created_at": "2024-01-17T17:27:30.715473+00:00",
                "authorize_at": null,
                "expired_at": null,
                "payment_method": {
                    "method_name": "CARD"
                },
                "lifecycle": [
                    {
                        "lifecycle_id": "776b6c17-fe8a-4c43-b4be-4e200028f5dc",
                        "state": "REGISTRADO",
                        "date": "2024-01-17T17:27:30.715512+00:00"
                    },
                    {
                        "lifecycle_id": "03b28172-4a2b-4541-8dbc-a8dd487a8ff4",
                        "state": "PENDIENTE",
                        "date": "2024-01-17T17:27:30.747792+00:00"
                    },
                    {
                        "lifecycle_id": "7283b732-dd6f-4ea1-9d70-71f8f1f85164",
                        "state": "AUTORIZADO",
                        "date": "2024-01-17T17:27:46.218381+00:00"
                    }
                ]
            }
        ]
    },
    "meta": {
        "status": {
            "code": "00",
            "message_ilgn": [
                {
                    "locale": "es_PE",
                    "value": "Se proceso correctamente"
                }
            ]
        }
    }
}

Transaction

The same response as the Operation will be returned, but only with a Transaction inside "transactions".

Example

JSON
{
    "success": true,
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "operation": {
        "merchant_operation_number": "2391645",
        "amount": "15000",
        "currency": "604",
        "created_at": "2024-01-17T17:27:30.705256+00:00",
        "state": "AUTORIZADO",
        "additional_fields": null,
        "transactions": [
            {
                "transaction_id": "5hk8rwa3h3cq9oyfs3a28v1ms",
                "state": "AUTORIZADO",
                "amount": "15000",
                "currency": "604",
                "created_at": "2024-01-17T17:27:30.715473+00:00",
                "authorize_at": null,
                "expired_at": null,
                "payment_method": {
                    "method_name": "CARD"
                },
                "lifecycle": [
                    {
                        "lifecycle_id": "776b6c17-fe8a-4c43-b4be-4e200028f5dc",
                        "state": "REGISTRADO",
                        "date": "2024-01-17T17:27:30.715512+00:00"
                    },
                    {
                        "lifecycle_id": "03b28172-4a2b-4541-8dbc-a8dd487a8ff4",
                        "state": "PENDIENTE",
                        "date": "2024-01-17T17:27:30.747792+00:00"
                    },
                    {
                        "lifecycle_id": "7283b732-dd6f-4ea1-9d70-71f8f1f85164",
                        "state": "AUTORIZADO",
                        "date": "2024-01-17T17:27:46.218381+00:00"
                    }
                ]
            }
        ]
    },
    "meta": {
        "status": {
            "code": "00",
            "message_ilgn": [
                {
                    "locale": "es_PE",
                    "value": "Se proceso correctamente"
                }
            ]
        }
    }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.