Integration test - Checkout Pro - Mercado Pago Developers

Test your integration

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

Type of test usersDescription
SellerIt is the account you use to configure the application and credentials for collection.
BuyerIt is the account you use to test the purchase process..

Create test users

To perform the tests, you must have at least two users:

Type of test usersDescription
SellerIt is the account you use to configure the application and credentials for collection.
BuyerIt is the account you use to test the purchase process..

Execute the following curl to generate a test user:

curl

curl -X POST \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer ${TEST_ACCESS_TOKEN}' \
"https://api.mercadopago.com/users/test" \
-d '{"site_id":"MLM","description" : "a description"}'

The answer will have a structure similar to the following example:

json

{
    "id": 123456,
    "nickname": "TT123456",
    "password": "qatest123456",
    "site_status": "active",
    "site_id": "MLM",
    "description": "a description",
    "email": "test_user_123456@testuser.com",
    "date_created": "2021-11-04T12:02:35Z",
    "date_last_updated": "2021-11-04T12:02:35Z"
}

For more information about test user API parameters and responses, check API References

Important
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.
Both buyer and seller must be test users.
There are two ways to make the payment: as a guest user, using an email address of your choice, and as a registered user, using a Mercado Pago account with username and password. In this last scenario, money available in the account and pre saved cards will be enabled as payment methods.

Test the payment flow

1. Configure the checkout with the information of your selling user

Generate a preference with the credentials of the test user that you want to use as a seller.

2. Make a payment with your buyer user

Purchase as a guest user

When opening the checkout created with the data of your seller user:

  1. Select Card as the payment method.
  2. Enter the details of a test card.
  3. Fill in the desired email.

Buy as a registered user

When opening the checkout created with the data of your seller user:

  1. Log in to a Mercado Pago account with your buyer test user.
  2. Select Card as the payment method.
  3. Choose a pre saved card or enter the details of a new test card.
Important
  • Use low amounts to make the payment tests.
  • Always use test cards, since it is not possible to withdraw money.
  • Test Cards

    You can use test cards of local payment methods and simulate different payment responses, without the need to use a real card.

    For this, depending on your country, use one of the cards provided below.

    CardNumberSecurity codeExpiration date
    Visa4075 5957 1648 376412311/25

    To test different payment results, fill in the desired status in the cardholder's name:

    Payment StatusDescription
    APROApproved payment
    OTHEDeclined for general error
    CONTPending payment
    CALLDeclined with validation to authorize
    FUNDDeclined for insufficient amount
    SECUDeclined for invalid security code
    EXPIDeclined due to due date issue
    FORMDeclined due to form error

    Receive payments

    To start charging, you must activate your credentials.

    Before activating them, verify if the credentials used in your integration are the same as those of the account responsible for receiving the money from sales.