AI resources

Make a test purchase with cards

With the test order created, use Mercado Pago test cards to simulate different payment results. Available scenarios include approved, rejected, and pending payments, allowing you to validate how your integration handles each situation before going to production.

Test a card purchase

To test a purchase with a credit or debit card, follow the steps below.

  1. Go to Mercado Pago Developers and log in with a test buyer account you previously created. Use the username and password assigned to it. You can find these details in Test the integration > Get a test buyer account.
If an email verification code is requested when logging in, enter the 6-digit code associated with your test account. You can find it in Your integrations > Your application > Test accounts.
  1. Go to the store where you integrated Checkout Pro, select a product or service, and start the purchase process at the payment step.
  2. When your integration creates the order and generates the checkout_url, you will be redirected to the Mercado Pago payment form.
  3. Finally, complete a test purchase using the test card data in the next section. The cardholder name defines the simulated payment result.

Test cards

Mercado Pago provides test cards that will allow you to test payments without using a real card.

Their data, such as number, security code, and expiration date, can be combined with the data relating to the cardholder, which will allow you to test different payment scenarios. That is, you can use the information of any test card and test different payment results based on the cardholder's data.

Below, you can see the data of the test debit and credit cards. Select the one you want to use to test your integration.

Card typeFlagNumberSecurity codeExpiration date
Credit cardMastercard5474 9254 3267 036612311/30
Credit cardVisa4075 5957 1648 376412311/30
Credit cardAmerican Express3711 803032 57522123411/30
Debit cardMastercard5579 0534 6148 264712311/30
Debit cardVisa4189 1412 2126 763312311/30

Next, choose which payment scenario to test and fill in the cardholder's information (First name and last name, Document type and number) as indicated in the table below.

Cardholder’s first and last namePayment Status
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
CARDRejected for missing card_number
INSTRejected for invalid installments
DUPLRejected for duplicate payment
LOCKRejected for disabled card
CTNARejected for non-permitted card type
ATTERejected due to exceeded PIN attempts
BLACRejected for being on the blacklist
UNSUNot supported
TESTUsed to apply amount rules

Verify the result

To confirm the result of each test purchase, send a GET to the endpoint /v1/orders/{id}API including your test Access TokenTest private key of the application created in Mercado Pago, used in the backend. You can access it through Your integrations > Integration data > Test credentials.:

curl

curl -X GET \
    -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \
    'https://api.mercadopago.com/v1/orders/{id}'

Replace {id} with the id of the order obtained when creating it. The status field in the response will indicate the transaction result for the tested scenario. For all possible statuses, see the Order status documentation.