Test purchase with Fast Payments by Mercado Pago
To test your Fast Payments by Mercado Pago integration via Payment Brick, use a buyer test account with a test card and account money. This account lets you complete test purchases without using real money or data.
The scenarios on this page validate the display of eligible payment methods, buyer authentication, and the delivery of payment data to your integration so it can create the order.
If you have not implemented the solution yet, see the Fast Payments by Mercado Pago integration before starting the tests.
- Go to Integration data and locate the Application number (
application_id) that will be used for testing. - Send the
application_idto your Mercado Pago account executive and request enablement of Fast Payments by Mercado Pago in the test environment. Activation is performed by Mercado Pago and is not available through a self-service link in the dashboard. - Wait for confirmation that it has been enabled before continuing.
- Use a test account of the buyer type, with a test card and account funds. Follow the instructions on that page to create and set up the account, and see the test card data for the card scenario.
- To validate Payment Brick, set up the test environment on mobile web or desktop web.
With the environment ready, run the following two test scenarios.
Select the payment method you want to validate.
- Run the flow on mobile web or desktop web using the email of a buyer account eligible for Fast Payments, and keep
quickCheckout: ["fastPayment"]ininitialization, with the card types declared inpaymentMethodssuch ascreditCard: "all". - Select the test card saved on the account.
- Complete the authentication requested by Mercado Pago according to the device you are using:
- Desktop web: use the OTP sent by SMS.
- Mobile web: use a Passkey or the OTP sent by SMS. On Android, you can also confirm the payment in the Mercado Pago or Mercado Libre app.
- Confirm the payment.
As the expected result, the onSubmit callback must provide PaymentFormData. The backend must then create the order through the /v1/ordersPOST endpoint and receive the approved payment.
To verify that the purchase was completed correctly, send a request to the /v1/orders/{id}GET endpoint, replacing id with the order identifier returned in its creation response. Also send the application's 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 and must never be exposed in the frontend..
Confirm that the response contains the created order, its associated transaction, and the expected status for the executed scenario.
application_id (available under Your integrations). After completing the measurement and receiving enablement, you can go to production.