Authorization API
The Authorization API allows you to generate a transaction depending on the payment method you choose.
REQUEST
Path
Method: POST
URL: {{base}}/charges
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 |
|
Body
Se detalla el request que se usará para todos los métodos de pagos:
Field | Description | Accepted Value | Type | Madatory |
|---|---|---|---|---|
| Action to be taken |
|
| YES |
| Channel where the transaction will be executed |
|
| YES |
| Merchant ID | Alfanumeric |
| YES |
| Merchant order number | Numeric greater than or equal to 6 digits |
| YES |
| Object related to the payment method to be used for authorization. This object varies per payment method |
|
| YES |
| Name of the payment method to be used for authorization. |
|
| YES |
| Object containing information necessary to process the authorization. This object is required and changes depending on the payment method:
|
|
| NO* |
| Object with transaction information |
|
| YES |
| Amount in cents of the transaction. The decimal separation will be applied according to the currency. E.g.: For S/. 10.50, you must send "1050" and in currency "604" for Soles (the link to ISO is missing). | Numeric |
| YES |
| ISO-3 code of the currency of the operation. | Numeric |
| YES |
| Object with information about the customer making the purchase |
|
| NO |
| First Name | Alfanumeric |
| NO |
| Last Name | Alfanumeric |
| NO |
| Alfanumeric |
| NO | |
| Object with phone information |
|
| NO |
| Cellphone country code | Numeric |
| NO |
| Cellphone number | Numeric |
| NO |
| Object with information about the person |
|
| NO |
| Address 1 | Alfanumeric |
| NO |
| Address 2 | Alfanumeric |
| NO |
| City | Alfanumeric |
| NO |
| State | Alfanumeric |
| NO |
| Country | Alfanumeric |
| NO |
| Object with billing information |
|
| YES |
| First Name | Alfanumeric |
| YES |
| Last Name | Alfanumeric |
| YES |
| Alfanumeric |
| YES | |
| Object with phone information |
|
| YES |
| Telephone country code | Numeric |
| YES |
| Telephone country code | Numeric |
| YES |
| Object with information about the person |
|
| YES |
| Address 1 | Alfanumeric |
| YES |
| Address 2 | Alfanumeric |
| NO |
| City | Alfanumeric |
| YES |
| State | Alfanumeric |
| YES |
| Country | Alfanumeric |
| YES |
| Object with shipping information |
| NO | |
| First Name | Alfanumeric |
| NO |
| Last Name | Alfanumeric |
| NO |
| Alfanumeric |
| NO | |
| Object with phone information |
|
| NO |
| Telephone country code | Numeric |
| NO |
| Telephone number | Numeric |
| NO |
| Object with information about the person |
|
| NO |
| Address 1 | Alfanumeric |
| NO |
| Address 2 | Alfanumeric |
| NO |
| City | Alfanumeric |
| NO |
| State | Alfanumeric |
| NO |
| Country | Alfanumeric |
| NO |
RESPONSE
Field | Description | Accepted Value | Type | Obligatorio |
|---|---|---|---|---|
| Indicates whether the process was successful | Alfanumeric |
| YES |
| Action executed. The values it can take are:
| Alfanumeric |
| YES |
| Merchant ID | Alfanumeric |
| YES |
| Merchant order number | Numeric greater than or equal to 6 digits |
| YES |
| Object with transaction information |
| YES | |
| Transaction amount | Numeric |
| YES |
| Transaction status |
|
| YES |
| URL to be displayed to the user/customer to continue the checkout process, returned for the following payment methods:
For certain methods the final answer will be given in Considerations for Redirect methods. | Alfanumeric |
| NO* |
| Currency code of the transaction that was authorized | Numeric |
| YES |
| Amount of the transaction that was authorized. The amount must be in cents. | Numeric |
| YES |
| Object with transaction expiration information. This object is only available for the following payment methods:
|
| NO* | |
| Object with information on when the transaction will expire. |
| NO* | |
| Expiration Date of the transaction in "YYYYY-MM-DD" format. E.g. "2024-01-18". | Alfanumeric |
| NO* |
| Expiration Time of the transaction in 24H format: "HH:MM:SS". E.g. "22:10:25". | Alfanumeric |
| NO* |
| Expiration date time zone | Alfanumeric |
| NO* |
| Date and time, in unixTime (UTC) format, when the transaction will expire. | Numerico | | NO* |
| Object containing detailed result of processing. This object may change depending on the payment method. This field is variable and modifiable over time, take it as a reference.
| | NO | |
| 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 locality for the message of the executed flow. | Alfanumeric | | YES |
| Message resulting from the executed flow | Alfanumeric | | YES |