Integration test - Zero Dollar Auth - Mercado Pago Developers
Which documentation are you looking for?

Do not know how to start integrating? 

Check the first steps

Integration Test

After creating the Zero Dollar Auth validation, it is important to perform integration tests to confirm its functionality. To test the validation, there are two steps:

  • Generate card token
  • Validate integration

Generate card token

To test the Zero Dollar Auth validation, the first step is to generate a card token. To do this, use our Mercado Pago SDK JS library to capture card data and generate the token.

To obtain the card token, use the test data that we share with you in the table below.

Important
To simulate approvals, use the specific card 4074090000000004. To simulate rejections, use any other card.
ValueExample
Card number4074090000000004
Expiration month02
Expiration year2031
Security code123
Cardholder nameAPRO
Identification type. It can be one of the following types:
CPF: Individual Taxpayer Registration, Brazil.
CNPJ: National Register of Legal Entities, Brazil.
CUIT: Unique Tax Identification Code, Argentina.
CUIL: Unique Labor Identification Code, Argentina.
DNI: National Identity Document, Argentina.
CURP: Single Population Registration Code, Mexico.
RFC: Federal Registry of Taxpayers, Mexico.
CC: Citizenship Card, Colombia.
RUT: Single Tax List, Chile.
CI: Identity Card, Uruguay.
CPF
Document number15635614680
Important
In order to perform transactions with the card data open, directly in the API call, it is necessary for the seller to be PCI Compliant . Otherwise, these data cannot be transacted in the backend of your application.

Validate integration

As a last step, it is necessary to validate the integration using the token obtained in the previous step. To do this, send the parameters described in the table below to the /v1/payments endpoint and execute the request.

ParameterTypeDescriptionExample
tokenStringCard token12346622341
payment_method_idStringIndicates the identifier of the payment method selected to make the paymentmaster
payer.emailStringPayer's emailbuyer@examplemail.com
payer.typeStringType of identification of the associated payerguest
descriptionStringDescription of the validation"zero dollar card validation with master credit without cvv"
transaction_amountNumberCost of the validationAlways zero (0) for Zero Dollar Auth

curl

curl -X POST \
      'https://api.mercadopago.com/v1/payments'\
      Content-Type: application/json
      X-Card-Validation: card_validation
      Authorization: Bearer {{access_token}}
{
    "token": "{{card_token}}",
    "payment_method_id": "master",
    "payer": {
        "email": "{{payer_email}}",
        "type" : "guest"
    },
    "description": "validação de cartão com valor zero dollar master crédito sem cvv",
    "transaction_amount": 0
}