# MD for: https://www.mercadopago.com.co/developers/pt/docs/checkout-api-orders/integration-test/pse.md \# 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. :::AccordionComponent{title="Create test order"} To perform these tests, send the following request to the :TagComponent{tag="API" text="/v1/orders" href="/developers/en/reference/online-payments/checkout-api/create-order/post"} endpoint, along with your :toolTipComponent\[test Access Token\]{content="Private 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\*. The test Access Token starts with the prefix \`APP\_USR\`."}. 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 ' \\ -H 'X-Idempotency-Key: ' \\ -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. ::: :::AccordionComponent{title="Simulate the payment in sandbox"} After the redirection to the \`redirect\_url\`, the bank simulation flow will proceed as follows: 1\. First, the simulator will display the authentication page for the test bank ("Banco Prueba PSE", for example). To proceed, \*\*enter any username and password\*\*. !\[Banco Prueba PSE — login screen\](https://www.mercadopago.com.co/images/api-orders/pse-sandbox-login-v1.png) 2\. 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. !\[Banco Prueba PSE — payment information\](https://www.mercadopago.com.co/images/api-orders/pse-sandbox-payment-info-v1.png) 3\. 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\*\*. !\[Banco Prueba PSE — available scenarios\](https://www.mercadopago.com.co/images/api-orders/pse-sandbox-dropdown-v1.png) 4\. After selecting the scenario and submitting, the screen will display the transaction result. Click \*\*Volver al comercio\*\* to continue the flow. !\[Banco Prueba PSE — transaction result\](https://www.mercadopago.com.co/images/api-orders/pse-sandbox-result-v1.png) 5\. Finally, the user will be redirected to the Mercado Pago \_ticket\_ page and then automatically to the \`callback\_url\` configured when creating the order. !\[Mercado Pago — confirmation ticket\](https://www.mercadopago.com.co/images/api-orders/pse-sandbox-ticket-v1.png) ::: :::AccordionComponent{title="Verify the purchase status"} Finally, to verify that the test purchase was carried out correctly, send a \*\*GET\*\* request to the :TagComponent{tag="API" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get"} 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\](https://www.mercadopago.com.co/developers/en/docs/checkout-api-orders/go-to-production).