Suggest edit
Help us improve the documentation
Did you see wrong information and would you like us to explain something else or improve our manuals? Please leave your suggestions on GitHub.

Test the integration

Before going into production, it is very important to test the payments flow, checking whether the configurations you made at the preference level are effectively reflected. A good customer experience at the checkout helps to ensure the conversion.

You should check if:

  • The information about the product or service to be paid is correct.
  • If you recognize the customer’s account to send the email.
  • It offers the payment methods you wish.
  • The payment experience is adequate and the payment result is reported.

How to test my integration

Test users allow you to test your integration by generating payment flows in an exact copy of your integration.

User types Description
Seller It is the test account you use to configure the application and credentials for collection.
Buyer It is the test account you use to test the purchase process.

How to create users

To perform the tests it is necessary that you have at least two users: a buyer and a seller.

Execute the following curl to generate a test user:



curl -X POST \
-H "Content-Type: application/json" \
"" \
-d '{"site_id":"MLB"}'



    "id": 123456,
    "nickname": "TT123456",
    "password": "qatest123456",
    "site_status": "active",
    "email": ""
  • You can generate up to 10 test user accounts simultaneously. Therefore, we recommend you save each email and password.
  • Test users expire after 60 days without activity in Mercado Pago.
  • To make test payments we recommend using low amounts.
  • Both buyer and seller must be test users.
  • Use test cards, since it is not possible to withdraw money.

Test the payment flow

You have a pair of test credentials which will allow you to test the whole integration based on an exact replica of the Production Mode, being able to simulate transactions using the test cards:

Card Number CVV Expiration Date
Mastercard 5031 4332 1540 6351 123 11/25
Visa 4235 6477 2802 5682 123 11/25
American Express 3753 651535 56885 1234 11/25

You can also use test credit cards from local payment methods in each country.

Receive a payment

You can simulate the creation of a payment using your access_token and card_token.

If at the time of creation, you get an error associated with the payment method selected or the accounts in operation, you will receive an HTTP Status 400 Bad Request and the code detailing the error so that you can correct and retry the payment.

Try all possible payment scenarios for payment approved, pending or declined. To do this, in the card_holder_name field of the form, enter any of the following prefixes:

  • APRO: Payment approved.
  • CONT: Payment pending.
  • OTHE: Rejected by general error.
  • CALL: Rejected with validation to authorize.
  • FUND: Rejected for insufficient amount.
  • SECU: Rejected by invalid security code.
  • EXPI: Rejected due to problem with expiration date.
  • FORM: Rejected by error in the form.

In each case, you must communicate the payment result and the next steps to your customer. For that, you will receive an HTTP Status 201 OK informing that the payment has been created correctly and we will send a result code so that you can redirect the customer to the page with the correct message.

Check if you have received the Webhook notification

Mercado Pago will send you a notification of the occurrence of an event. Make sure that you successfully received it and duly impacted your management system.

Cancel a payment

Make a refund for an approved payment or the cancellation of a pending payment and check if you receive the notification with the corresponding information.

Test the creation of a customer

Check if you have created the customer with the associated card and the card data is duly retrieved when you reload the checkout.

Your search returns no results.

Verifique a ortografia de termos de pesquisa ou teste com outras palavras-chave.