# MD for: https://www.mercadopago.cl/developers/es/docs/checkout-api-orders/integration-test/cards.md \# Perform a test purchase with cards To test your integration with \*\*credit and/or debit cards\*\* you should perform a test purchase with these payment methods, simulating the actions of a buyer user. :::::AccordionComponent{title="Web"} To make a successful test purchase, fill in the required data at checkout following the information indicated below. ### Buyer email In the \*\*email\*\* field, enter any valid email address. ### Card details 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 type | Flag | Number | Security code | Expiration date | | :--- | :---: | :---: | :---: | :---: | | Credit card | Mastercard | 5416 7526 0258 2580 | 123 | 11/30 | | Credit card | Visa | 4998 4704 7065 8262 | 123 | 11/30 | | Credit card | American Express | 3757 781744 61804 | 1234 | 11/30 | | Debit card | Mastercard | 5597 7917 5464 0466 | 123 | 11/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. | Payment Status | Cardholder’s first and last name | Identity document | | --- | --- | --- | | Approved payment | \`APRO\` | (otro) 123456789 | | Declined for general error | \`OTHE\` | (otro) 123456789 | | Pending payment | \`CONT\` | - | | Declined with validation to authorize | \`CALL\` | - | | Declined for insufficient amount | \`FUND\` | - | | Declined for invalid security code | \`SECU\` | - | | Declined due to due date issue | \`EXPI\` | - | | Declined due to form error | \`FORM\` | - | | Rejected for missing card\_number | \`CARD\` | - | | Rejected for invalid installments | \`INST\` | - | | Rejected for duplicate payment | \`DUPL\` | - | | Rejected for disabled card | \`LOCK\` | - | | Rejected for non-permitted card type | \`CTNA\` | - | | Rejected due to exceeded PIN attempts | \`ATTE\` | - | | Rejected for being on the blacklist | \`BLAC\` | - | | Not supported | \`UNSU\` | - | | Used to apply amount rules | \`TEST\` | - | You can also view test cards from the Panel. In \*\*\[Integrations\](https://www.mercadopago.cl/developers/panel/app)\*\*, select the application card and choose \*\*Test\*\* in the environment selector. You will find the \*\*Test card\*\* section on the right side of the screen. !\[Test card location on the Home screen\](/images/dashboard/test-card-access-es-v1.png) Once you have completed all the fields correctly, click the button to process the payment and wait for the result. To verify that the test purchase was carried out according to the expected results based on the data entered, send a request to the :TagComponent{tag="GET" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get" color="accent"} endpoint, replacing \`id\` with the order identification, received in the response to its creation. The response to this call should bring the detailed information of the test transaction, along with the status chosen for the payment in the previous step within the \`status\` field. Alternatively, you can view the payment result from your application. To do this, go to \*\*\[Integrations\](https://www.mercadopago.cl/developers/panel/app)\*\* and select the application card. Make sure \*\*Test\*\* is selected in the selector at the top and, on the \*\*Home\*\* screen, select the \*\*Test payments\*\* tab. Then, find the payment you made and click on it to view its details and status. ::::: :::::AccordionComponent{title="Mobile (Android and iOS SDK)"} The Checkout SDK \*\*does not have a sandbox mode flag\*\*: the test environment is activated by the credential. Initialize the SDK with a test Public Key — the entire flow runs without moving real money. 1\. Go to \*\*\[Integrations\](https://www.mercadopago.cl/developers/panel/app)\*\* and select the application card. In the side menu, select \*\*Credentials\*\* and make sure the selector at the top shows \*\*Test\*\*. 2\. Copy the \*\*test Public Key\*\* of your application. 3\. Initialize the SDK with this credential, as shown in the example below. 4\. Open the checkout flow in the application and use the test cards in the form — they do not generate any real charge. 5\. The payment result is controlled by the \*\*cardholder name\*\* entered in the form. ::::TabsComponent :::TabComponent{title="Android"} \`\`\`kotlin MercadoPagoSDK.initialize( context = this, publicKey = "{{YOUR\_PUBLIC\_KEY}}", countryCode = CountryCode.BRA ) \`\`\` ::: :::TabComponent{title="iOS"} \`\`\`swift let configuration = MercadoPagoSDK.Configuration( publicKey: "{{YOUR\_PUBLIC\_KEY}}", country: .BRA ) MercadoPagoSDK.shared.initialize(configuration) \`\`\` ::: :::: 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 type | Flag | Number | Security code | Expiration date | | :--- | :---: | :---: | :---: | :---: | | Credit card | Mastercard | 5416 7526 0258 2580 | 123 | 11/30 | | Credit card | Visa | 4998 4704 7065 8262 | 123 | 11/30 | | Credit card | American Express | 3757 781744 61804 | 1234 | 11/30 | | Debit card | Mastercard | 5597 7917 5464 0466 | 123 | 11/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. | Payment Status | Cardholder’s first and last name | Identity document | | --- | --- | --- | | Approved payment | \`APRO\` | (otro) 123456789 | | Declined for general error | \`OTHE\` | (otro) 123456789 | | Pending payment | \`CONT\` | - | | Declined with validation to authorize | \`CALL\` | - | | Declined for insufficient amount | \`FUND\` | - | | Declined for invalid security code | \`SECU\` | - | | Declined due to due date issue | \`EXPI\` | - | | Declined due to form error | \`FORM\` | - | | Rejected for missing card\_number | \`CARD\` | - | | Rejected for invalid installments | \`INST\` | - | | Rejected for duplicate payment | \`DUPL\` | - | | Rejected for disabled card | \`LOCK\` | - | | Rejected for non-permitted card type | \`CTNA\` | - | | Rejected due to exceeded PIN attempts | \`ATTE\` | - | | Rejected for being on the blacklist | \`BLAC\` | - | | Not supported | \`UNSU\` | - | | Used to apply amount rules | \`TEST\` | - | To verify whether the test purchase was completed correctly, send a request to the :TagComponent{tag="GET" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get" color="accent"} endpoint, replacing \`id\` with the order identification. For end-to-end flows, create \*\*test users\*\* in the application's \*\*Test\*\* environment, under \*\*Credentials > Test account > Manage test accounts\*\*. ::::: > WARNING > > If you want to make a test :TagComponent{tag="POST" text="refund" href="/developers/en/reference/online-payments/checkout-api/refund-order/post" color="green"}, send the request to the API using your test Access Token. Remember that it starts with the prefix \`APP\_USR\`. Ready! Once these steps are completed, the integration of cards as a payment method is complete, and you can either continue testing other integrated payment methods, or \[go to production\](https://www.mercadopago.cl/developers/en/docs/checkout-api-orders/go-to-production).