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/ordersPOST endpoint, along with your test Access TokenPrivate key linked to an application, used in the backend to authenticate operations in the test environment. You can find it in the application's Credentials section, within the test environment. It cannot process real payments, must never be exposed in the frontend, and starts with the `APP_USR` prefix.. When using test credentials, you will be automatically redirected to the sandbox environment flow.
curlcurl --location --request POST 'https://api.mercadopago.com/v1/orders' \ -H 'Authorization: Bearer {{YOUR_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_payer@example.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 request to the /v1/orders/{id}GET endpoint, replacing id with the order identification received in the response to its creation.
Alternatively, you can check the payment result from your application. To do so, go to Integrations and select the application card. Make sure the selector at the top is set to Test and, on the Home screen, select the Test payments tab. Then, find the payment and click it to view its details and status.
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.