Perform a test purchase with PSE
To test your integration with PSE you'll need to create an order. This means you can only verify your integration through the bank simulator in the sandbox environment, and not by simulating a purchase. In this environment, you can select a payment scenario to test your integration flow.
To perform these tests, send the following request to the /v1/ordersAPI endpoint, along with your test Access TokenPrivate key of the application created in Mercado Pago, that must be used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials.. When using test credentials, you will be automatically redirected to the sandbox environment flow.
curl
curl --location --request POST 'https://api.mercadopago.com/v1/orders' \ -H 'Authorization: Bearer <YOUR_TEST_ACCESS_TOKEN>' \ -H 'X-Idempotency-Key: <SOME_UNIQUE_VALUE>' \ -H 'Content-Type: application/json' \ -d '{ "type": "online", "total_amount": "5000", "external_reference": "ext_ref_1234", "processing_mode": "automatic", "expiration_time": "PT20M", "payer": { "email": "test_user_co@testuser.com", "entity_type": "individual", "identification": { "type": "CC", "number": "76262349" }, "first_name": "John", "last_name": "Doe", "phone": { "area_code": "57", "number": "3001234567" }, "address": { "street_name": "Calle 10", "street_number": "100", "city": "Bogota", "zip_code": "110111", "neighborhood": "Centro" } }, "transactions": { "payments": [ { "amount": "5000", "payment_method": { "id": "pse", "type": "bank_transfer", "financial_institution": "1051" } } ] }, "additional_info": { "payer.ip_address": "200.100.50.25" }, "config": { "online": { "callback_url": "https://merchant.com/pse/return" } } }'
The response will return a status of action_required with status_detail=waiting_transfer, along with the redirect_url for the buyer to complete the payment at the bank.
json
{ "id": "ORDOMG01KNSWP75YHQJ9EKKB13QCFF25", "total_amount": "5000", "total_paid_amount": "0", "status": "action_required", "status_detail": "waiting_transfer", "config": { "online": { "callback_url": "https://merchant.com/pse/return" } }, "transactions": { "payments": [ { "payment_method": { "id": "pse", "type": "bank_transfer", "financial_institution": "1051", "redirect_url": "https://www.mercadopago.com.co/sandbox/payments/156166999227/bank_transfer?caller_id=2676136474&hash=6df616a0-69cc-485b-a3be-f301a02dfd7a&from_pse=true" } } ] } }
The returned redirect_url is the one that, in production environments, you will use to redirect the buyer to complete the transfer. In sandbox, this URL opens the Mercado Pago bank simulator, which allows you to test different payment scenarios.
After the redirection to the redirect_url, the bank simulation flow will proceed as follows:
- First, the simulator will display the authentication page for the test bank ("Banco Prueba PSE", for example). To proceed, enter any username and password.

- After logging in, the next screen will display the transaction details: its identifier, the payment identifier, the order date, the payment platform URL, and the amount to be paid.

- The dropdown menu will display all available test scenarios, including approval, abandonment, inactive account, insufficient funds, and others. Select the scenario you want to simulate and click Enviar.

- After selecting the scenario and submitting, the screen will display the transaction result. Click Volver al comercio to continue the flow.

- Finally, the user will be redirected to the Mercado Pago ticket page and then automatically to the
callback_urlconfigured when creating the order.

Finally, to verify that the test purchase was carried out correctly, send a GET request to the /v1/orders/{id}API endpoint, replacing id with the order identification received in the response to its creation.
Ready! Once these steps are completed, the integration of PSE as a payment method is complete, and you can either continue testing other integrated payment methods, or go to production.