How to test Mercadopago
In order to test mercadopago integration. You must create a pair of testing users:
| User | Description |
|---|---|
| Seller | Is the user account you use to configure the application and get the credentials to integrate it with our platform |
| Buyer | Is the user account used to purchase a product from our platform |
| Integrator | Is the user account used in marketplace-model integrations |
How to create users​
To create both users you may need to run the following code:
curl -X POST \
-H "Content-Type: application/json" \
"https://api.mercadopago.com/users/test_user?access_token=APP_USR-6774870739499857-080721-2d1e66d86521a030cbfbae152065cd89-614950168" \
-d '{"site_id":"MLA"}'
Please be aware that you must create a pair of users per country where you want to test the platform.
{"site_id":"MLA"} - Argentina {"site_id":"MLX"} - Mexico {"site_id":"MCO"} - Colombia
Response:
{
"id": 610757975,
"nickname": "TETE8906345",
"password": "qatest393",
"site_status": "active",
"email": "test_user_32892706@testuser.com"
}
Alternatively, test accounts can be created from the Developer Dashboard at Tus integraciones > Tu aplicación > Cuentas de prueba > Crear cuenta de prueba, selecting the country, a description, the account type (Vendedor, Comprador, or Integrador), and optionally a fictional money amount. Up to 15 test accounts can exist at the same time and they cannot be deleted.
Testing Cards​
Use the following cards to test the integration:
| Card type | Brand | Number | Security code | Date of expiration |
|---|---|---|---|---|
| Credit | Mastercard | 5031 7557 3453 0604 | 123 | 11/30 |
| Credit | Visa | 4509 9535 6623 3704 | 123 | 11/30 |
| Credit | American Express | 3711 803032 57522 | 1234 | 11/30 |
| Debit | Mastercard | 5287 3383 1025 3304 | 123 | 11/30 |
| Debit | Visa | 4002 7686 9439 5619 | 123 | 11/30 |
To test different payment results, complete the following values in the cardholder fields. The document (DNI 12345678) is only required for APRO and OTHE.
| Payment status | Cardholder name | Document |
|---|---|---|
| Approved | APRO | (DNI) 12345678 |
| Rejected - general error | OTHE | (DNI) 12345678 |
| Pending payment | CONT | - |
| Rejected - pending authorization validation | CALL | - |
| Rejected - insufficient funds | FUND | - |
| Rejected - invalid security code | SECU | - |
| Rejected - wrong expiration date | EXPI | - |
| Rejected - form error | FORM | - |
Rejected - missing card_number | CARD | - |
| Rejected - invalid installments | INST | - |
| Rejected - duplicated payment | DUPL | - |
| Rejected - disabled card | LOCK | - |
| Rejected - card type not allowed | CTNA | - |
| Rejected - exceeded card PIN attempts | ATTE | - |
| Rejected - on blacklist | BLAC | - |
| Unsupported | UNSU | - |
| Used to apply an amount rule | TEST | - |
Test Users​
At the moment, the system in staging is already configured with testing credentials for Argentina
Argentina (site_id: MLA)​
Seller:
| Field | Value |
|---|---|
| ID | 636557095 |
| Username | TESTOEIGSTQU |
| Password | qatest8758 |
| test_user_61030718@testuser.com | |
| CLIENT ID | 5880318318333178 |
| CLIENT SECRET | aHYtHV9EoozyzlMl37Cb8aVvd4fC7V8I |
Buyers:
| ID | Username | Password |
|---|---|---|
| 636557169 | TETE5973404 | qatest7444 |
| 2366438745 | TESTUSER496137151 | It7xbMiYbL |
| 2366423305 | TESTUSER1258596425 | 1PbzCcHAyH |
Colombia (site_id: MCO)​
Buyers:
| ID | Username | Password |
|---|---|---|
| 1989106694 | TESTUSER897203409 | VxGZexI1Xt |
| 1989109354 | TESTUSER1986897602 | TSOBefeUnA |
Uruguay (site_id: MLU)​
Buyers:
| ID | Username | Password |
|---|---|---|
| 1985412949 | TESTUSER1425569611 | Dp5xGEX0Hi |
| 1985412885 | TESTUSER1988248094 | LIF4oSikit |
Validate login with test users​
When logging into a website with test users and trying to access some sections of the Developer Dashboard, you may be required to authenticate with a code sent via email.
Since these are fictional users, you will not have access to the account that will receive the code. Instead, you can perform this authentication by entering the last 6 digits that make up the User ID of the test account you are trying to access, or the last 6 digits that make up the production Access Token.
For a test user with ID 636557095, the verification code would be: 557095
For accounts created from the Developer Dashboard, the verification code is also available as a 6-digit code under Tus integraciones > Tu aplicación > Cuentas de prueba.
References: