Integration test
The integration test allows you to analyze whether it was completed correctly and if payments are being processed without errors, avoiding potential issues when making the checkout available to end buyers.
To perform these tests, you will need:
- Test User: it has the same functionalities as a real Mercado Pago user, allowing you to test the operation of your development without compromising real data. To create it, go to Your Integrations and then Test Accounts > Create Test Accounts.
- Test Cards: use test cards from local payment methods and simulate different payment responses without needing to use a real card.
Follow the steps below to test your integration.
1. Log in with the test user and obtain credentials
To perform a test purchase, you must use the production credentials of the test user you created.
To obtain them, you must log in using an incognito window with the username and password provided when the user was created.
Then, go to Application Details > Credentials within Your Integrations. There you will find the Public Key and Access Token for the test user.
Finally, use those credentials to make the necessary requests to proceed with the test purchase.
2. Make a test purchase
To conduct a test purchase, you need to simulate a buying user in the store.
- Select a product or service and start the purchase process.
- In the store's checkout, enter the email address. Remember that it must be different from the email you use on Mercado Pago.
- Enter the details of one of our test cards.
- Confirm the purchase.
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 credit or debit cards we provide below.
Credit cards
Card | Number | Security code | Expiration date |
Mastercard | 5474 9254 3267 0366 | 123 | 11/25 |
Visa | 4075 5957 1648 3764 | 123 | 11/25 |
Debit cards
Card | Number | Security code | Expiration date |
Mastercard | 5579 0534 6148 2647 | 123 | 11/25 |
Visa | 4189 1412 2126 7633 | 123 | 11/25 |
To test different payment results, fill in the desired status in the cardholder's name (field card_holder_name
):
Payment Status | Description |
APRO | Approved payment |
OTHE | Declined for general error |
CONT | Pending payment |
CALL | Declined with validation to authorize |
FUND | Declined for insufficient amount |
SECU | Declined for invalid security code |
EXPI | Declined due to due date issue |
FORM | Declined due to form error |
CARD | Rejected for missing card_number |
INST | Rejected for invalid installments |
DUPL | Rejected for duplicate payment |
LOCK | Rejected for disabled card |
CTNA | Rejected for non-permitted card type |
ATTE | Rejected due to exceeded PIN attempts |
BLAC | Rejected for being on the blacklist |
UNSU | Not supported |
TEST | Used to apply amount rules |
3. Verify test purchase
To verify that the test purchase was successful, send a GET to the endpoint /v1/orders/{id}, replacing id
by the identification of the order, received in the response to its creation.
That's it! Once these steps are done, the integration will be complete, and you will be able to use your production credentials in Checkout API.
Requirements to go to production
When completing the integration process, your environement will be ready to be set into production. See below the necessary requirements to make this change effectively and safely, ensuring that the integration is prepared to receive real transactions.
1. Activate production credentials
To start receiving payments, you must activate the production credentials of your real user and replace the credentials of your test user.
To do so, enter the Dashboard and, in the side menu, access Production > Production credentials. There, you will find your productive Public Key and Access Token, which should replace the test ones used in previous stages.
For more information, check our Credenctials documentation.
2. Implement SSL certificate
To ensure the security of your integration and protect the data involved in transactions, it is necessary that you have an SSL certificate and that the payment form be made available on an HTTPS page.
This process aims to guarantee the security of your customer's data, comply with legal requirements in each country, and provide the best purchasing experience for your sales.
Although an SSL certificate may not be required during the testing phase, it is mandatory when going live. For more information, check the Terms and Conditions of Mercado Pago.
3. Configure notifications
Keep the status of orders updated in your systems by using and processing Webhooks notifications correctly.