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 ID | Alfanumeric |
|
| Merchant Operation number | Alfanumeric |
|
| Unique transaction identifier. It is used only to perform transaction queries. | Alfanumeric |
|
Headers
For all payment methods, the following parameters will be sent in the request header:
Field | Description | Accepted Value | Type |
|---|---|---|---|
| Identification token for API usage previously created in Oauth API | Alfanumeric |
|
RESPONSE
Operation
Field | Description | Accepted Value | Type | Madatory |
|---|---|---|---|---|
| Indicates whether the process was successful | Alfanumeric:
|
| YES |
| Merchant ID | Alfanumeric |
| YES |
| Object containing the details of the operation |
|
| YES |
| Merchant order number of the operation that was cancelled or extended | Numeric greater than or equal to 6 digits |
| YES |
| Transaction amount | Numeric |
| YES |
| Transaction currency code | Numeric |
| YES |
| Date and time of operation creation | Date and Time |
| YES |
| Current status of the operation |
|
| YES |
| Additional data of the transaction that was sent at the time of authorization |
|
| YES |
| Array containing the list of transactions performed on the operation. |
|
| YES |
| Unique transaction identifier | Alfanumeric |
| YES |
| Current status of the transaction |
|
| YES |
| Transaction amount | Numeric |
| YES |
| Transaction currency code | Numeric |
| YES |
| Transaction currency code | Date and Time |
| YES |
| Date and Time of transaction authorization | Date and Time |
| YES |
| Transaction expiration date and time | Date and Time |
| YES |
| Object containing information about the payment method used in the transaction. |
|
| YES |
| Name of the payment method used in the transaction | Alfanumeric |
| YES |
| Array containing a list of the statuses through which the transaction has passed |
|
| YES |
| Object containing metadata of the executed flow |
|
| YES |
| Object containing the result of the executed flow |
|
| YES |
| Code representing the result of the executed flow | Numeric |
| YES |
| Object that contains the message resulting from the flow. |
|
| YES |
| Language-level locale for the message of the executed stream | Alfanumeric |
| YES |
| Message resulting from the executed flow | Alfanumeric |
| YES |
Example
{
"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
{
"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"
}
]
}
}
}