Bank Transfer
POST https://api-sandbox.letpay.io/bankTransfer/simple
Overview
This process is designed to facilitate bank transfers
in Peru, optimizing user experience and conversion rates. It allows your customers to make payments quickly and securely, integrating efficiently with local requirements.
The process offers:
- Immediate display of payment information to the payer, without the need for complex preliminary data collection, which contributes to a higher conversion rate. To use this process, simply send the required fields as indicated in the documentation.
- Utilization of the payer's
DNI
(Documento Nacional de Identidad) orRUC
(Registro Único de Contribuyentes) linked to the transaction. It's recommended that merchants have already collected this data beforehand. However, there's an option to collect it on the checkout page – although this approach might result in a slightly lower conversion rate, it can be advantageous in specific scenarios depending on your business needs. To use this process, send the payer'sDNI
orRUC
in thetax_id
field, and specifyDNI
orRUC
in thetax_id_type
field accordingly. You should also include the payer'semail
. If thetax_id
is invalid, the transaction may be declined.
Minimum and Maximum Amounts
Financial institution | Minimum Amount | Maximum Amount |
---|---|---|
BBVA | 1 PEN | No maximum |
BCP | 1 PEN | No maximum |
Interbank | 1 PEN | 30000 PEN |
Yape | 1 PEN | Daily: 2000 PEN |
Yape | 1 PEN | Monthly: 6000 PEN |
BanBif | 1 PEN | 19000 PEN |
Banco Pichincha | 1 PEN | 19000 PEN |
Caja Arequipa | 2 PEN | 43000 PEN |
Caja Huancayo | 2 PEN | 43000 PEN |
Caja Tacna | 2 PEN | 43000 PEN |
Caja Trujillo | 2 PEN | 43000 PEN |
Scotiabank | 2 PEN | 4000 PEN |
Reference Checkout UI Bank Transfer
Select Banking Institution
Redirect URL to the Bank Page
Bank Transfer 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).ip_address
(optional/string): Remote IP Address(IPv4/IPv6).return_url
(optional/string): Return URL to redirect user.extra_data
(optional/object): If you want to send extra data in your request.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.bank_transfer
: (optional/object): The bank transfer description:description
(optional/string): Descriptor to use at transaction.
person
(required/object): The person data:email
(required/string): Person’s email provided to the merchant.full_name
(optional/string): Person’s full name.tax_id
(required/string): Unique identifier for this person in country tax system.tax_id_type
(required/enum): Type of identifier for this person in country tax system (e.g. in Peru: RUC). Valid options:RUC
,DNI
,PAS
,CE
.
Response Description
transaction_status
(string): Current status of the payment.payment_token
(string): Unique payment identification for this payment.refresh_token
(string): Updated access token for future calls.reference_id
(string): External code created by the merchant to reference this payment (e.g. order number).amount
(string): Amount of this payment.redirect_url
(string): The redirect url.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).
customer_fees
(object): List of incident customer fees and respective values.
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",
"ip_address": "1.1.1.1",
"return_url": "https://my.site.com",
"extra_data": {},
"payment": {
"amount": 1000.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"bank_transfer": {
"description": "teste"
}
},
"person": {
"email": "[email protected]",
"full_name": "Alice Sonnentag",
"tax_id": "103008875",
"tax_id_type": "RUC"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"transaction_status": "PROCESSING",
"payment_token": "MY_PAYMENT_TOKEN",
"reference_id": "MY_REFERENCE_ID",
"redirect_url": "BANK_TRANSFER_URL",
"amount": "1000.00",
"totals": {
"amount": 1000,
"original_amount": 1000,
"original_asset": "PEN",
"customer_fees": 0,
"customer_amount": 1000,
"asset": "PEN"
},
"customer_fees": {},
"refresh_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",
"ip_address": "1.1.1.1",
"return_url": "https://my.site.com",
"extra_data": {},
"payment": {
"amount": 1000.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"bank_transfer": {
"description": "teste"
}
},
"person": {
"email": "[email protected]",
"full_name": "Alice Sonnentag",
"tax_id": "103008875",
"tax_id_type": "RUC"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:54:57.880+0000",
"status": 400,
"error": "Bad Request",
"path": "/bankTransfer/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",
"ip_address": "1.1.1.1",
"return_url": "https://my.site.com",
"extra_data": {},
"payment": {
"amount": 1000.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"bank_transfer": {
"description": "teste"
}
},
"person": {
"email": "[email protected]",
"full_name": "Alice Sonnentag",
"tax_id": "103008875",
"tax_id_type": "RUC"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T15:35:10.131+0000",
"status": 401,
"error": "Unauthorized",
"message": "Access Denied",
"path": "/bankTransfer/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",
"ip_address": "1.1.1.1",
"return_url": "https://my.site.com",
"extra_data": {},
"payment": {
"amount": 1000.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"bank_transfer": {
"description": "teste"
}
},
"person": {
"email": "[email protected]",
"full_name": "Alice Sonnentag",
"tax_id": "103008875",
"tax_id_type": "RUC"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:50:25.715+0000",
"status": 422,
"error": "Unprocessable Entity",
"path": "/bankTransfer/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",
"ip_address": "1.1.1.1",
"return_url": "https://my.site.com",
"extra_data": {},
"payment": {
"amount": 1000.00,
"asset": "PEN",
"country": "PE",
"currency": "PEN",
"bank_transfer": {
"description": "teste"
}
},
"person": {
"email": "[email protected]",
"full_name": "Alice Sonnentag",
"tax_id": "103008875",
"tax_id_type": "RUC"
}
}'
Example Response
Header
Content-Type: application/json
Body
{
"timestamp": "2024-01-16T20:12:28.156+0000",
"status": 502,
"error": "Bad Gateway",
"path": "/bankTransfer/simple",
"errors": [
{
"code": "00.03.0001",
"description": "There was an issue when contacting an external API, please contact support"
}
],
"refresh_token": "MY_ACCESS_TOKEN"
}