# MD for: https://www.mercadopago.cl/developers/en/docs/automatic-payments/recurring-charges.md \# Create recurring charges With a stored card (Card on File), you can receive charges initiated by the customer (CIT, Customer-Initiated Transaction) or by the merchant (MIT, Merchant-Initiated Transaction), without the buyer needing to re-enter card data. Based on the charge recurrence, the product offers two types of payment: - \*\*Scheduled recurring payments:\*\* payments with a pre-established frequency, such as subscriptions and automatic renewals. - \*\*One-time payments:\*\* point-in-time charges that reuse an already registered card, without requiring the customer to re-enter their data. They can be CIT, as in one-click purchases or reorders, or MIT, as in consumption-based debits. ## Scenario map Use the following table to identify the \`sub\_type\` and the fields that apply to each scenario. | Scenario | \`sub\_type\` | \`transaction\_initiator\` | Subscription fields | |---|---|---|---| | Subscription: automatic charges on a fixed schedule (MIT) | \`recurring\` | \`merchant\` | Yes | | Automatic charges triggered by a usage event, without a fixed schedule (MIT) | \`unscheduled\` | \`merchant\` | No | | One-time purchase by the customer with a saved card (CIT) | \`unscheduled\` | \`customer\` | No | The transaction in which the card is stored, whether a ZDA validation or a first payment with the cardholder present, uses \`first\_transaction: true\`, \`storage: store\`, and \`transaction\_initiator: customer\`. All following charges use \`first\_transaction: false\` and \`storage: stored\`. ::::::AccordionComponent{title="Get card data and validate"} To create recurring charges, first obtain and store the customer's card data. Choose the validation method based on whether you want to validate the card without generating a charge or through the first payment in the chain. :::::TabsComponent ::::TabComponent{title="Validation with ZDA"} Validation with \[Zero Dollar Auth (ZDA)\](https://www.mercadopago.cl/developers/en/docs/zero-dollar-auth/integration/introduction) confirms and stores the card credentials without generating any real charge. It is available for Visa and Mastercard cards. To do this, choose the scenario according to the future use of the card: - \*\*Recurring (CIT):\*\* for cards that will be used in subscriptions with a defined frequency. - \*\*One-time charges (CIT):\*\* for cards that will be used in event-based or on-demand charges, without a fixed schedule. :::AccordionComponent{title="Recurring (CIT)"} Validates the card before the start of a subscription, without generating a real charge. It signals to card networks that the card is being stored with the intent of future periodic charges, binding the validation to the subscription from the first interaction. > \*\*Example\*\*: a streaming platform requests card data to start a 30-day free trial period before the first monthly charge. To validate the card, send a request to the endpoint :TagComponent{tag="POST" text="/v1/payments" href="/developers/en/reference/online-payments/checkout-api-payments/create-payment/post" color="green"} including the header \`X-Card-Validation: card\_validation\` and sending \`0\` as the \`transaction\_amount\` parameter. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Card-Validation: card\_validation' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 0, "token": "{{card\_token}}", "payment\_method\_id": "master", "payer": { "id": "{{customer\_id}}", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": true, "storage": "store", "transaction\_initiator": "customer", "subscription\_id": "87654321" } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`X-Card-Validation\` | Required | Header. Identifies the request as a \[Zero Dollar Auth (ZDA)\](https://www.mercadopago.cl/developers/en/docs/zero-dollar-auth/integration/introduction) validation. | \`card\_validation\` | | \`X-Expand-Response-Nodes\` | Conditionally required | Header. Expands the response to return the card network identifiers in \`expanded.gateway.reference\`. Must be \`gateway.reference\`. Recommended in all cases and required when you process with more than one payment provider, because it lets you store these identifiers and send them in following charges. | \`gateway.reference\` | | \`transaction\_amount\` | Required | Number. Transaction amount. Must be \`0\` to avoid generating an actual charge on the card. | \`0\` | | \`token\` | Required | String. Card token identifier. | \`ff8080814c11e237014c1ff593b57b4d\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`recurring\`. | \`recurring\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`true\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`true\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`store\` (capturing for the first time). | \`store\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`customer\`. Replaces the \`user\_present\` field used in previous integrations. | \`customer\` | | \`point\_of\_interaction.transaction\_data.subscription\_id\` | Required | String. Unique subscription identifier. We suggest it be composed of the \`collector\` + a unique identifier per user. | \`87654321\` | If the request is successful, the response will be similar to the following example: \`\`\`json { "id": 20792195335, "status": "approved", "status\_detail": "accredited", "operation\_type": "card\_validation", "transaction\_amount": 0, "expanded": { "gateway": { "reference": { "network\_transaction\_id": "MDSKDILUR0909", "network\_transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" } } } } \`\`\` The identifiers returned in \`expanded.gateway.reference\` are the ones to send in the following charges of that payment chain. Also store the \`id\` from the response, which is sent as \`reference.id\`. See \[Process subsequent charges\](#bookmark\_process\_subsequent\_charges) to learn how to use them. ::: :::AccordionComponent{title="One-time charges (CIT)"} Validates the card for storage without a defined frequency, without generating a real charge. It signals to card networks that the card will be used for event-based charges, such as on-demand orders or tolls, without a recurrence schedule. Does not require \`subscription\_id\`. > \*\*Example\*\*: a mobility app requests and validates the card at registration, before any ride is taken. To validate the card, send a request to the endpoint :TagComponent{tag="POST" text="/v1/payments" href="/developers/en/reference/online-payments/checkout-api-payments/create-payment/post" color="green"} including the header \`X-Card-Validation: card\_validation\` and sending \`0\` as the \`transaction\_amount\` parameter. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Card-Validation: card\_validation' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 0, "token": "{{card\_token}}", "payment\_method\_id": "master", "payer": { "id": "{{customer\_id}}", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "unscheduled", "transaction\_data": { "first\_transaction": true, "storage": "store", "transaction\_initiator": "customer" } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`X-Card-Validation\` | Required | Header. Identifies the request as a \[Zero Dollar Auth (ZDA)\](https://www.mercadopago.cl/developers/en/docs/zero-dollar-auth/integration/introduction) validation. | \`card\_validation\` | | \`X-Expand-Response-Nodes\` | Conditionally required | Header. Expands the response to return the card network identifiers in \`expanded.gateway.reference\`. Must be \`gateway.reference\`. Recommended in all cases and required when you process with more than one payment provider, because it lets you store these identifiers and send them in following charges. | \`gateway.reference\` | | \`transaction\_amount\` | Required | Number. Transaction amount. Must be \`0\` to avoid generating an actual charge on the card. | \`0\` | | \`token\` | Required | String. Card token identifier. | \`ff8080814c11e237014c1ff593b57b4d\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`unscheduled\`. | \`unscheduled\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`true\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`true\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`store\` (capturing for the first time). | \`store\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`customer\`. Replaces the \`user\_present\` field used in previous integrations. | \`customer\` | If the request is successful, the response will be similar to the following example: \`\`\`json { "id": 20792195335, "status": "approved", "status\_detail": "accredited", "operation\_type": "card\_validation", "transaction\_amount": 0, "expanded": { "gateway": { "reference": { "network\_transaction\_id": "MDSKDILUR0909", "network\_transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" } } } } \`\`\` The identifiers returned in \`expanded.gateway.reference\` are the ones to send in the following charges of that payment chain. Also store the \`id\` from the response, which is sent as \`reference.id\`. See \[Process subsequent charges\](#bookmark\_process\_subsequent\_charges) to learn how to use them. ::: :::: ::::TabComponent{title="Validation with First payment"} This validation flow occurs after the first charge with the card in question, after which its data is stored for future transactions. The first payment of a subscription can occur in two distinct contexts: - \*\*Customer-initiated (CIT):\*\* the customer is at checkout, enters the card data, and makes the payment at the time of enrollment. The ID returned in this transaction will be stored and used as \`reference.id\` in all subsequent MIT charges. - \*\*Merchant-initiated with migrated data (MIT / CoF):\*\* the card was already stored on another platform and was migrated to Mercado Pago. The first charge is initiated by the merchant, without the customer needing to be present or re-enter their data. :::AccordionComponent{title="Customer-initiated (CIT)"} First payment of a subscription with the cardholder \*\*present in the interface\*\*, entering card data at that moment. Credentials are captured in this transaction and the ID returned in the response must be stored and used as \`reference.id\` in all subsequent MIT charges for this subscription. > WARNING > > The ID returned in this response must be stored and used as \`reference.id\` in all subsequent MIT charges. This value must not be changed throughout the charge chain. To make this first payment, send a request to the endpoint :TagComponent{tag="POST" text="/v1/payments" href="/developers/en/reference/online-payments/checkout-api-payments/create-payment/post" color="green"}. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 100, "token": "12346622341", "description": "Test payment", "installments": 1, "payment\_method\_id": "master", "payer": { "id": "123456789-jxOV430go9fx2e", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": true, "storage": "store", "transaction\_initiator": "customer", "subscription\_id": "87654321", "subscription\_sequence": { "number": 1, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-01-25" } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Transaction amount. | \`100\` | | \`token\` | Required | String. Card token identifier. | \`12346622341\` | | \`installments\` | Required | Integer. Number of installments. | \`1\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789-jxOV430go9fx2e\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`recurring\`. | \`recurring\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`true\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`true\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`store\` (capturing for the first time). | \`store\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`customer\`. Replaces the \`user\_present\` field used in previous integrations. | \`customer\` | | \`point\_of\_interaction.transaction\_data.subscription\_id\` | Required | String. Unique subscription identifier. We suggest it be composed of the \`collector\` + a unique identifier per user. | \`87654321\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.number\` | Optional | Integer. Position of the invoice in the subscription series. Starts at \`1\` and is incremented with each new invoice. When retrying a declined charge, send the same number as the original invoice. | \`1\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.total\` | Optional | Integer. Total number of invoices in the subscription. For open-ended subscriptions, must be \`null\`. | \`12\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.period\` | Conditionally required | Integer. Indicates the frequency of the billing cycle. Required when \`invoice\_period.type\` is sent. | \`1\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.type\` | Conditionally required | String. Indicates the billing period type: \`monthly\`, \`daily\`, \`yearly\`, or \`quarterly\`. Required when \`invoice\_period.period\` is sent. | \`monthly\` | | \`point\_of\_interaction.transaction\_data.billing\_date\` | Required | String. Date of the invoice the payment corresponds to, in ISO 8601 format (\`YYYY-MM-DD\`). It corresponds to the date of the first charge attempt of the cycle. When retrying a declined charge, always send the original invoice date, not the retry date. | \`2026-01-25\` | If the request was successful, the response will look like the following example: \`\`\`json { "id": 20792195335, "status": "approved", "status\_detail": "accredited", "transaction\_amount": 100, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": true, "storage": "store", "transaction\_initiator": "customer", "subscription\_id": "87654321", "subscription\_sequence": { "number": 1, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-01-25" } }, "expanded": { "gateway": { "reference": { "network\_transaction\_id": "MDSKDILUR0909", "network\_transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" } } } } \`\`\` ::: :::AccordionComponent{title="Merchant-initiated with migrated data (MIT / CoF)"} First charge of a subscription using an \*\*already stored\*\* card, without the cardholder present. In a vault migration, send the original CIT identifiers supplied by the previous provider whenever they are available. If you do not have the CIT identifiers, you can use the \`reference.id\` and \`network\_data\` from an approved MIT in the same chain, such as the last approved MIT whose data you stored. If you have no identifiers, the first MIT can be sent without \`reference.id\` and without \`network\_data\`, with a possible impact on approval. Keep \`first\_transaction: false\`, \`storage: stored\`, and \`transaction\_initiator: merchant\`: missing identifiers do not start a new chain. To process the first charge, send a request to the endpoint :TagComponent{tag="POST" text="/v1/payments" href="/developers/en/reference/online-payments/checkout-api-payments/create-payment/post" color="green"}. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 100, "token": "12346622341", "payment\_method\_id": "master", "payer": { "id": "123456789-jxOV430go9fx2e", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "merchant", "network\_data": { "transaction\_id": "MDSKDILUR0909", "transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" }, "subscription\_id": "87654321", "subscription\_sequence": { "number": 1, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-01-25" } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Transaction amount. | \`100\` | | \`token\` | Required | String. Card token identifier. | \`12346622341\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789-jxOV430go9fx2e\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`recurring\`. | \`recurring\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`false\`: the chain was started in the original transaction with the previous provider. Replaces the \`first\_time\_use\` field used in previous integrations. | \`false\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`stored\` (credentials already existing in the system). | \`stored\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`merchant\`. Replaces the \`user\_present\` field used in previous integrations. | \`merchant\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | Conditionally required | String. Identifier of the transaction in the card brand (for example, transaction ID in Visa and trace ID in Mastercard). Prioritize the original CIT identifier; for MITs without it, use one from an approved MIT in the same chain. Always send it when available. If you do not have it, omit \`network\_data\` in the first MIT and store the identifiers returned in the first approved MIT. | \`MDSKDILUR0909\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Conditionally required | String. Mastercard Transaction Link ID, returned alongside \`transaction\_id\`. Other card brands do not return it. Always send it when available. If you do not have it, follow the guidance for \`network\_data.transaction\_id\`. | \`8fhc6lioSIexrqS6au-SPA\` | | \`point\_of\_interaction.transaction\_data.subscription\_id\` | Required | String. Unique subscription identifier. We suggest it be composed of the \`collector\` + a unique identifier per user. | \`87654321\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.number\` | Optional | Integer. Position of the invoice in the subscription series. Starts at \`1\` and is incremented with each new invoice. When retrying a declined charge, send the same number as the original invoice. | \`1\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.total\` | Optional | Integer. Total number of invoices in the subscription. For open-ended subscriptions, must be \`null\`. | \`12\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.period\` | Conditionally required | Integer. Indicates the frequency of the billing cycle. Required when \`invoice\_period.type\` is sent. | \`1\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.type\` | Conditionally required | String. Indicates the billing period type: \`monthly\`, \`daily\`, \`yearly\`, or \`quarterly\`. Required when \`invoice\_period.period\` is sent. | \`monthly\` | | \`point\_of\_interaction.transaction\_data.billing\_date\` | Required | String. Date of the invoice the payment corresponds to, in ISO 8601 format (\`YYYY-MM-DD\`). It corresponds to the date of the first charge attempt of the cycle. When retrying a declined charge, always send the original invoice date, not the retry date. | \`2026-01-25\` | If the request was successful, the response will look like the following example: \`\`\`json { "id": 20792195337, "status": "approved", "status\_detail": "accredited", "transaction\_amount": 100, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "merchant", "subscription\_id": "87654321", "subscription\_sequence": { "number": 1, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-01-25" } }, "expanded": { "gateway": { "reference": { "network\_transaction\_id": "MDSKDILUR0909", "network\_transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" } } } } \`\`\` When this MIT is approved, store the response \`id\` and the identifiers returned in \`expanded.gateway.reference\`. If you do not have the original CIT identifiers, send that approved MIT’s \`id\` as \`reference.id\` in the next MITs related to the same recurring payment and use the stored network identifiers in \`network\_data\`. If the CIT identifiers are already available, retain them. See \[Process subsequent charges\](#bookmark\_process\_subsequent\_charges). ::: :::: ::::: :::::: ::::::AccordionComponent{title="Get customer data"} To obtain customer data such as ID, address or registration date, you can retrieve them through our customer API. To do this, send a request with the \*\*customer's email\*\* to the endpoint :TagComponent{tag="GET" text="/v1/customers/search" href="/developers/en/reference/online-payments/checkout-api-payments/customers/search-customer/get" color="accent"}, or if you prefer, use one of the SDKs below. php phpnodejavarubycsharppythoncurl ``` search(1, 0, ["email" => "my.user@example.com"]); ?> ``` ``` import { Customer, MercadoPagoConfig } from '@src/index'; const client = new MercadoPagoConfig({ accessToken: '{{YOUR_ACCESS_TOKEN}}' }); const customer = new Customer(client); customer.search({ options: { email: '{{EMAIL}}' } }).then(console.log).catch(console.log); ``` ``` CustomerClient client = new CustomerClient(); Map filters = new HashMap<>(); filters.put("email", "test_payer_12345@testuser.com"); MPSearchRequest searchRequest = MPSearchRequest.builder().offset(0).limit(0).filters(filters).build(); client.search(searchRequest); ``` ``` customers_response = sdk.customer.search(filters: { email: 'test_payer_12345@testuser.com' }) customers = customers_response[:response] ``` ``` var searchRequest = new SearchRequest { Filters = new Dictionary { ["email"] = "test_payer_12345@testuser.com", }, }; ResultsResourcesPage results = await customerClient.SearchAsync(searchRequest); IList customers = results.Results; ``` ``` filters = { "email": "test_payer_12345@testuser.com" } customers_response = sdk.customer().search(filters=filters) customers = customers_response["response"] ``` ``` curl -X GET \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ 'https://api.mercadopago.com/v1/customers/search?email=test_user_123456@testuser.com' ``` \> NOTE > > Once you have the customer ID, use it to locate the associated card by sending a request to the :TagComponent{tag="GET" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api-payments/cards/get-customer-cards/get" color="accent"} endpoint. For more information, see \[Integration test\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/Integration-test) or the section \[Default rendering in Card Payment Brick\](https://www.mercadopago.cl/developers/en/docs/checkout-bricks/card-payment-brick/default-rendering). :::::: ::::::AccordionComponent{title="Associate card to customer"} After ensuring that the card is valid, create a customer and associate them with the validated card. To create a customer and associate them with their card, you need to send the \`customer\_id\` and the \`card\_token\`. Each customer will be stored with the value \`customer\` and each card with the value \`card\`. If you validated the card with ZDA, reuse the same \`card\_token\` sent during validation in this request. Do not generate a new token to associate it with the customer. The response returns the \`card\_id\`, which you will use in the next step to generate the token for the first charge with the stored card. Additionally, we recommend storing card data whenever a payment is successfully completed. This ensures the correct data is stored for future purchases and optimizes the payment process for the buyer. To create a customer and card, use one of the SDKs below. php phpnodejavarubycsharppythoncurl ``` "test_payer_12345@testuser.com", "first_name" => "Jhon", "last_name" => "Doe", "phone" => [ "area_code" => "55", "number" => "991234567" ], "identification" => [ "type" => "CPF", "number" => "12345678900" ], "default_address" => "Home", "address" => [ "id" => "123123", "zip_code" => "01234567", "street_name" => "Rua Exemplo", "street_number" => 123, "city" => [] ], "date_registered" => "2026-01-15T10:00:00.000-03:00", "description" => "Test customer", "default_card" => "None" ]; $customer = $client_customer->create($customer_data); $client = new CustomerCardClient(); $customer_card = $client->create($customer->id, ["token" => "your_card_token"]); ?> ``` ``` const client = new MercadoPagoConfig({ accessToken: '{{YOUR_ACCESS_TOKEN}}' }); const customer = new Customer(client); const body = { email: 'test_payer_12345@testuser.com', first_name: 'Jhon', last_name: 'Doe', phone: { area_code: '55', number: '991234567' }, identification: { type: 'CPF', number: '12345678900' }, default_address: 'Home', address: { id: '123123', zip_code: '01234567', street_name: 'Rua Exemplo', street_number: 123, city: {} }, date_registered: '2026-01-15T10:00:00.000-03:00', description: 'Test customer', default_card: 'None' }; customer.create({ body: body }).then((result) => { const customerCard = new CustomerCard(client); const cardBody = { token: '9b2d63e00d66a8c721607214cedaecda', }; customerCard.create({ customerId: result.id, body: cardBody }) .then((result) => console.log(result)); }) ``` ``` MercadoPagoConfig.setAccessToken("{{YOUR_ACCESS_TOKEN}}"); CustomerClient customerClient = new CustomerClient(); CustomerCardClient customerCardClient = new CustomerCardClient(); CustomerRequest customerRequest = CustomerRequest.builder() .email("test_payer_12345@testuser.com") .firstName("Jhon") .lastName("Doe") .phone(PhoneRequest.builder().areaCode("55").number("991234567").build()) .identification( IdentificationRequest.builder().type("CPF").number("12345678900").build()) .defaultAddress("Home") .address( CustomerAddressRequest.builder() .id("123123") .zipCode("01234567") .streetName("Rua Exemplo") .streetNumber(123) .build()) .dateRegistred(java.time.OffsetDateTime.parse("2026-01-15T10:00:00-03:00")) .description("Test customer") .defaultCard("None") .build(); Customer customer = customerClient.create(customerRequest); CustomerCardIssuer issuer = CustomerCardIssuer.builder() .id("3245612") .build(); CustomerCardCreateRequest cardCreateRequest = CustomerCardCreateRequest.builder() .token("9b2d63e00d66a8c721607214cedaecda") .issuer(issuer) .paymentMethodId("debit_card") .build(); customerCardClient.create(customer.getId(), cardCreateRequest); ``` ``` require 'mercadopago' sdk = Mercadopago::SDK.new('{{YOUR_ACCESS_TOKEN}}') customer_request = { email: 'test_payer_12345@testuser.com', first_name: 'Jhon', last_name: 'Doe', phone: { area_code: '55', number: '991234567' }, identification: { type: 'CPF', number: '12345678900' }, default_address: 'Home', address: { id: '123123', zip_code: '01234567', street_name: 'Rua Exemplo', street_number: 123, city: {} }, date_registered: '2026-01-15T10:00:00.000-03:00', description: 'Test customer', default_card: 'None' } customer_response = sdk.customer.create(customer_request) customer = customer_response[:response] card_request = { token: '9b2d63e00d66a8c721607214cedaecda', issuer_id: '3245612', payment_method_id: 'visa' } card_response = sdk.card.create(customer['id'], card_request) card = card_response[:response] ``` ``` MercadoPagoConfig.AccessToken = "{{YOUR_ACCESS_TOKEN}}"; var customerRequest = new CustomerRequest { Email = "test_payer_12345@testuser.com", FirstName = "Jhon", LastName = "Doe", Phone = new PhoneRequest { AreaCode = "55", Number = "991234567" }, Identification = new IdentificationRequest { Type = "CPF", Number = "12345678900" }, DefaultAddress = "Home", Address = new CustomerDefaultAddressRequest { Id = "123123", ZipCode = "01234567", StreetName = "Rua Exemplo", StreetNumber = 123 }, DateRegistred = DateTime.Parse("2026-01-15T10:00:00-03:00"), Description = "Test customer", DefaultCard = "None" }; var customerClient = new CustomerClient(); Customer customer = await customerClient.CreateAsync(customerRequest); var cardRequest = new CustomerCardCreateRequest { Token = "9b2d63e00d66a8c721607214cedaecda" }; CustomerCard card = await customerClient.CreateCardAsync(customer.Id, cardRequest); ``` ``` import mercadopago sdk = mercadopago.SDK("{{YOUR_ACCESS_TOKEN}}") customer_data = { "email": "test_payer_12345@testuser.com", "first_name": "Jhon", "last_name": "Doe", "phone": { "area_code": "55", "number": "991234567" }, "identification": { "type": "CPF", "number": "12345678900" }, "default_address": "Home", "address": { "id": "123123", "zip_code": "01234567", "street_name": "Rua Exemplo", "street_number": 123, "city": {} }, "date_registered": "2026-01-15T10:00:00.000-03:00", "description": "Test customer", "default_card": "None" } customer_response = sdk.customer().create(customer_data) customer = customer_response["response"] card_data = { "token": "9b2d63e00d66a8c721607214cedaecda", "issuer_id": "3245612", "payment_method_id": "visa" } card_response = sdk.card().create(customer["id"], card_data) card = card_response["response"] ``` ``` curl -X POST \ 'https://api.mercadopago.com/v1/customers' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ -d '{ "email": "test_payer_12345@testuser.com", "first_name": "Jhon", "last_name": "Doe", "phone": { "area_code": "55", "number": "991234567" }, "identification": { "type": "CPF", "number": "12345678900" }, "default_address": "Home", "address": { "id": "123123", "zip_code": "01234567", "street_name": "Rua Exemplo", "street_number": 123, "city": {} }, "date_registered": "2026-01-15T10:00:00.000-03:00", "description": "Test customer", "default_card": "None" }' curl -X POST \ 'https://api.mercadopago.com/v1/customers/CUSTOMER_ID/cards' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ -d '{"token": "9b2d63e00d66a8c721607214cedaecda", "issuer_id": "3245612", "payment_method_id": "visa"}' ``` \> NOTE > > For more information, see \[Integration test\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/Integration-test). :::::: ::::::AccordionComponent{title="Generate a card token"} Before processing the first charge with the stored card, use one of the SDKs below to generate a new token from its ID (\`card\_id\`). php phpnodejavadotnetrubypythoncurl ``` "cardId" ]; $card_token = $client->create($request); var_dump($card_token); } catch (MPApiException $e) { echo "Status code: " . $e->getApiResponse()->getStatusCode() . "\n"; echo "Content: "; var_dump($e->getApiResponse()->getContent()); echo "\n"; } catch (\Exception $e) { echo $e->getMessage(); } ``` ``` import { MercadoPagoConfig, CardToken } from 'mercadopago'; const client = new MercadoPagoConfig({ accessToken: '{{YOUR_ACCESS_TOKEN}}' }); const cardToken = new CardToken(client); const body = { card_id : '{{CARD_ID}}' }; cardToken.create({ body }).then(console.log).catch(console.log); ``` ``` import com.mercadopago.client.cardtoken.CardTokenClient; import com.mercadopago.client.cardtoken.CardTokenRequest; import com.mercadopago.exceptions.MPApiException; import com.mercadopago.exceptions.MPException; import com.mercadopago.resources.CardToken; public class App { public static void main(String[] args){ MercadoPagoConfig.setAccessToken("{{YOUR_ACCESS_TOKEN}}"); CardTokenRequest request = CardTokenRequest.builder().cardId("{{CARD_ID}}").build(); CardTokenClient client = new CardTokenClient(); try { CardToken cardToken = client.create(request); System.out.println(cardToken); } catch (MPApiException ex) { System.out.printf( "MercadoPago Error. Status: %s, Content: %s%n", ex.getApiResponse().getStatusCode(), ex.getApiResponse().getContent()); } catch (MPException ex) { ex.printStackTrace(); } } } ``` ``` using System; using MercadoPago.Config; using MercadoPago.Client.CardToken; using MercadoPago.Resource.CardToken; MercadoPagoConfig.AccessToken = "{{YOUR_ACCESS_TOKEN}}"; var request = new CardTokenRequest { CardId = "{{CARD_ID}}" }; var client = new CardTokenClient(); CardToken cardToken = await client.CreateAsync(request); Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(cardToken)); ``` ``` require_relative '../lib/mercadopago.rb' sdk = Mercadopago::SDK.new('{{YOUR_ACCESS_TOKEN}}') card_token_request = { card_id: '{{CARD_ID}}' } card_token_response = sdk.card_token.create(card_token_request) card_token = card_token_response[:response] puts card_token ``` ``` import mercadopago sdk = mercadopago.SDK("{{YOUR_ACCESS_TOKEN}}") card_token_data = { "card_id": "{{CARD_ID}}" } result = sdk.card_token().create(card_token_data) card_token = result["response"] print(card_token) ``` ``` curl --location --request POST 'https://api.mercadopago.com/v1/card_tokens' \ --header 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "card_id": {{card_id}} }' ``` \> NOTE > > Follow the step-by-step guide and prevent fraudulent payments with our recommendations to \[improve the approval of your payments.\](https://www.mercadopago.cl/developers/en/docs/checkout-api-payments/how-tos/improve-payment-approval) :::::: ::::::AccordionComponent{title="Process first charge with a stored card"} Once you have validated the card and obtained the necessary customer data, use the previously generated card token and the associated customer ID to register the payment. In addition to the minimum required fields for the request (\`token\`, \`transaction\_amount\`, \`installments\`, \`payment\_method\_id\`, \`payer.id\`, and \`payer.type\`), sending \`point\_of\_interaction.type = "CREDENTIAL\_ON\_FILE"\` is also required to correctly classify each recurring transaction with card networks and card issuers, ensuring greater approval precision. Reuse the identifiers obtained in the card validation to retain the link to the transaction that started the chain. If the original CIT identifiers are unavailable, send data you stored from an approved MIT in the same chain. If you have no identifiers yet, the MIT charge can be sent without \`reference.id\` and without \`network\_data\`. Include the \`X-Expand-Response-Nodes: gateway.reference\` header to obtain the network identifiers. When the MIT is approved, store the \`id\` and the values returned in \`expanded.gateway.reference\` to send them in the next related MITs. If the cardholder changes cards, see \[Update cards\](#bookmark\_update\_cards). > WARNING > > The charge value must be an integer. In other words, \*\*decimal places cannot be used\*\*. The example below corresponds to a subscription (\`sub\_type: recurring\`). If you validated the card for event-based charges, send \`sub\_type: unscheduled\` and do not include the subscription fields (\`subscription\_id\`, \`subscription\_sequence\`, \`invoice\_period\`, and \`billing\_date\`), as in Automatic merchant-initiated by event (MIT). php phpnodejavarubycsharppythoncurl ``` setCustomHeaders(["X-Idempotency-Key: {{SOME_UNIQUE_VALUE}}"]); $payment = $client->create([ "transaction_amount" => 100.0, "token" => "ff8080814c11e237014c1ff593b57b4d", "description" => "My product", "installments" => 1, "payment_method_id" => "master", "issuer_id" => "123", "payer" => [ "type" => "customer", "id" => "123456789-jxOV430go9fx2e" ], "point_of_interaction" => [ "type" => "CREDENTIAL_ON_FILE", "sub_type" => "recurring", "transaction_data" => [ "first_transaction" => false, "storage" => "stored", "transaction_initiator" => "merchant", "network_data" => [ "transaction_id" => "MDSKDILUR0909", "transaction_link_id" => "8fhc6lioSIexrqS6au-SPA" ], "subscription_id" => "87654321", "subscription_sequence" => [ "number" => 1, "total" => 10 ], "invoice_period" => [ "period" => 1, "type" => "monthly" ], "billing_date" => "2026-01-25", "reference" => [ "id" => "20792195335" ] ] ] ], $request_options); echo implode($payment); ?> ``` ``` const client = new MercadoPagoConfig({ accessToken: '{{YOUR_ACCESS_TOKEN}}' }); const payment = new Payment(client); const body = { transaction_amount: 100, token: 'ff8080814c11e237014c1ff593b57b4d', description: 'My product', installments: 1, payment_method_id: 'master', issuer_id: 123, payer: { type: 'customer', id: '123456789-jxOV430go9fx2e' }, point_of_interaction: { type: 'CREDENTIAL_ON_FILE', sub_type: 'recurring', transaction_data: { first_transaction: false, storage: 'stored', transaction_initiator: 'merchant', network_data: { transaction_id: 'MDSKDILUR0909', transaction_link_id: '8fhc6lioSIexrqS6au-SPA' }, subscription_id: '87654321', subscription_sequence: { number: 1, total: 10 }, invoice_period: { period: 1, type: 'monthly' }, billing_date: '2026-01-25', reference: { id: '20792195335' } } } }; payment.create({ body: body }).then((result) => console.log(result)); ``` ``` MercadoPagoConfig.setAccessToken("{{YOUR_ACCESS_TOKEN}}"); PaymentClient client = new PaymentClient(); PaymentCreateRequest request = PaymentCreateRequest.builder() .transactionAmount(new BigDecimal("100")) .installments(1) .token("ff8080814c11e237014c1ff593b57b4d") .paymentMethodId("master") .payer(PaymentPayerRequest.builder() .type("customer") .id("123456789-jxOV430go9fx2e") .build()) .pointOfInteraction( PaymentPointOfInteractionRequest.builder() .type("CREDENTIAL_ON_FILE") .subType("recurring") .transactionData( PaymentTransactionDataRequest.builder() .firstTransaction(false) .storage("stored") .transactionInitiator("merchant") .networkData( PaymentNetworkDataRequest.builder() .transactionId("MDSKDILUR0909") .transactionLinkId("8fhc6lioSIexrqS6au-SPA") .build()) .subscriptionId("87654321") .subscriptionSequence( PaymentSubscriptionSequenceRequest.builder() .number(1) .total(10) .build()) .invoicePeriod( PaymentInvoicePeriodRequest.builder() .period(1) .type("monthly") .build()) .billingDate("2026-01-25") .reference(PaymentReferenceRequest.builder().id("20792195335").build()) .build()) .build()) .build(); client.create(request); ``` ``` require 'mercadopago' sdk = Mercadopago::SDK.new('{{YOUR_ACCESS_TOKEN}}') payment_request = { token: 'ff8080814c11e237014c1ff593b57b4d', installments: 1, transaction_amount: 100, payment_method_id: 'master', payer: { type: 'customer', id: '123456789-jxOV430go9fx2e' }, point_of_interaction: { type: 'CREDENTIAL_ON_FILE', sub_type: 'recurring', transaction_data: { first_transaction: false, storage: 'stored', transaction_initiator: 'merchant', network_data: { transaction_id: 'MDSKDILUR0909', transaction_link_id: '8fhc6lioSIexrqS6au-SPA' }, subscription_id: '87654321', subscription_sequence: { number: 1, total: 10 }, invoice_period: { period: 1, type: 'monthly' }, billing_date: '2026-01-25', reference: { id: '20792195335' } } } } payment_response = sdk.payment.create(payment_request) payment = payment_response[:response] ``` ``` using MercadoPago.Config; using MercadoPago.Client.Payment; using MercadoPago.Resource.Payment; MercadoPagoConfig.AccessToken = "{{YOUR_ACCESS_TOKEN}}"; var request = new PaymentCreateRequest { TransactionAmount = 100, Token = "ff8080814c11e237014c1ff593b57b4d", Installments = 1, PaymentMethodId = "master", Payer = new PaymentPayerRequest { Type = "customer", Id = "123456789-jxOV430go9fx2e", }, PointOfInteraction = new PaymentPointOfInteractionRequest { Type = "CREDENTIAL_ON_FILE", SubType = "recurring", TransactionData = new PaymentTransactionDataRequest { FirstTransaction = false, Storage = "stored", TransactionInitiator = "merchant", NetworkData = new PaymentNetworkDataRequest { TransactionId = "MDSKDILUR0909", TransactionLinkId = "8fhc6lioSIexrqS6au-SPA" }, SubscriptionId = "87654321", SubscriptionSequence = new PaymentSubscriptionSequenceRequest { Number = 1, Total = 10 }, InvoicePeriod = new PaymentInvoicePeriodRequest { Period = 1, Type = "monthly" }, BillingDate = "2026-01-25", Reference = new PaymentReferenceRequest { Id = "20792195335" } } }, }; var client = new PaymentClient(); Payment payment = await client.CreateAsync(request); ``` ``` import mercadopago sdk = mercadopago.SDK("{{YOUR_ACCESS_TOKEN}}") payment_data = { "transaction_amount": 100, "token": 'ff8080814c11e237014c1ff593b57b4d', "installments": 1, "payment_method_id": "master", "payer": { "type": "customer", "id": "123456789-jxOV430go9fx2e" }, "point_of_interaction": { "type": "CREDENTIAL_ON_FILE", "sub_type": "recurring", "transaction_data": { "first_transaction": False, "storage": "stored", "transaction_initiator": "merchant", "network_data": { "transaction_id": "MDSKDILUR0909", "transaction_link_id": "8fhc6lioSIexrqS6au-SPA" }, "subscription_id": "87654321", "subscription_sequence": { "number": 1, "total": 10 }, "invoice_period": { "period": 1, "type": "monthly" }, "billing_date": "2026-01-25", "reference": { "id": "20792195335" } } } } payment_response = sdk.payment().create(payment_data) payment = payment_response["response"] ``` ``` curl -X POST \ 'https://api.mercadopago.com/v1/payments' \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ -H 'X-Idempotency-Key: {{SOME_UNIQUE_VALUE}}' \ -H 'X-Expand-Response-Nodes: gateway.reference' \ -d '{ "transaction_amount": 100, "token": "ff8080814c11e237014c1ff593b57b4d", "installments": 1, "payment_method_id": "master", "payer": { "type": "customer", "id": "123456789-jxOV430go9fx2e" }, "description": "subscription payment", "notification_url": "https://your-webhook.com", "statement_descriptor": "Your store", "external_reference": "49646973", "additional_info": { "items": [ { "id": "FT9200101024", "title": "your product", "quantity": 1, "unit_price": 100 } ], "payer": { "phone": { "area_code": "54", "number": "1234567" }, "first_name": "MARTINEZ", "last_name": "GODOY", "address": { "zip_code": "2804", "street_name": "Mendoza", "street_number": "125" }, "registration_date": null } }, "point_of_interaction": { "type": "CREDENTIAL_ON_FILE", "sub_type": "recurring", "transaction_data": { "first_transaction": false, "storage": "stored", "transaction_initiator": "merchant", "network_data": { "transaction_id": "MDSKDILUR0909", "transaction_link_id": "8fhc6lioSIexrqS6au-SPA" }, "subscription_id": "87654321", "subscription_sequence": { "number": 1, "total": 10 }, "invoice_period": { "period": 1, "type": "monthly" }, "billing_date": "2026-01-25", "reference": { "id": "20792195335" } } } }' ``` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Product cost. | \`100\` | | \`token\` | Required | String. Card token identifier. The token is generated from the card data itself, providing greater security in the payment process. | \`ff8080814c11e237014c1ff593b57b4d\` | | \`installments\` | Required | Integer. Number of installments selected. | \`1\` | | \`payment\_method\_id\` | Required | String. Indicates the identifier of the payment method selected to make the payment. | \`master\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`payer.id\` | Required | String. ID of the customer associated with the card. | \`123456789-jxOV430go9fx2e\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Use the same value as the card validation: \`recurring\` for charges with a defined frequency, such as subscriptions, or \`unscheduled\` for charges without a fixed schedule. | \`recurring\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`false\`: the chain was started in the card validation. Replaces the \`first\_time\_use\` field used in previous integrations. | \`false\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`stored\`. | \`stored\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`merchant\`. Replaces the \`user\_present\` field used in previous integrations. | \`merchant\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | Conditionally required | String. Identifier of the transaction in the card brand (for example, transaction ID in Visa and trace ID in Mastercard). Prioritize the original CIT identifier; for MITs without it, use one from an approved MIT in the same chain. Always send it when available. If you do not have it, omit \`network\_data\` in the first MIT and store the identifiers returned in the first approved MIT. | \`MDSKDILUR0909\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Conditionally required | String. Mastercard Transaction Link ID, returned alongside \`transaction\_id\`. Other card brands do not return it. Always send it when available. If you do not have it, follow the guidance for \`network\_data.transaction\_id\`. | \`8fhc6lioSIexrqS6au-SPA\` | | \`point\_of\_interaction.transaction\_data.subscription\_id\` | Required | String. Same unique subscription identifier used in the initial (CIT) transaction. | \`87654321\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.number\` | Optional | Integer. Position of the invoice in the subscription series. Starts at \`1\` and is incremented with each new invoice. When retrying a declined charge, send the same number as the original invoice. | \`1\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.total\` | Optional | Integer. Total number of invoices in the subscription. For open-ended subscriptions, must be \`null\`. | \`10\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.period\` | Conditionally required | Integer. Indicates the frequency of the billing cycle. Required when \`invoice\_period.type\` is sent. | \`1\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.type\` | Conditionally required | String. Indicates the billing period type (\`monthly\`, \`daily\`, \`yearly\`, \`quarterly\`). Required when \`invoice\_period.period\` is sent. | \`monthly\` | | \`point\_of\_interaction.transaction\_data.billing\_date\` | Required | String. Date of the invoice the payment corresponds to, in ISO 8601 format (\`YYYY-MM-DD\`). It corresponds to the date of the first charge attempt of the cycle. When retrying a declined charge, always send the original invoice date, not the retry date. | \`2026-01-25\` | | \`point\_of\_interaction.transaction\_data.reference.id\` | Conditionally required | String. ID of the first CIT transaction in the chain. For MITs without the CIT identifier, use the ID of an approved MIT in the same chain. Always send it when available; if you do not have it, omit it and store the first approved MIT’s ID for the next related MITs. Replaces the \`payment\_reference.id\` field used in previous integrations. | \`20792195335\` | :::::: ::::::AccordionComponent{title="Process subsequent charges"} After the card is stored and the first transaction is complete, subsequent charges can occur in three situations: - \[Automatic merchant-initiated by fixed schedule (MIT)\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/recurring-charges#editor\_7:\~:text=by%20cardholder%20(CIT)-,Automatic,-charges%20triggered%20by): the merchant charges automatically on the agreed date, without any action from the customer, such as the monthly renewal of a subscription. - \[Automatic merchant-initiated by event (MIT)\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/recurring-charges#editor\_7:\~:text=by%20cardholder%20(CIT)-,Automatic,-charge%20initiated%20by): the merchant charges when a usage event occurs, without a defined frequency, such as a debit when passing through a toll. - \[One-time purchase by cardholder (CIT)\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/recurring-charges#editor\_7:\~:text=by%20cardholder%20(CIT)-,Purchase,-initiated%20by%20the): the customer, with a card already saved, initiates a one-time purchase, such as a delivery order or a one-tap ride in an app. Prioritize the identifiers from the initial transaction with the cardholder present: the first payment with CVV, the ZDA validation, or the original CIT with the previous provider. When those identifiers are available, retain them in subsequent charges. If you do not have the original CIT identifiers, you can send the \`reference.id\` and \`network\_data\` from an approved MIT in the same chain, such as the last approved MIT whose identifiers you stored. If you have no identifiers, send the MIT charge without these fields and include the \`X-Expand-Response-Nodes: gateway.reference\` header. After the first approved MIT in which you obtain this data, store its \`id\` and the returned network identifiers. Reuse them in the next MITs related to the same recurring payment. The names returned in the response do not match the fields expected in the next request. Use the mapping below to send data from the chosen reference transaction: | Field returned in the response | Field to send in the request | Card brand | |---|---|---| | \`expanded.gateway.reference.network\_transaction\_id\` | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | All brands, when returned | | \`expanded.gateway.reference.network\_transaction\_link\_id\` | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Mastercard | | Reference transaction \`id\` | \`point\_of\_interaction.transaction\_data.reference.id\` | All brands | For example, if you did not have the CIT identifiers and stored the first approved MIT response with \`id: 20792195337\`, the \`point\_of\_interaction\` fragment for the next MIT in that subscription uses the values below. Complete the other request fields as shown in the charge examples: \`\`\`json { "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "merchant", "network\_data": { "transaction\_id": "MDSKDILUR0909", "transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" }, "subscription\_id": "87654321", "subscription\_sequence": { "number": 2, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-02-25", "reference": { "id": "20792195337" } } } } \`\`\` Always send the identifiers you have. Migrated cards or cards stored in Mercado Pago before the migration can continue to be charged without this data, with a possible impact on approval. When the CIT identifiers are unavailable, start sending those from the first approved MIT in which you stored them. Identifier priority and recovery of missing data follow the same logic whether you process only with Mercado Pago or with multiple providers. Send \`reference.id\` and the applicable \`network\_data\` fields whenever you have them. For card brands other than Mastercard, the response returns \`network\_transaction\_id\` only, so the \`network\_data\` node is sent with \`transaction\_id\` alone. > WARNING > > For all card brands, send the available payment chain identifiers in every subsequent CIT or MIT charge. For MITs without the original CIT identifiers, use an approved MIT as the reference as described above. Missing data can affect approval and chargeback dispute analysis. If the cardholder changes cards, see \[Update cards\](#bookmark\_update\_cards). If your integration was built before these changes, update the fields below in \`point\_of\_interaction\`. The previous values (\`SUBSCRIPTIONS\`, \`first\_time\_use\`, \`user\_present\`, \`payment\_reference.id\`, and \`network\_transaction\_id\`) will be deprecated. We recommend migrating as soon as possible; the deprecation date will be communicated in advance. | Field | Previous value | What to send now | |---|---|---| | \`type\` | \`SUBSCRIPTIONS\` | \`CREDENTIAL\_ON\_FILE\` | | \`sub\_type\` | not sent | \`recurring\` for charges with a defined frequency, such as subscriptions, or \`unscheduled\` for charges without a fixed schedule, such as usage-based charges | | \`transaction\_data.network\_transaction\_id\` | identifier directly in the field | \`transaction\_data.network\_data\` node | | \`transaction\_data.first\_time\_use\` | \`true\` or \`false\` | \`transaction\_data.first\_transaction\`, with the same value, together with \`transaction\_data.storage\`: \`store\` when storing the card and \`stored\` when reusing it | | \`transaction\_data.user\_present\` | \`true\` or \`false\` | \`transaction\_data.transaction\_initiator\`: \`customer\` instead of \`true\` and \`merchant\` instead of \`false\` | | \`transaction\_data.payment\_reference.id\` | ID of the original payment | \`transaction\_data.reference.id\`, with the same value | What was previously expressed with \`type: SUBSCRIPTIONS\` is now expressed with \`type: CREDENTIAL\_ON\_FILE\` and a \`sub\_type: recurring\` for charges with a defined frequency or \`unscheduled\` for charges without a fixed schedule. To update an existing integration, see \[How to update the Automatic Payments integration using the Payments API\](https://www.mercadopago.cl/developers/en/docs/automatic-payments/how-to-update-payments-api-integrations). :::::TabsComponent ::::TabComponent{title="Automatic merchant-initiated by fixed schedule (MIT)"} Automatic charges triggered by the merchant according to the agreed schedule, without customer intervention. > WARNING > > Use the first CIT transaction ID for the subscription as \`reference.id\`. If you do not have that identifier, send the ID of an approved MIT for the same recurring payment whose data you stored. If you have no identifiers yet, the charge can continue without it; store the first approved MIT’s data to use in the next related MITs. To process subsequent automatic charges, send a request to the endpoint \[/v1/payments\](https://www.mercadopago.cl/developers/en/reference/online-payments/checkout-api-payments/create-payment/post). \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 100, "token": "12346622341", "payment\_method\_id": "master", "payer": { "id": "123456789-jxOV430go9fx2e", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "recurring", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "merchant", "network\_data": { "transaction\_id": "MDSKDILUR0909", "transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" }, "subscription\_id": "87654321", "subscription\_sequence": { "number": 2, "total": 12 }, "invoice\_period": { "period": 1, "type": "monthly" }, "billing\_date": "2026-02-25", "reference": { "id": "20792195335" } } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Transaction amount. | \`100\` | | \`token\` | Required | String. Card token identifier. | \`12346622341\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789-jxOV430go9fx2e\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`recurring\`. | \`recurring\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`false\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`false\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`stored\`. | \`stored\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`merchant\`. Replaces the \`user\_present\` field used in previous integrations. | \`merchant\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | Conditionally required | String. Identifier of the transaction in the card brand (for example, transaction ID in Visa and trace ID in Mastercard). Prioritize the original CIT identifier; for MITs without it, use one from an approved MIT in the same chain. Always send it when available. If you do not have it, omit \`network\_data\` in the first MIT and store the identifiers returned in the first approved MIT. | \`MDSKDILUR0909\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Conditionally required | String. Mastercard Transaction Link ID, returned alongside \`transaction\_id\`. Other card brands do not return it. Always send it when available. If you do not have it, follow the guidance for \`network\_data.transaction\_id\`. | \`8fhc6lioSIexrqS6au-SPA\` | | \`point\_of\_interaction.transaction\_data.subscription\_id\` | Required | String. Same unique subscription identifier used in the initial (CIT) transaction. | \`87654321\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.number\` | Optional | Integer. Position of the invoice in the subscription series. Starts at \`1\` and is incremented with each new invoice. When retrying a declined charge, send the same number as the original invoice. | \`2\` | | \`point\_of\_interaction.transaction\_data.subscription\_sequence.total\` | Optional | Integer. Total number of invoices in the subscription. For open-ended subscriptions, must be \`null\`. | \`12\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.period\` | Conditionally required | Integer. Indicates the frequency of the billing cycle. Required when \`invoice\_period.type\` is sent. | \`1\` | | \`point\_of\_interaction.transaction\_data.invoice\_period.type\` | Conditionally required | String. Indicates the billing period type: \`monthly\`, \`daily\`, \`yearly\`, or \`quarterly\`. Required when \`invoice\_period.period\` is sent. | \`monthly\` | | \`point\_of\_interaction.transaction\_data.billing\_date\` | Required | String. Date of the invoice the payment corresponds to, in ISO 8601 format (\`YYYY-MM-DD\`). It corresponds to the date of the first charge attempt of the cycle. When retrying a declined charge, always send the original invoice date, not the retry date. | \`2026-02-25\` | | \`point\_of\_interaction.transaction\_data.reference.id\` | Conditionally required | String. ID of the first CIT transaction in the chain. For MITs without the CIT identifier, use the ID of an approved MIT in the same chain. Always send it when available; if you do not have it, omit it and store the first approved MIT’s ID for the next related MITs. Replaces the \`payment\_reference.id\` field used in previous integrations. | \`20792195335\` | :::: ::::TabComponent{title="Automatic merchant-initiated by event (MIT)"} Automatic charge initiated by the merchant based on a usage event, without a defined frequency and without customer intervention. The subscription fields are not required: \`subscription\_id\`, \`subscription\_sequence\`, \`invoice\_period\`, and \`billing\_date\`. To process event-based charges, send a request to the endpoint \[/v1/payments\](https://www.mercadopago.cl/developers/en/reference/online-payments/checkout-api-payments/create-payment/post). \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 15, "token": "12346622341", "payment\_method\_id": "master", "payer": { "id": "123456789-jxOV430go9fx2e", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "unscheduled", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "merchant", "network\_data": { "transaction\_id": "MDSKDILUR0909", "transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" }, "reference": { "id": "20792195335" } } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Transaction amount. | \`15\` | | \`token\` | Required | String. Card token identifier. | \`12346622341\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789-jxOV430go9fx2e\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`unscheduled\`. | \`unscheduled\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`false\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`false\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`stored\`. | \`stored\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`merchant\`. Replaces the \`user\_present\` field used in previous integrations. | \`merchant\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | Conditionally required | String. Identifier of the transaction in the card brand (for example, transaction ID in Visa and trace ID in Mastercard). Prioritize the original CIT identifier; for MITs without it, use one from an approved MIT in the same chain. Always send it when available. If you do not have it, omit \`network\_data\` in the first MIT and store the identifiers returned in the first approved MIT. | \`MDSKDILUR0909\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Conditionally required | String. Mastercard Transaction Link ID, returned alongside \`transaction\_id\`. Other card brands do not return it. Always send it when available. If you do not have it, follow the guidance for \`network\_data.transaction\_id\`. | \`8fhc6lioSIexrqS6au-SPA\` | | \`point\_of\_interaction.transaction\_data.reference.id\` | Conditionally required | String. ID of the first CIT transaction in the chain. For MITs without the CIT identifier, use the ID of an approved MIT in the same chain. Always send it when available; if you do not have it, omit it and store the first approved MIT’s ID for the next related MITs. Replaces the \`payment\_reference.id\` field used in previous integrations. | \`20792195335\` | :::: ::::TabComponent{title="One-time purchase by cardholder (CIT)"} Purchase initiated by the cardholder with an already stored card, without a defined frequency. The cardholder is active in the session at the time of the transaction. Send \`reference.id\` and the applicable \`network\_data\` identifiers whenever they are available. If the cardholder changes cards, see \[Update cards\](#bookmark\_update\_cards). To process the one-time purchase, send a request to the endpoint \[/v1/payments\](https://www.mercadopago.cl/developers/en/reference/online-payments/checkout-api-payments/create-payment/post). \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/payments' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \\ -H 'X-Idempotency-Key: {{SOME\_UNIQUE\_VALUE}}' \\ -H 'X-Expand-Response-Nodes: gateway.reference' \\ -d '{ "transaction\_amount": 35, "token": "12346622341", "payment\_method\_id": "master", "payer": { "id": "123456789-jxOV430go9fx2e", "type": "customer" }, "point\_of\_interaction": { "type": "CREDENTIAL\_ON\_FILE", "sub\_type": "unscheduled", "transaction\_data": { "first\_transaction": false, "storage": "stored", "transaction\_initiator": "customer", "network\_data": { "transaction\_id": "MDSKDILUR0909", "transaction\_link\_id": "8fhc6lioSIexrqS6au-SPA" }, "reference": { "id": "20792195335" } } } }' \`\`\` | Parameter | Required | Type and description | Example | |---|---|---|---| | \`transaction\_amount\` | Required | Number. Transaction amount. | \`35\` | | \`token\` | Required | String. Card token identifier. | \`12346622341\` | | \`payment\_method\_id\` | Required | String. Payment method identifier. | \`master\` | | \`payer.id\` | Required | String. Customer ID in Mercado Pago. | \`123456789-jxOV430go9fx2e\` | | \`payer.type\` | Required | String. Payer identification type. Must be \`customer\`. | \`customer\` | | \`point\_of\_interaction.type\` | Required | String. Classifies the type of Point of Interaction (POI) applied to the transaction. Must be \`CREDENTIAL\_ON\_FILE\`. The \`SUBSCRIPTIONS\` value used in previous integrations will be deprecated. | \`CREDENTIAL\_ON\_FILE\` | | \`point\_of\_interaction.sub\_type\` | Required | String. Defines the nature of the charge. Must be \`unscheduled\`. | \`unscheduled\` | | \`point\_of\_interaction.transaction\_data.first\_transaction\` | Required | Boolean. Indicates whether this is the start of a new charge chain. Must be \`false\`. Replaces the \`first\_time\_use\` field used in previous integrations. | \`false\` | | \`point\_of\_interaction.transaction\_data.storage\` | Required | String. Credential storage state. Must be \`stored\`. | \`stored\` | | \`point\_of\_interaction.transaction\_data.transaction\_initiator\` | Required | String. Identifies who initiates the transaction. Must be \`customer\`. Replaces the \`user\_present\` field used in previous integrations. | \`customer\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_id\` | Conditionally required | String. Identifier of the transaction in the card brand (for example, transaction ID in Visa and trace ID in Mastercard). Prioritize the original CIT identifier; for MITs without it, use one from an approved MIT in the same chain. Always send it when available. If you do not have it, omit \`network\_data\` in the first MIT and store the identifiers returned in the first approved MIT. | \`MDSKDILUR0909\` | | \`point\_of\_interaction.transaction\_data.network\_data.transaction\_link\_id\` | Conditionally required | String. Mastercard Transaction Link ID, returned alongside \`transaction\_id\`. Other card brands do not return it. Always send it when available. If you do not have it, follow the guidance for \`network\_data.transaction\_id\`. | \`8fhc6lioSIexrqS6au-SPA\` | | \`point\_of\_interaction.transaction\_data.reference.id\` | Conditionally required | String. ID of the first CIT transaction in the chain. Retain this reference in following purchases. Always send it when available. Replaces the \`payment\_reference.id\` field used in previous integrations. | \`20792195335\` | :::: ::::: :::::: ::::::AccordionComponent{title="Update cards"} If necessary, it is possible to add new cards to a specific customer. To do this, locate the customer and define the new card details using one of the available SDK below. > NOTE > > If it is necessary to delete a card before adding new cards to a customer, send a request to the endpoint \[/v1/customers/{customer\_id}/cards/{id}\](https://www.mercadopago.cl/developers/en/reference/online-payments/checkout-api-payments/cards/delete-card/delete) providing the \`customer\_id\` and the \`id\` of the card you want to delete. After the successful execution of the request, you can add the new card. php phpnodejavarubycsharppythoncurl ``` get("1234"); $card_client = new CustomerCardClient(); $customer_card = $card_client->create($customer->id, [ "token" => "your_card_token", "issuer_id" => "2345", "payment_method_id" => "debit_card" ]); echo implode($customer_card); ?> ``` ``` const client = new MercadoPagoConfig({ accessToken: '{{YOUR_ACCESS_TOKEN}}' }); const customerClient = new Customer(client); const customer = customerClient.get({ customerId: '{{CUSTOMER_ID}}' }) .then((result) => { const cardClient = new CustomerCard(client); const body = { token: '{{CARD_TOKEN}}', issuer_id: '2345', payment_method_id: 'debit_card' }; cardClient.create({ customerId: result.id, body: body }) .then(console.log).catch(console.log); }); ``` ``` MercadoPagoConfig.setAccessToken("{{YOUR_ACCESS_TOKEN}}"); CustomerClient customerClient = new CustomerClient(); CustomerCardClient customerCardClient = new CustomerCardClient(); Customer customer = customerClient.get("247711297-jxOV430go9fx2e"); CustomerCardIssuer issuer = CustomerCardIssuer.builder() .id("3245612") .build(); CustomerCardCreateRequest cardCreateRequest = CustomerCardCreateRequest.builder() .token("9b2d63e00d66a8c721607214cedaecda") .issuer(issuer) .paymentMethodId("debit_card") .build(); customerCardClient.create(customer.getId(), cardCreateRequest); ``` ``` require 'mercadopago' sdk = Mercadopago::SDK.new('{{YOUR_ACCESS_TOKEN}}') customer_response = sdk.customer.get('247711297-jxOV430go9fx2e') customer = customer_response[:response] card_request = { token: '9b2d63e00d66a8c721607214cedaecda', issuer_id: '3245612', payment_method_id: 'debit_card' } card_response = sdk.card.create(customer['id'], card_request) card = card_response[:response] puts card ``` ``` MercadoPagoConfig.AccessToken = "{{YOUR_ACCESS_TOKEN}}"; var customerClient = new CustomerClient(); Customer customer = await customerClient.GetAsync("247711297-jxOV430go9fx2e"); var cardRequest = new CustomerCardCreateRequest { Token = "9b2d63e00d66a8c721607214cedaecda", }; CustomerCard card = await customerClient.CreateCardAsync(customer.Id, cardRequest); Console.WriteLine(card.Id); ``` ``` import mercadopago sdk = mercadopago.SDK("{{YOUR_ACCESS_TOKEN}}") customer_response = sdk.customer().get("247711297-jxOV430go9fx2e") customer = customer_response["response"] card_data = { "token": "9b2d63e00d66a8c721607214cedaecda", "issuer_id": "3245612", "payment_method_id": "debit_card" } card_response = sdk.card().create(customer["id"], card_data) card = card_response["response"] print(card) ``` ``` curl -X GET \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ 'https://api.mercadopago.com/v1/customers/CUSTOMER_ID/cards' \ curl -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer {{YOUR_ACCESS_TOKEN}}' \ 'https://api.mercadopago.com/v1/customers/CUSTOMER_ID/cards' \ -d '{"token": "9b2d63e00d66a8c721607214cedaecda", "issuer": {"id": "3245612"}, "payment_method_id":"debit_card"}' ``` \> WARNING > > When replacing or adding a new card to a customer, the identifiers generated with the previous card \*\*must not be reused\*\* in subsequent charges. They are exclusively linked to the card with which they were generated. Perform a new transaction with the cardholder present (CIT) to obtain the new card identifiers and use those values in following charges. ::::::