PSE
Bank Transfer using PSE
PSE (Pagos Seguros en Línea) is a widely used online payment system in Colombia. It enables secure electronic transactions by allowing users to make payments directly from their bank accounts. There are two possible payment flows:
First flow:
A URL is provided to the user, who can access it to select their preferred bank to complete the payment. Then, they are automatically redirected to the selected bank’s website.Second flow:
Initially, the get bank list operation is used to retrieve the available bank list. This list can be displayed during the merchant’s checkout process. During the purchase processing, the necessary data is sent to redirect the user directly to their preferred bank using the additional fields in the request.
Request Parameters - Bank Selection URL Flow
You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.
Property | Type | Mandatory? | Description |
---|---|---|---|
PaymentMethod | string | Yes | Find the value in the table Payment Method. |
TargetCountryISO | string | Yes | Indicate the destination country. |
Customer → Email | string | Yes | Customer’s email. |
Customer → FirstName | string | No | Customer’s first name. |
Customer → LastName | string | No | Customer’s last name. |
Customer → DocumentType | string | Yes | Customer’s document type. Refer to the Document types table to see the possible values. |
Customer → DocumentNumber | string | Yes | Customer’s Document Number. |
Customer → PhoneNumber | string | Yes | Customer’s phone number. |
Customer → Address → Country | string | Yes | Customer’s Country. |
Customer → Address → State | string | Yes | Customer’s State. |
Customer → Address → City | string | Yes | Customer’s City. |
Customer → Address → AddressDetail | string | Yes | Customer’s Address Detail. |
Customer → Address → PostalCode | string | No | Customer’s Postal Code. |
Redirection → Url_Approved | string | No | Callback URL when the purchase status is Approved . |
Redirection → Url_Rejected | string | No | Callback URL when the purchase status is Rejected . |
Redirection → Url_Canceled | string | No | Callback URL when the purchase status is Canceled . |
Redirection → Url_Pending | string | No | Callback URL when the purchase status is Pending . |
Redirection → Url_Notify | string | No | Webhook notification URL. The Purchase status is notified to this URL once the payment method processor notifies Bamboo. The notification to this URL is a REST POST with JSON payload instead of redirection. It can also be static and configured by Support Team. |
Additional Parameters - Direct Bank URL Flow
Property | Type | Mandatory? | Description |
---|---|---|---|
MetaDataIn → financialInstitutionCode | string | No | Bank code where the transaction will take place. This code must be previously obtained from the bank list endpoint. |
MetaDataIn → personType | string | No | Represents the type of person performing the transaction. Possible values: 1 → Natural Person (individuals).2 → Legal Person (companies). |
MetaDataIn → identificationType | string | No | User identification type for the transaction. Possible values: RegistroCivilDeNacimiento TarjetaDeIdentidad CedulaDeCiudadania TarjetaDeExtranjeria CedulaDeExtranjeria Pasaporte DocumentoDeIdentificacionExtranjero NIT |
The purchase status for Alternative Payment methods will remain Pending until the customer completes the payment.
Request example
{
"PaymentMethod": "PSE",
"Order": "CH2023-001",
"Amount": 100000,
"Currency": "COP",
"Description": "Purchase Test",
"TargetCountryISO": "CO",
"Customer": {
"Address": {
"Country": "COL",
"State": "Antioquia",
"City": "Medellin",
"AddressDetail": "Cra 45 # 76B Sur - 57"
},
"FirstName": "Miguel",
"LastName": "Moreno",
"DocumentNumber": "52960268",
"DocumentType": "CC.CO",
"PhoneNumber":"3188060418",
"Email": "mmoreno@mail.com"
},
"Redirection": {
"Url_Approved": "https://dummystore.com/checkout/response",
"Url_Rejected": "https://dummystore.com/checkout/response",
"Url_Canceled": "https://dummystore.com/checkout/response",
"Url_Pending": "https://dummystore.com/checkout/response"
}
}
Response parameters
We return the Purchase
with the status Pending for Redirection and a Action
object with Reason
as REDIRECTION_NEEDED_EXTERNAL_SERVICE
and the URL
parameter with the external service URL. You must redirect the customer to this URL to finish the payment following the PSE flow. In this flow, your payer selects their bank, choose whether they are a Natural or Legal person and their document type.
If a specific bank is sent, obtained and selected from the get bank list operation, the redirection will lead directly to the selected bank’s website.
According to the result of the transaction, the payer will be directed to the URL defined in the Redirection
object. For more information on the response parameters, please refer to the Response parameters section of the Purchase creation.
Response example
{
"TransactionId": "79632697147789184",
"Result": "ACTION_REQUIRED",
"Status": "PENDING",
"ErrorCode": null,
"ErrorDescription": null,
"Created": "2024-08-07T17:51:54.620",
"AuthorizationDate": null,
"AuthorizationCode": null,
"Amount": 100000,
"Currency": "COP",
"TaxableAmount": null,
"Tip": null,
"Url": "https://api.stage.bamboopayment.com/Purchase/79632697147789184",
"MetadataOut":null,
"Action": {
"SessionId": "CA_cc155768-74d9-4efd-8e55-42411b4dd3cf",
"URL": "https://redirect.stage.bamboopayment.com/CA_cc155768-74d9-4efd-8e55-42411b4dd3cf",
"Reason": "REDIRECTION_NEEDED_EXTERNAL_SERVICE"
},
"PaymentMethod": {
"Brand": "PseAvanza",
"CardOwner": null,
"Bin": null,
"IssuerBank": null,
"Type": "BankTransfer",
"Expiration": null,
"Last4": null
}
}
Bank List Retrieval Endpoint
- Production:
https://pse.prod.bamboopayment.com/api/Bank/GetBanks
- Stage:
https://pse.stage.bamboopayment.com/api/Bank/GetBanks
Response Example
[
{
"code": 0,
"name": "A continuación seleccione su banco"
}, {
"code": 1815,
"name": "ALIANZA FIDUCIARIA"
}, {
"code": 1558,
"name": "BAN100"
}, {
"code": 15580,
"name": "BAN100QA"
},
...
]
Response example for a specific bank
{
"PaymentMethod": "PSE",
"Order": "CH2023-001",
"Amount": 100000,
"Currency": "COP",
"Description": "Purchase Test",
"TargetCountryISO": "CO",
"Customer": {
"Address": {
"Country": "COL",
"State": "Antioquia",
"City": "Medellin",
"AddressDetail": "Cra 45 # 76B Sur - 57"
},
"FirstName": "Miguel",
"LastName": "Moreno",
"DocumentNumber": "52960268",
"DocumentType": "CC.CO",
"PhoneNumber":"3188060418",
"Email": "mmoreno@mail.com"
},
"Redirection": {
"Url_Approved": "https://dummystore.com/checkout/response",
"Url_Rejected": "https://dummystore.com/checkout/response",
"Url_Canceled": "https://dummystore.com/checkout/response",
"Url_Pending": "https://dummystore.com/checkout/response"
},
"MetaDataIn": {
"financialInstitutionCode": "1077",
"personType": "1",
"identificationType": "DocumentoDeIdentificacionExtranjero"
}
}