PagoEfectivo
POST https://api-sandbox.letpay.io/pagoEfectivo/simple
Overview
This process is designed to facilitate PagoEfectivo payments in Peru, optimizing user experience and conversion rates. It allows your customers to make payments quickly and securely by generating a payment code (CIP) or a QR code, which can be paid through various channels such as banking apps, websites, or a network of authorized agents.
The process offers:
- Immediate display of a CIP (Código de Identificación de Pago) and QR code to the payer, providing a simple and widely-used payment method in Peru, which contributes to a higher conversion rate.
- To use this process, simply send the required fields as indicated in the documentation.
Minimum and Maximum Amounts
Payment Method | Financial institutions | Minimum Amount | Maximum Amount |
---|---|---|---|
Online | BCP, BBVA, Interbank, Scotiabank, Caja Tacna, Caja Trujillo, Caja Huancayo, Caja Arequipa | PEN 1.00 | Up to PEN 30,000.00 |
Cash | BCP, BBVA, Interbank, Scotiabank, Caja Tacna, Caja Trujillo, Caja Huancayo, Caja Arequipa, Banco Ripley, Entidad Financeira Raíz, Western Union, Leon XIII, Norandino, Banco Pichincha, Caja Los Anges, Caja Del Santa, QAPAQ | PEN 1.00 | Up to PEN 30,000.00 |
Cash | Caja Paita, Scotiabank, Kasnet, Tambo, BCP Agente, BBVA Agente, Interbank Agente, Banco Azteca | PEN 1.00 | Up to PEN 1,800.00 |
Loan Money | Cuotéalo | PEN 1.00 | Up to PEN 7,200.00 |
Reference Checkout UI PagoEfectivo
PagoEfectivo Flow
Authorization
Header | Value |
---|---|
X-Auth-Token | MY_ACCESS_TOKEN |
Request description
contract_id
(required/string): Merchant's contract id.notification_url
(required/string): URL to post callbacks to this payment.reference_id
(required/string/max 45 chars): External code created by the merchant to reference this payment (e.g. order number).payment
(required/object): The payment data:amount
(required/float): Total amount of the payment. Value must have a maximum of two decimal places.asset
(required/string): Reference code for asset for the sale's amount.country
(required/string): Country code in ISO 3166-2.currency
(required/string): Currency code in ISO-4217.pago_efectivo
(optional/object): The PagoEfectivo description:expiration_date
(optional/string): The expiration date for the payment CIP/QR code in YYYY-MM-DD format.
person
(required/object): The person data:email
(required/string): Person’s email provided to the merchant.
Response Description
transaction_status
(string): Current status of the payment.payment_token
(string): Unique payment identification for this payment.reference_id
(string): External code created by the merchant to reference this payment (e.g. order number).qr_code
(string): Base64 encoded zipped PNG image of the QR code.cip_code
(string): The payment code generated for the transaction.amount
(string): Amount of this payment.expiration_date
(string): The expiration date and time for the payment.totals
(object): The payment totals.amount
(float): Amount in default region asset.asset
(string): Asset used in this amount.original_amount
(float): Amount as informed by merchant.original_asset
(string): Asset used in this originalAmount.customer_fees
(float): Total calculated fee assigned to customer.customer_amount
(float): Total amount for customer (amount + customer_fees).asset
(required/string): Reference code for asset for the sale's amount.
customer_fees
(object): List of incident customer fees and respective values.auxiliary_url
(string): URL to a hosted page with payment instructions.refresh_token
(string): Updated access token for future calls.
Example Request
- 200 - Success
- 400 - Bad Request
- 401 - Unauthorized
- 422 - Unprocessable Entity
- 502 - Bad Gateway
Example Request
200 - Success
curl --location 'https://api-sandbox.letpay.io/bankTransfer/simple' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"contract_id": "MY_CONTRACT_ID",
"notification_url": "https://my.notification.url/callback/",
"reference_id": "MY_REFERENCE_ID",
"payment": {
"amount": 100.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"pago_efectivo": {
"expiration_date": "2024-12-31"
}
},
"person": {
"email": "[email protected]"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"transaction_status": "PROCESSING",
"payment_token": "a19ceaa4-a595-4593-a755-b31af6825df3",
"reference_id": "MY_REFERENCE_ID",
"qr_code": "BASE64_ZIPPED_PNG",
"cip_code": "1920180",
"amount": "100.00",
"expiration_date": "2025-08-22T19:34:06",
"totals": {
"amount": 100,
"original_amount": 100,
"original_asset": "PEN",
"customer_fees": 0,
"customer_amount": 100,
"asset": "PEN"
},
"customer_fees": {},
"auxiliary_url": "https://pre1a.payment.pagoefectivo.pe/D4860AA1-9B16-45D9-A23B-EFB4FAF4C060.html",
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
400 - Bad Request
curl --location 'https://api-sandbox.letpay.io/bankTransfer/simple' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"contract_id": "MY_CONTRACT_ID",
"notification_url": "https://my.notification.url/callback/",
"reference_id": "MY_REFERENCE_ID",
"payment": {
"amount": 100.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"pago_efectivo": {
"expiration_date": "2024-12-31"
}
},
"person": {
"email": "[email protected]"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:54:57.880+0000",
"status": 400,
"error": "Bad Request",
"path": "/pagoEfectivo/simple",
"errors": [
{
"code": "00.01.0044",
"description": "person.tax_id: invalid tax ID number"
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
401 - Unauthorized
curl --location 'https://api-sandbox.letpay.io/bankTransfer/simple' \
--header 'X-Auth-Token: INVALID_ACCESS_TOKEN' \
--data-raw '{
"contract_id": "MY_CONTRACT_ID",
"notification_url": "https://my.notification.url/callback/",
"reference_id": "MY_REFERENCE_ID",
"payment": {
"amount": 100.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"pago_efectivo": {
"expiration_date": "2024-12-31"
}
},
"person": {
"email": "[email protected]"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T15:35:10.131+0000",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/pagoEfectivo/simple"
}
Example Request
422 - Unprocessable Entity
curl --location 'https://api-sandbox.letpay.io/bankTransfer/simple' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"contract_id": "MY_CONTRACT_ID",
"notification_url": "https://my.notification.url/callback/",
"reference_id": "MY_REFERENCE_ID",
"payment": {
"amount": 100.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"pago_efectivo": {
"expiration_date": "2024-12-31"
}
},
"person": {
"email": "[email protected]"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:50:25.715+0000",
"status": 422,
"error": "Unprocessable Entity",
"path": "/pagoEfectivo/simple",
"errors": [
{
"code": "00.01.0021",
"description": "Invalid contract / project"
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}
Example Request
502 - Bad Gateway
curl --location 'https://api-sandbox.letpay.io/bankTransfer/simple' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data-raw '{
"contract_id": "MY_CONTRACT_ID",
"notification_url": "https://my.notification.url/callback/",
"reference_id": "MY_REFERENCE_ID",
"payment": {
"amount": 100.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"pago_efectivo": {
"expiration_date": "2024-12-31"
}
},
"person": {
"email": "[email protected]"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:12:28.156+0000",
"status": 502,
"error": "Bad Gateway",
"path": "/pagoEfectivo/simple",
"errors": [
{
"code": "00.03.0001",
"description": "There was an issue when contacting an external API, please contact support"
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}