# MD for: https://www.mercadopago.com.mx/developers/es/docs/automatic-payments/Integration-test.md \# Integration test It is crucial to test the entire flow before going into production, ensuring that payment creation is done correctly and that messages are effective in communicating with the user. A good experience for your customers at the checkout helps improve conversion. To perform a test purchase, it is necessary to use the \*\*test credentials of your production user\*\*. To obtain them, access \*\*Application details > Credentials\*\* within the \[Developer dashboard\](https://www.mercadopago.com.mx/developers/panel/app) or in your Mercado Pago account by accessing \[Your Business > Settings > Management and Administration > Credentials\](https://www.mercadopago.com.mx/settings/account/credentials). 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\*\* cards we provide below. | Card | Number | Security code | Expiration date | | :--- | :---: | :---: | :---: | | Mastercard | 5474 9254 3267 0366 | 123 | 11/25 | | Visa | 4075 5957 1648 3764 | 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 | ## Test a rejected payment in Automatic Payments Messaging Below, we present a test scenario to validate the correct functioning of your recurring payments integration. 1\. Use your Checkout API integration to \[Get card data\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-legacy/integration-configuration/card/web-integration) and create the \_token\_. 2\. Create the Customer by sending a \*\*POST\*\* to the endpoint \[v1/customers\](https://www.mercadopago.com.mx/developers/en/reference/online-payments/checkout-api-payments/customers/create-customer/post) with the email \`test\_payer@example.com\`. 3\. Associate the previously tokenized card to the customer by sending a \*\*POST\*\* to the endpoint \[/v1/customers/{customer\_id}/cards\](https://www.mercadopago.com.mx/developers/en/reference/online-payments/checkout-api-payments/cards/save-card/post). You must use the \`customer\_id\` obtained in the request to create the customer in the path of this request, and send the \`card\_token\` in the body. 4\. Create the recurring payment without CVV. For the \`card\_holder\_name\` field, enter the value \`OTHE\`, which will generate a rejected payment. If you need more information on how to create these payments, go to \[Automatic Payments Messaging\](https://www.mercadopago.com.mx/developers/en/docs/automatic-payments/recurring-charges/subscription-messaging). \`\`\`curl curl --location 'https://api.mercadopago.com/v1/payments' \\ --header 'Content-Type: application/json' \\ --header 'X-Idempotency-Key: sada21211112311' \\ --header 'Authorization: Bearer ACCES\_TOKEN \\ --data '{ "description": "First recurring payment", "installments": 1, "token": "4c6518fe544c152ed9178d4bc5f7d9a7", "payer": { "id": "3023406418-Jo6Bh3O0fmX85V", "type": "customer" }, "payment\_method\_id": "master", "transaction\_amount": 300 }' \`\`\` The response to this request should return a rejected payment, according to the data entered for the payment method. > For more information about the testing process, visit the \*\*Make test purchase\*\* section in \[Checkout API\](https://www.mercadopago.com.mx/developers/en/docs/checkout-api-payments/integration-test/make-test-purchase) or \[Checkout Bricks.\](https://www.mercadopago.com.mx/developers/en/docs/checkout-bricks/integration-test/test-payment-flow)