Skip to main content
Skip table of contents

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

Authorization

Identification token for API usage previously created in Oauth API

Alfanumeric

String

Body

Se detalla el request que se usará para todos los métodos de pagos:

Field

Description

Accepted Value

Type

Madatory

action

Action to be taken

  • authorize

String

YES

channel

Channel where the transaction will be executed

  • ecommerce

String

YES

merchant_code

Merchant ID

Alfanumeric

String

YES

merchant_operation_number

Merchant order number

Numeric greater than or equal to 6 digits

String

YES

payment_method

Object related to the payment method to be used for authorization. This object varies per payment method

 

Object

YES

payment_method.method_name

Name of the payment method to be used for authorization.

  • CARD

  • BANK_TRANSFER

  • CUOTEALO

  • QR

  • YAPE

String

YES

payment_method.method_details

Object containing information necessary to process the authorization. This object is required and changes depending on the payment method:

 

Object

NO*

payment_details

Object with transaction information

 

Object

YES

payment_details.amount

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

String

YES

payment_details.currency

ISO-3 code of the currency of the operation.

Numeric

String

YES

payment_details.customer

Object with information about the customer making the purchase

 

 

NO

payment_details.customer.first_name

First Name

Alfanumeric

String

NO

payment_details.customer.last_name

Last Name

Alfanumeric

String

NO

payment_details.customer.email

Email

Alfanumeric

String

NO

payment_details.customer.phone

Object with phone information

 

Object

NO 

payment_details.customer.phone.country_code

Cellphone country code

Numeric

String

NO 

payment_details.customer.phone.subscriber

Cellphone number

Numeric

String

NO 

payment_details.customer.location

Object with information about the person

 

Object

NO 

payment_details.customer.location.line_1

Address 1

Alfanumeric

String

NO 

payment_details.customer.location.line_2

Address 2

Alfanumeric

String

NO 

payment_details.customer.location.city

City

Alfanumeric

String

NO 

payment_details.customer.location.state

State

Alfanumeric

String

NO 

payment_details.customer.location.country

Country

Alfanumeric

String

NO 

payment_details.billing

Object with billing information

 

Object

YES 

payment_details.billing.first_name

First Name

Alfanumeric

String

YES

payment_details.billing.last_name

Last Name

Alfanumeric

String

YES 

payment_details.billing.email

Email

Alfanumeric

String

YES 

payment_details.billing.phone

Object with phone information

 

Object

YES 

payment_details.billing.phone.country_code

Telephone country code

Numeric

String

YES 

payment_details.billing.phone.subscriber

Telephone country code

Numeric

String

YES 

payment_details.billing.location

Object with information about the person

 

Object

YES 

payment_details.billing.location.line_1

Address 1

Alfanumeric

String

YES 

payment_details.billing.location.line_2

Address 2

Alfanumeric

String

NO 

payment_details.billing.location.city

City

Alfanumeric

String

YES 

payment_details.billing.location.state

State

Alfanumeric

String

YES 

payment_details.billing.location.country

Country

Alfanumeric

String

YES 

payment_details.shipping

Object with shipping information

Object

NO 

payment_details.shipping.first_name

First Name

Alfanumeric

String

NO 

payment_details.shipping.last_name

Last Name

Alfanumeric

String

NO 

payment_details.shipping.email

Email

Alfanumeric

String

NO 

payment_details.shipping.phone

Object with phone information

 

Object

NO 

payment_details.shipping.phone.country_code

Telephone country code

Numeric

String

NO 

payment_details.shipping.phone.subscriber

Telephone number

Numeric

String

NO 

payment_details.shipping.location

Object with information about the person

 

Object

NO 

payment_details.shipping.location.line_1

Address 1

Alfanumeric

String

NO 

payment_details.shipping.location.line_2

Address 2

Alfanumeric

String

NO 

payment_details.shipping.location.city

City

Alfanumeric

String

NO 

payment_details.shipping.location.state

State

Alfanumeric

String

NO 

payment_details.shipping.location.country

Country

Alfanumeric

String

NO 

RESPONSE

Field

Description

Accepted Value

Type

Obligatorio

success

Indicates whether the process was successful

Alfanumeric

String

YES

action

Action executed. The values it can take are:

  • authorize

Alfanumeric

String

YES

merchant_code

Merchant ID

Alfanumeric

String

YES

merchant_operation_number

Merchant order number

Numeric greater than or equal to 6 digits

String

YES

transaction

Object with transaction information

Object

YES

transaction.transaction_id

Transaction amount

Numeric

String

YES

transaction.state

Transaction status

  • PENDIENTE

  • AUTORIZADO

  • DENEGADO

  • INVALIDO

String

YES

transaction.redirect_url

URL to be displayed to the user/customer to continue the checkout process, returned for the following payment methods:

  • CARD (with 3DS Authentication)

  • BANK_TRANSFER

  • CUOTEALO

  • POWERPAY

  • PAGO_EFECTIVO

For certain methods the final answer will be given in Considerations for Redirect methods.

Alfanumeric

String

NO*

transaction.currency

Currency code of the transaction that was authorized

Numeric

String

YES

transaction.amount

Amount of the transaction that was authorized. The amount must be in cents.

Numeric

Object

YES

transaction.expiration

Object with transaction expiration information. This object is only available for the following payment methods:

  • BANK_TRANSFER

  • PAGO_EFECTIVO

  • POWERPAY

  • QR

  • CUOTEALO

Object

NO*

transaction.expiration.date

Object with information on when the transaction will expire.

Object

NO*

transaction.expiration.date.day

Expiration Date of the transaction in "YYYYY-MM-DD" format.

E.g. "2024-01-18".

Alfanumeric

String

NO*

transaction.expiration.date.time

Expiration Time of the transaction in 24H format: "HH:MM:SS".

E.g. "22:10:25".

Alfanumeric

String

NO*

transaction.expiration.date.timezone

Expiration date time zone

Alfanumeric

 

NO*

transaction.expiration.unix_time

Date and time, in unixTime (UTC) format, when the transaction will expire.

Numerico

 Numeric

NO*

transaction.processor_response

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.

 Object

NO

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 locality for the message of the executed flow.

Alfanumeric

 String

YES

meta.status.message_ilgn.[].value

Message resulting from the executed flow

Alfanumeric

 String

YES

JavaScript errors detected

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

If this problem persists, please contact our support.