Botón Bancolombia
With Mercado Pago Checkout API you can offer payments with Botón Bancolombia, a payment method that allows you to make purchases and payments over the internet by debiting funds directly from Bancolombia savings or checking accounts.
To offer payments with Botón Bancolombia, follow the steps below.
Create payment
Server-Side
To start the Botón Bancolombia implementation process, you need to create a payment. You can do this by calling our API or using one of our SDKs.
At this stage you must use your production Access Token.
Send a POST to Create paymentAPI with the parameters described in the table and execute the request.
curl
curl --location 'https://api.mercadopago.com/v1/payments' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ --header 'X-Idempotency-Key: <SOME_UNIQUE_VALUE>' \ --data-raw '{ "payer": { "email": "<PAYER_EMAIL>" }, "point_of_interaction": { "type": "CHECKOUT" }, "payment_method_id": "boton_bancolombia", "transaction_amount": <TRANSACTION AMOUNT>, "description": "<DESCRIPTION>", "callback_url" : "<CALLBACK_URL>" }'
| Field | Type | Description |
Authorization | string | Header with the production Access Token. |
X-Idempotency-Key | string | Header with a unique value per request to avoid duplicate payments. |
payer.email | string | Buyer's email. |
point_of_interaction.type | string | Type of point of interaction. For Botón Bancolombia it must be CHECKOUT. |
payment_method_id | string | Payment method ID. For Botón Bancolombia use boton_bancolombia. |
transaction_amount | integer | Transaction amount. The minimum amount must be COP 1000 and the maximum up to COP 30000000. |
description | string | Description of the payment that the buyer will see. |
callback_url | string | Seller's site URL, to which Bancolombia will redirect the buyer once they complete the transaction. |
Configure return URL
Server-Side
The return URL is where the user is redirected after completing the payment, whether successful, failed or pending. This URL must be a web page you control, such as a server with a named domain (DNS).
To configure it, fill in the CALLBACK_URL value when creating the payment with a redirect URL.
Once you have created the payment, you must execute the request.
Redirect the buyer
Client-Side
To complete the payment, the buyer must be redirected to Bancolombia. To do this, on the frontend of your integration you must provide a payment button for the buyer. It must redirect to the URL returned in the response in the data.external_resource_url parameter.
Below is an example of the response.
json
{ "id": 135212232104, ... "payment_method_id": "boton_bancolombia", "payment_type_id": "bank_transfer", "callback_url": "<CALLBACK_URL>" "payment_method": { "id": "boton_bancolombia", "type": "bank_transfer", "data": { "external_resource_url": "<REDIRECT_URL>" } }, "status": "pending", ... }
Confirm payment status
Server-Side
To complete the process, you must check the payment status. It is created with a pending status ("status": "pending") and will keep it until the payer completes the process. Once the payment is made, the status will change to approved ("status": "approved").
To confirm the payment status, send a GET to Get paymentAPI replacing the id value with the ID of the payment to query.
curl
curl -X GET \ 'https://api.mercadopago.com/v1/payments/{id}'\ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
Payment expiration
Each payment created for Botón Bancolombia automatically expires within 12 minutes of being generated and its status changes to rejected ("status": "rejected"). If the buyer does not access the page and complete the payment within that time, you will need to generate a new one.