# MD for: https://www.mercadopago.com.pe/developers/es/docs/checkout-api-payments/how-tos/payment-approval/saved-cards.md \# Save cards Save buyer data in your store to speed up future purchases. This configuration allows you to \*\*reuse payment data previously tokenized by the Mercado Pago API\*\*, avoiding the resending of sensitive information in each transaction. It reduces input errors, simplifies the authorization flow and allows the reuse of cards already validated in previous transactions, which tends to avoid rejections due to data inconsistency and increase payment approval rates. Below you'll find the documentation to implement and manage saved cards in your integration. :::::AccordionComponent{title="Create customer and card"} Create the customer and card through the :TagComponent{tag="API" text="Create customer" href="/developers/en/reference/online-payments/checkout-api-payments/customers/create-customer/post"} and :TagComponent{tag="API" text="Save card" href="/developers/en/reference/online-payments/checkout-api-payments/cards/save-card/post"} APIs. To do this, you must use your :toolTipComponent\[Production Access Token\]{content="Private key of the application created in Mercado Pago, used in the backend for production operations. You can access it in Your integrations > Application details > Production credentials."}. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} First, send a \*\*POST\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers" href="/developers/en/reference/online-payments/checkout-api-payments/customers/create-customer/post"} to create the customer. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v1/customers'\\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer APP\_USR-1\*\*\*\*\*\*\*\*\*685765-12\*\*\*\*\*\*\*\*\*1b4332e5c\*\*\*\*\*\*\*\*\*e077d7679\*\*\*\*\*\*\*\*\*664' \\ -d '{ "email": "jhon@doe.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": "2021-10-20T11:37:30.000-04:00", "description": "Description del user", "default\_card": "None" }' \`\`\` | Field | Description | Required | | :---- | :---- | :---- | | \`email\` | Email address of the customer. If you use test users, the email must follow the format \`test\_payer\_\[0-9\]{1,10}@testuser.com\`. | Required | | \`first\_name\` | Customer's first name. | Optional | | \`last\_name\` | Customer's last name. | Optional | | \`phone\` | Object containing the customer's phone information. | Optional | | \`phone.area\_code\` | Phone area code. | Optional | | \`phone.number\` | Phone number without area code. | Optional | | \`identification\` | Object containing the customer's identification information. | Optional | | \`identification.type\` | Type of identification document (e.g., CPF, DNI, CNPJ). | Optional | | \`identification.number\` | Identification document number. | Optional | | \`default\_address\` | Name of the customer's default address. | Optional | | \`address\` | Object containing the customer's address information. | Optional | | \`address.id\` | Address identifier. | Optional | | \`address.zip\_code\` | Address postal code. | Optional | | \`address.street\_name\` | Street name. | Optional | | \`address.street\_number\` | Address number. | Optional | | \`address.city\` | Object containing the city information. | Optional | | \`date\_registered\` | Customer registration date in ISO 8601 format. | Optional | | \`description\` | Additional customer description. | Optional | | \`default\_card\` | Default card identifier. Can be \`"None"\` if there is no default card. | Optional | Then, send a \*\*POST\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{id}/cards" href="/developers/en/reference/online-payments/checkout-api-payments/cards/save-card/post"} with the \*\*Customer ID\*\* (\`customer\_id\`) in the path to perform the association, and the card \`token\` in the \_body\_ of the request. \`\`\`curl curl -X POST \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/customers/CUSTOMER\_ID/cards' \\ -d '{"token": "9b2d63e00d66a8c721607214cedaecda"}' \`\`\` | Field | Description | Required | | :---- | :---- | :---- | | \`token\` | \*Token\* generated (usually via \[SDKs\](https://www.mercadopago.com.pe/developers/en/docs/sdks-library/landing)) that securely represents the card's sensitive data. | Required | After successful creation, objects are identified with these prefixes: | Prefix | Description | Example | | :---- | :---- | :---- | | \`customer\` | Customer prefix. | \`custID+xyz123\` | | \`card\` | Card prefix. | \`card\_abc456\` | > For complete details on fields and methods, see the API references \[Create customer\](https://www.mercadopago.com.pe/developers/en/reference/online-payments/checkout-api-payments/customers/create-customer/post) and \[Save card\](https://www.mercadopago.com.pe/developers/en/reference/online-payments/checkout-api-payments/cards/save-card/post). The response will return the following result: \`\`\`json { "id": "123456789-jxOV430go9fx2e", "email": "test\_payer@testuser.com", ... "default\_card": "1490022319978", "default\_address": null, "cards": \[{ "id": "1490022319978", "expiration\_month": 12, "expiration\_year": 2020, "first\_six\_digits": "415231", "last\_four\_digits": "0001", ... }\], "addresses": \[\], "live\_mode": false } \`\`\` > WARNING > > If the request response returns an \`invalid parameter\` error with HTTP code 400, check the \`payment\_method\_id\` parameter and make sure the value has been inserted correctly. In addition, when using test users, the customer email must follow the format \`test\_payer\_\[0-9\]{1,10}@testuser.com\`. ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to create a customer and associate a card simultaneously. Below you'll find code examples in the available languages: * [csharp ](#editor%5F1) * [go ](#editor%5F2) * [java ](#editor%5F3) * [javascript ](#editor%5F4) * [php ](#editor%5F5) * [python ](#editor%5F6) * [ruby ](#editor%5F7) csharp go java javascript php python ruby ``` MercadoPagoConfig.AccessToken = "ENV_ACCESS_TOKEN"; var customerRequest = new CustomerRequest { Email = "test_payer@testuser.com", }; var customerClient = new CustomerClient(); Customer customer = await customerClient.CreateAsync(customerRequest); var cardRequest = new CustomerCardCreateRequest { Token = "9b2d63e00d66a8c721607214cedaecda" }; CustomerCard card = await customerClient.CreateCardAsync(customer.Id, cardRequest); ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customercard" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } customerClient := customer.NewClient(cfg) customerCardClient := customercard.NewClient(cfg) customerRequest := customer.Request{Email: "{{EMAIL}}"} customerResource, err := customerClient.Create(context.Background(), customerRequest) if err != nil { fmt.Println(err) return } cardRequest := customercard.Request{Token: "{{CARD_TOKEN}}"} cardResource, err := customerCardClient.Create(context.Background(), customerResource.ID, cardRequest) if err != nil { fmt.Println(err) return } fmt.Println(cardResource) } ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); CustomerClient customerClient = new CustomerClient(); CustomerCardClient customerCardClient = new CustomerCardClient(); CustomerRequest customerRequest = CustomerRequest.builder() .email("test@testuser.com") .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); ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'YOUR_ACCESS_TOKEN' }); const customer = new Customer(client); const body = { email: "test@testuser.com" }; customer.create({ body: body }).then((result) => { const customerCard = new CustomerCard(client); const body = { token : result.token, }; customerCard.create({ customerId: 'customer_id', body }) .then((result) => console.log(result)); }) ``` Copiar ``` create(["email" => "test@testuser.com"]); $client = new CustomerCardClient(); $customer_card = $client->create($customer->id, ["token" => "your_card_token"]); ?> ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") customer_data = { "email": "test_payer@testuser.com" } customer_response = sdk.customer().create(customer_data) customer = customer_response["response"] card_data = { "token": "9b2d63e00d66a8c721607214cedaecda", "payment_method_id": "visa" } card_response = sdk.card().create(customer["id"], card_data) card = card_response["response"] ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') customer_request = { email: 'john@yourdomain.com' } customer_response = sdk.customer.create(customer_request) customer = customer_response[:response] card_request = { token: '9b2d63e00d66a8c721607214cedaecda', payment_method_id: 'visa' } card_response = sdk.card.create(customer['id'], card_request) card = card_response[:response] ``` Copiar SDKs automatically store card data on servers securely when a payment is completed successfully. ::: :::: ::::: :::::AccordionComponent{title="Update customer"} Update any customer information, such as address, card, or email. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} Send a \*\*PUT\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{id}" href="/developers/en/reference/online-payments/checkout-api-payments/customers/update-customer/put"} with the \*\*Customer ID\*\* (\`customer\_id\`) in the path and the \*\*attributes to modify\*\* in the \_body\_ of the request. > NOTE > > If you don't have the \`customer\_id\`, send a \*\*GET\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/search" href="/developers/en/reference/online-payments/checkout-api-payments/customers/search-customer/get"} to get the information. Also, the \`email\` field can only be updated if the customer does not yet have an email address associated with their account. \`\`\`curl curl -X PUT \\ 'https://api.mercadopago.com/v1/customers/{id}' \\ -H 'Authorization: Bearer ACCESS\_TOKEN\_ENV' \\ -d '{ "email": "user@user.com", "first\_name": "john", "last\_name": "wagner", "address": { "zip\_code": "52", "street\_name": "Av. das Nações Unidas", "street\_number": "2" }, "phone": { "area\_code": "11", "number": "001234567" }, "identification": { "type": "CPF", "number": "12341234" }, "description": "Customer information" }' \`\`\` The endpoint accepts modification of \*\*all attributes described in the table below\*\*. | Attribute | Description | | :---- | :---- | | \`address\` | Customer address. | | \`default\_address\` | ID of the customer's default address for shipping. | | \`default\_card\` | ID of the customer's default card for making payments. | | \`description\` | Additional information or notes about the customer. | | \`email\` | Customer email address. Can only be updated if the customer does not yet have an email address associated with their account. | | \`first\_name\` | Customer first name. | | \`last\_name\` | Customer last name. | | \`phone\` | Customer phone number. | | \`identification\` | Customer identification document type and number. | The response will return the following result: \`\`\`json { "id": "xxxxxxxxxxxxxxxxxxxxx", "email": "user@user.com", "first\_name": "john", "last\_name": "wagner", "phone": { "area\_code": "11", "number": "001234567" }, "identification": { "type": "CPF", "number": "12341234" }, "address": { "zip\_code": "52", "street\_name": "Av. das Nações Unidas", "street\_number": 2 }, "description": "Customer information", "date\_created": "2021-05-25T15:36:23.541Z", "metadata": {}, "cards": \[ {} \], "addresses": \[ {} \] } \`\`\` > WARNING > > If the \`customer\_id\` parameter is not sent, the response will return the error \`"message": "missing customer id"\`. ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to modify customer information. Below you'll find code examples in the available languages: * [csharp ](#editor%5F8) * [go ](#editor%5F9) * [java ](#editor%5F10) * [javascript ](#editor%5F11) * [php ](#editor%5F12) * [python ](#editor%5F13) * [ruby ](#editor%5F14) csharp go java javascript php python ruby ``` MercadoPagoConfig.AccessToken = "ENV_ACCESS_TOKEN"; var phoneRequest = new PhoneRequest { AreaCode = "11", Number = "001234567" }; var identificationRequest = new IdentificationRequest { Type = "CPF", Number = "12341234" }; var addressRequest = new AddressRequest { ZipCode = "52", StreetName = "Av. das Nações Unidas", StreetNumber = "2" }; var customerRequest = new CustomerRequest { Email = "test_payer@testuser.com", FirstName = "john", LastName = "wagner", DefaultAddress = "home", Description = "Customer information", DefaultCard = "None", Phone = phoneRequest, Identification = identificationRequest, Address = addressRequest }; var customerClient = new CustomerClient(); Customer customer = await customerClient.Update(customerRequest); ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customer" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customer.NewClient(cfg) request := customer.Request{ Email: "user@user.com", FirstName: "John", LastName: "Wagner", DefaultAddress: "Casa", Phone: &customer.PhoneRequest{ AreaCode: "11", Number: "001234567", }, Identification: &customer.IdentificationRequest{ Type: "CPF", Number: "12341234", }, Address: &customer.AddressRequest{ ZipCode: "52", StreetName: "Av. das Nações Unidas", StreetNumber: "2", }, Description: "Customer information", DefaultCard: "None", } resource, err := client.Update(context.Background(), "", request) if err != nil { fmt.Println(err) return } fmt.Println(resource) } ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); CustomerClient client = new CustomerClient(); CustomerRequest request = CustomerRequest.builder() .email("user@user.com") .firstName("John") .lastName("Wagner") .defaultAddress("Casa") .phone(PhoneRequest.builder() .areaCode("11") .number("001234567") .build()) .identification(IdentificationRequest.builder() .type("CPF") .number("12341234") .build()) .description("Customer information") .defaultCard("None") .address(CustomerAddressRequest.builder() .zipCode("52") .streetName("Av. das Nações Unidas") .streetNumber(2) .build()) .build(); client.update("247711297-jxOV430go9fx2e", request); ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'YOUR_ACCESS_TOKEN' }); const customer = new Customer(client); const body = { email: "test@testuser.com", first_name: "john", last_name: "wagner", phone: { area_code: "11", number: "001234567" }, identification: { type: "CPF", number: "12341234" }, default_address: "Casa", address: { zip_code: "52", street_name: "Av. das Nações Unidas", street_number: "3033" } }; customer.update({ customerId: '', body: body, }).then(console.log).catch(console.log); ``` Copiar ``` update("user_id", [ "email" => "test@testuser.com", "first_name" => "john", "last_name" => "wagner", "phone" => array( "area_code" => "11", "number" => "001234567" ), "identification" => array( "type" => "CPF", "number" => "12341234" ), "default_address" => "Casa", "address" => array( "zip_code" => "52", "street_name" => "Av. das Nações Unidas", "street_number" => "3033" ) ]); ?> ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") customer_data = { "email": 'user@user.com', "first_name": 'john', "last_name": 'wagner', "default_address": 'Casa', "phone": { "area_code": '11', "number": '001234567' }, "identification": { "type": 'CPF', "number": '12341234' }, "address": { "zip_code": '52', "street_name": 'Av. das Nações Unidas', "street_number": '2' }, "description": 'Customer information', "default_card": 'None' } customer_response = sdk.customer().update(customer_id, customer_data) customer = customer_response["response"] ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') customer_request = { email: 'user@user.com', first_name: 'john', last_name: 'wagner', default_address: 'Casa', phone: { area_code: '11', number: '001234567' }, identification: { type: 'CPF', number: '12341234' }, address: { zip_code: '52', street_name: 'Av. das Nações Unidas', street_number: '2' }, description: 'Customer information', default_card: 'None' } customer_response = sdk.customer.update(customer_id ,customer_request) customer = customer_response[:response] ``` Copiar The response will return the following result: \`\`\`json { "id": "0000000000-00000000000000", "email": "usuario@exemplo.com", "first\_name": "Nome", "last\_name": "Sobrenome", "phone": { "area\_code": "00", "number": "000000000" }, "identification": { "type": "DOC", "number": "000000000" }, "address": { "id": "1111111111", "zip\_code": "00000000", "street\_name": "Logradouro", "street\_number": 0 }, "date\_registered": "2000-01-01T00:00:00.000-00:00", "description": "Descricao do usuario", "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": "2026-01-01T00:00:00.000-00:00", "metadata": { "source\_sync": "000000" }, "default\_card": null, "default\_address": "1111111111", "cards": \[\], "addresses": \[ { "apartment": null, "city": { "id": null, "name": "Cidade" }, "comments": null, "country": { "id": "XX", "name": "Pais" }, "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": null, "floor": null, "id": "1111111111", "municipality": { "id": null, "name": null }, "name": null, "neighborhood": { "id": null, "name": null }, "normalized": true, "phone": null, "state": { "id": "XX", "name": "Estado" }, "street\_name": "Logradouro", "street\_number": 0, "verifications": { "shipment": { "errors": \[\], "success": true } }, "zip\_code": "00000000" } \], "live\_mode": false, "user\_id": 1111111111, "merchant\_id": 0, "client\_id": 0, "status": "active" } \`\`\` ::: :::: ::::: :::::AccordionComponent{title="Search customer"} Get specific customer data, such as ID, address, or registration date, through the Customer API. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} Send a \*\*GET\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/search" href="/developers/en/reference/online-payments/checkout-api-payments/customers/search-customer/get"} specifying the \*\*customer email\*\* as a \*\*query parameter\*\*. \`\`\`curl curl -X GET \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/customers/search?email=test@testuser.com' \`\`\` The response will show this result: \`\`\`json { "paging": { "limit": 10, "offset": 0, "total": 1 }, "results": \[ { "address": { "id": null, "street\_name": null, "street\_number": null, "zip\_code": null }, "addresses": \[\], "cards": \[ { ... } \], "date\_created": "2017-05-05T00:00:00.000-04:00", "date\_last\_updated": "2017-05-05T09:23:25.021-04:00", "date\_registered": null, "default\_address": null, "default\_card": "1493990563105", "description": null, "email": "test\_payer@testuser.com", "first\_name": null, "id": "123456789-jxOV430go9fx2e", "identification": { "number": null, "type": null }, "last\_name": null, "live\_mode": false, "metadata": {}, "phone": { "area\_code": null, "number": null } } \] } \`\`\` ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to search for saved customer information. Below you'll find code examples in the available languages: * [csharp ](#editor%5F19) * [go ](#editor%5F21) * [java ](#editor%5F17) * [javascript ](#editor%5F16) * [php ](#editor%5F15) * [python ](#editor%5F20) * [ruby ](#editor%5F18) php javascript java ruby csharp python go ``` search(1, 0, ["email" => "test@testuser.com"]); ?> ``` Copiar ``` import { Customer, MercadoPagoConfig } from '@src/index'; const client = new MercadoPagoConfig({ accessToken: '' }); const customer = new Customer(client); customer.search({ options: { email: '' } }).then(console.log).catch(console.log); ``` Copiar ``` CustomerClient client = new CustomerClient(); Map filters = new HashMap<>(); filters.put("email", "test_payer@testuser.com"); MPSearchRequest searchRequest = MPSearchRequest.builder().offset(0).limit(0).filters(filters).build(); client.search(searchRequest); ``` Copiar ``` customers_response = sdk.customer.search(filters: { email: 'test_payer@testuser.com' }) customers = customers_response[:response] ``` Copiar ``` var searchRequest = new SearchRequest { Filters = new Dictionary { ["email"] = "test_payer@testuser.com", }, }; ResultsResourcesPage results = await customerClient.SearchAsync(searchRequest); IList customers = results.Results; ``` Copiar ``` filters = { "email": "test_payer@testuser.com" } customers_response = sdk.customer().search(filters=filters) customers = customers_response["response"] ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customer" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customer.NewClient(cfg) request := customer.SearchRequest{ Filters: map[string]string{ "email": "{{EMAIL}}", }, } resource, err := client.Search(context.Background(), request) if err != nil { fmt.Println(err) return } for _, v := range resources.Results { fmt.Println(v) } } ``` Copiar The response will return the following result: \`\`\`json { "id": "0000000000-00000000000000", "email": "usuario@exemplo.com", "first\_name": "Nome", "last\_name": "Sobrenome", "phone": { "area\_code": "00", "number": "000000000" }, "identification": { "type": "DOC", "number": "000000000" }, "address": { "id": "1111111111", "zip\_code": "00000000", "street\_name": "Nome da Rua", "street\_number": 0 }, "date\_registered": "2000-01-01T00:00:00.000-00:00", "description": "Descricao do usuario", "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": "2026-01-01T00:00:00.000-00:00", "metadata": { "source\_sync": "000000" }, "default\_card": null, "default\_address": "1111111111", "cards": \[\], "addresses": \[ { "apartment": null, "city": { "id": null, "name": "Nome da Cidade" }, "comments": null, "country": { "id": "XX", "name": "Nome do Pais" }, "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": null, "floor": null, "id": "1111111111", "municipality": { "id": null, "name": null }, "name": null, "neighborhood": { "id": null, "name": null }, "normalized": true, "phone": null, "state": { "id": "XX", "name": "Nome do Estado" }, "street\_name": "Nome da Rua", "street\_number": 0, "verifications": { "shipment": { "errors": \[\], "success": true } }, "zip\_code": "00000000" } \], "live\_mode": false } \`\`\` ::: :::: ::::: :::::AccordionComponent{title="Add new cards to a customer"} Associate additional cards with a registered customer. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} Send a \*\*POST\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api-payments/cards/save-card/post"} with the \*\*Customer ID\*\* (\`customer\_id\`) in the path and \*\*card data\*\* in the request body. > NOTE > > If you need to delete a card before adding a new one, send a \*\*DELETE\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{customer\_id}/cards/{id}" href="/developers/en/reference/online-payments/checkout-api-payments/cards/delete-card/delete"} with the Customer ID (\`customer\_id\`) and Card ID (\`id\`). The last card saved automatically becomes the \`DefaultCard\`. \`\`\`curl curl -X POST \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/customers/CUSTOMER\_ID/cards' \\ -d '{"token": "9b2d63e00d66a8c721607214cedaecda"}' \`\`\` The response will return the following result: \`\`\`json { "id": "1493990563105", "expiration\_month": 12, "expiration\_year": 2020, "first\_six\_digits": "503175", "last\_four\_digits": "0604", "payment\_method": { "id": "master", "name": "master", "payment\_type\_id": "credit\_card", "thumbnail": "http://img.mlstatic.com/org-img/MP3/API/logos/master.gif", "secure\_thumbnail": "https://www.mercadopago.com/org-img/MP3/API/logos/master.gif" }, "security\_code": { "length": 3, "card\_location": "back" }, "issuer": { "id": 3, "name": "Mastercard" }, "cardholder": { "name": "Card holdername", "identification": { "number": "12345678", "type": "DNI" } }, "date\_created": "2017-05-05T09:22:30.893-04:00", "date\_last\_updated": "2017-05-05T09:22:30.893-04:00", "customer\_id": "255276729-yLOTNHQjpDWw1X", "user\_id": "255276729", "live\_mode": false } \`\`\` ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to add additional cards to a customer. Below you'll find code examples in the available languages: * [csharp ](#editor%5F26) * [go ](#editor%5F28) * [java ](#editor%5F24) * [javascript ](#editor%5F23) * [php ](#editor%5F22) * [python ](#editor%5F27) * [ruby ](#editor%5F25) php javascript java ruby csharp python go ``` get("1234"); $card_client = new CustomerCardClient(); $customer_card = $client->create($customer->id, [ "token" => "your_card_token", "payment_method_id" => "debit_card" ]); echo implode($customer_card); ?> ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'access_token' }); const customerClient = new Customer(client); const customer = customerClient.get({ customerId: '' }) .then((result) => { const cardClient = new CustomerCard(client); const body = { token : result.token, payment_method: 'debit_card' }; cardClient.create({ customerId: customer, body: body }) .then(console.log).catch(console.log); }); ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_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); ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') customer_response = sdk.customer.get('247711297-jxOV430go9fx2e') customer = customer_response[:response] card_request = { token: '9b2d63e00d66a8c721607214cedaecda', payment_method_id: 'debit_card' } card_response = sdk.card.create(customer['id'], card_request) card = card_response[:response] puts card ``` Copiar ``` MercadoPagoConfig.AccessToken = "ENV_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); ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") customer_response = sdk.customer().get("247711297-jxOV430go9fx2e") customer = customer_response["response"] card_data = { "token": "9b2d63e00d66a8c721607214cedaecda", "payment_method_id": "debit_card" } card_response = sdk.card().create(customer["id"], card_data) card = card_response["response"] print(card) ``` Copiar ``` accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customercard.NewClient(cfg) request := customercard.Request{Token: "{{CARD_TOKEN}}"} resource, err := client.Create(context.Background(), "{{CUSTOMER_ID}}", request) if err != nil { fmt.Println(err) return } fmt.Println(resource) ``` Copiar The response will return the following result: \`\`\`json { "additional\_info": { "request\_public": "true", "api\_client\_application": "application-name", "api\_client\_scope": "scope-name" }, "card\_number\_id": null, "cardholder": { "name": "NOME DO TITULAR", "identification": { "number": "00000000000", "type": "DOC" } }, "customer\_id": "0000000000-00000000000000", "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": "2026-01-01T00:00:00.000-00:00", "expiration\_month": 12, "expiration\_year": 2030, "first\_six\_digits": "000000", "id": "1111111111", "issuer": { "id": 0, "name": "Nome da Bandeira" }, "last\_four\_digits": "0000", "live\_mode": false, "payment\_method": { "id": "metodo\_id", "name": "Nome do Metodo", "payment\_type\_id": "credit\_card", "thumbnail": "https://link-da-imagem.com/logo.png", "secure\_thumbnail": "https://link-da-imagem.com/logo.png" }, "security\_code": { "length": 3, "card\_location": "back" }, "user\_id": "0000000000" } \`\`\` ::: :::: ::::: :::::AccordionComponent{title="List cards"} Query all cards associated with a customer. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} Send a \*\*GET\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api-payments/cards/get-customer-cards/get"} with the \*\*Customer ID\*\* (\`customer\_id\`). \`\`\`curl curl -X GET \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/customers/CUSTOMER\_ID/cards' \\ \`\`\` The response will be an array with all saved card objects for the customer. \`\`\`json \[{ "id": "1490022319978", "expiration\_month": 12, "expiration\_year": 2020, "first\_six\_digits": "415231", "last\_four\_digits": "0001", ... }\] \`\`\` ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to query all cards associated with a customer. Below you'll find code examples in the available languages: * [csharp ](#editor%5F33) * [go ](#editor%5F35) * [java ](#editor%5F31) * [javascript ](#editor%5F30) * [php ](#editor%5F29) * [python ](#editor%5F34) * [ruby ](#editor%5F32) php javascript java ruby csharp python go ``` list("customer_id"); echo implode ($cards); ?> ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'access_token' }); const customerCard = new CustomerCard(client); customerCard.list({ customerId: '' }).then(console.log).catch(console.log); ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); CustomerCardClient customerCardClient = new CustomerCardClient(); MPResourceList list = customerCardClient.listAll("000000000-abcdEfghiJklM"); List customerCards = list.getResults(); ``` Copiar ``` cards_response = sdk.card.list(customer_id) cards = cards_response[:response] ``` Copiar ``` var customerClient = new CustomerClient(); ResourcesList customerCards = await customerClient.ListCardsAsync("CUSTOMER_ID"); ``` Copiar ``` cards_response = sdk.card().list_all(customer_id) cards = cards_response["response"] ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customercard" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customercard.NewClient(cfg) resources, err := client.List(context.Background(), "") if err != nil { fmt.Println(err) return } for _, v := range resources { fmt.Println(v) } } ``` Copiar The response will return the following result: \`\`\`json \[ { "cardholder": { "name": "NOME DO TITULAR", "identification": { "number": "00000000000", "type": "DOC" } }, "customer\_id": "0000000000-00000000000000", "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": "2026-01-01T00:00:00.000-00:00", "expiration\_month": 12, "expiration\_year": 2030, "first\_six\_digits": "000000", "id": "1111111111", "issuer": { "id": 0, "name": "Bandeira" }, "last\_four\_digits": "0000", "live\_mode": false, "payment\_method": { "id": "metodo\_id", "name": "Nome do Metodo", "payment\_type\_id": "credit\_card", "thumbnail": "https://link-da-imagem.com/logo.png", "secure\_thumbnail": "https://link-da-imagem.com/logo.png" }, "security\_code": { "length": 3, "card\_location": "back" }, "user\_id": "0000000000" } \] \`\`\` \`\`\`::: :::: ::::: :::::AccordionComponent{title="Receive payments with saved cards"} For a customer to make a payment with saved cards, you must capture the \*\*security code (CVV)\*\* of the card again, since Mercado Pago does not store this data for security reasons. You can perform this operation using the Mercado Pago API or our SDKs. ::::TabsComponent :::TabComponent{title="Via API"} ### 1\. Show list of saved cards Show the buyer the list of saved cards so they can choose the desired option. To do so, send a \*\*GET\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{customer\_id}/cards" href="/developers/en/reference/online-payments/checkout-api-payments/cards/get-customer-cards/get"} with the \*\*Customer ID\*\* (\`customer\_id\`) in its path. \`\`\`curl curl -X GET \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/customers/CUSTOMER\_ID/cards' \\ \`\`\` ### 2\. Create payment form After showing the saved cards to the buyer, proceed with creating the payment form. This stage allows the buyer to see where they must include the security code (CVV) of the selected card. To perform it, implement the code below directly in your project. \`\`\`html Send \`\`\` ### 3\. Capture security code and create token After showing the saved cards and creating the payment form, the next step is to capture the verification code (CVV) of the card and generate the security token. To do this, you must create a \*token\* by submitting the form with the \*\*card ID\*\* selected by the customer and the \*\*security code (CVV)\*\* using the Javascript code below. \`\`\`javascript const formElement = document.getElementById('form-checkout'); formElement.addEventListener('submit', e => createCardToken(e)); const createCardToken = async (event) => { try { const tokenElement = document.getElementById('token'); if (!tokenElement.value) { event.preventDefault(); const token = await mp.fields.createCardToken({ cardId: document.getElementById('form-checkout\_\_cardId').value }); tokenElement.value = token.id; console.log(tokenElement); } } catch (e) { console.error('error creating card token: ', e) } } \`\`\` ### 4\. Create the payment Once you have obtained the card security \*token\* in the previous stage, the final step is to \*\*create the payment\*\* with the corresponding value. Send a \*\*POST\*\* request to the endpoint :TagComponent{tag="API" text="/v1/payments" href="/developers/en/reference/payments/\_payments/post"} including the \`payer.id\` and \*token\* in the request body, sending the following data. \`\`\`curl curl -X POST \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ENV\_ACCESS\_TOKEN' \\ 'https://api.mercadopago.com/v1/payments' \\ -d '{ "transaction\_amount": 100, "token": "ff8080814c11e237014c1ff593b57b4d", "installments": 1, "payer": { "type": "customer", "id": "123456789-jxOV430go9fx2e" } }' \`\`\` | Field | Description | | :---- | :---- | | \`payer.id\` | ID of the customer to which the card belongs. | | \`token\` | Recently obtained token that replaces the card's sensitive data and CVV. | | \`transaction\_amount\` | Transaction amount. | ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to receive payments with saved cards. Below you'll find code examples organized by process stages in the available languages: ### 1\. Show list of saved cards Show the buyer the list of saved cards so they can choose the desired option. Use the SDKs listed below to execute this request. * [csharp ](#editor%5F40) * [go ](#editor%5F42) * [java ](#editor%5F38) * [javascript ](#editor%5F37) * [php ](#editor%5F36) * [python ](#editor%5F41) * [ruby ](#editor%5F39) php javascript java ruby csharp python go ``` list("customer_id"); echo implode ($cards); ?> ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'access_token' }); const customerCard = new CustomerCard(client); customerCard.list({ customerId: '' }).then(console.log).catch(console.log); ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); CustomerClient customerClient = new CustomerClient(); Customer customer = customerClient.get("247711297-jxOV430go9fx2e"); customerClient.listCards(customer.getId()); ``` Copiar ``` cards_response = sdk.card.list(customer_id) cards = cards_response[:response] ``` Copiar ``` var customerClient = new CustomerClient(); ResourcesList customerCards = await customerClient.ListCardsAsync("CUSTOMER_ID"); ``` Copiar ``` cards_response = sdk.card().list_all(customer_id) cards = cards_response["response"] ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customercard" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customercard.NewClient(cfg) resources, err := client.List(context.Background(), "") if err != nil { fmt.Println(err) return } for _, v := range resources { fmt.Println(v) } } ``` Copiar \### 2\. Create the payment form After showing the saved cards to the buyer, proceed with creating the payment form. This stage allows the buyer to see where they must include the security code (CVV) of the selected card. To perform it, implement the code below directly in your project. \`\`\`html Send \`\`\` ### 3\. Capture security code and create token After showing the saved cards and creating the payment form, the next step is to capture the verification code (CVV) of the card and generate the security token. To do this, you must create a \*token\* by submitting the form with the \*\*card ID\*\* selected by the customer and the \*\*security code (CVV)\*\* using the Javascript code below. \`\`\`javascript const formElement = document.getElementById('form-checkout'); formElement.addEventListener('submit', e => createCardToken(e)); const createCardToken = async (event) => { try { const tokenElement = document.getElementById('token'); if (!tokenElement.value) { event.preventDefault(); const token = await mp.fields.createCardToken({ cardId: document.getElementById('form-checkout\_\_cardId').value }); tokenElement.value = token.id; console.log(tokenElement); } } catch (e) { console.error('error creating card token: ', e) } } \`\`\` ### 4\. Create the payment Once you have obtained the card security \*token\* in the previous stage, the final step is to \*\*create the payment\*\* with the corresponding value. Use the SDKs listed below to execute this request. To make a payment with a previously saved card, you must send the following data: * [csharp ](#editor%5F47) * [go ](#editor%5F49) * [java ](#editor%5F45) * [javascript ](#editor%5F44) * [php ](#editor%5F43) * [python ](#editor%5F48) * [ruby ](#editor%5F46) php javascript java ruby csharp python go ``` list("customer_id"); $client = new PaymentClient(); $request_options = new RequestOptions(); $request_options->setCustomHeaders(["X-Idempotency-Key: "]); $payment = $client->create([ "transaction_amount" => 100.0, "token" => $cards[0]-> token, "description" => "My product", "installments" => 1, "payment_method_id" => "visa", "payer" => [ "type" => "customer", "id" => "1234" ] ], $request_options); echo implode($payment); ?> ``` Copiar ``` const client = new MercadoPagoConfig({ accessToken: 'access_token' }); const customerClient = new Customer(client); customerClient.listCards({ customerId: '' }) .then((result) => { const payment = new Payment(client); const body = { transaction_amount: 100, token: result[0].token, description: 'My product', installments: 1, payment_method_id: 'visa', payer: { type: 'customer', id: '123' } }; payment.create({ body: body }).then((result) => console.log(result)); }); ``` Copiar ``` MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); PaymentClient client = new PaymentClient(); PaymentCreateRequest request = PaymentCreateRequest.builder() .transactionAmount(new BigDecimal("100")) .installments(1) .token("ff8080814c11e237014c1ff593b57b4d") .payer(PaymentPayerRequest.builder() .type("customer") .id("247711297-jxOV430go9fx2e") .build()) .build(); client.create(request); ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') payment_request = { token: 'ff8080814c11e237014c1ff593b57b4d', installments: 1, transaction_amount: 100, payer: { type: 'customer', id: '123456789-jxOV430go9fx2e' } } payment_response = sdk.payment.create(payment_request) payment = payment_response[:response] ``` Copiar ``` using MercadoPago.Config; using MercadoPago.Client.Payment; using MercadoPago.Resource.Payment; MercadoPagoConfig.AccessToken = "ENV_ACCESS_TOKEN"; var request = new PaymentCreateRequest { TransactionAmount = 100, Token = "ff8080814c11e237014c1ff593b57b4d", Installments = 1, Payer = new PaymentPayerRequest { Type = "customer", Email = "test_payer@testuser.com", }, }; var client = new PaymentClient(); Payment payment = await client.CreateAsync(request); ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") payment_data = { "transaction_amount": 100, "token": 'ff8080814c11e237014c1ff593b57b4d', "installments": 1, "payer": { "type": "customer", "id": "123456789-jxOV430go9fx2e" } } payment_response = sdk.payment().create(payment_data) payment = payment_response["response"] ``` Copiar ``` accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := payment.NewClient(cfg) request := payment.Request{ TransactionAmount: 100, Token: "ff8080814c11e237014c1ff593b57b4d", Description: "My product", Installments: 1, PaymentMethodID: "master", Payer: &payment.PayerRequest{ Email: "test@testuser.com", Identification: &payment.IdentificationRequest{ Type: "CPF", Number: "01234567890", }, }, } resource, err := client.Create(context.Background(), request) if err != nil { fmt.Println(err) } fmt.Println(resource) ``` Copiar | Field | Description | | :---- | :---- | | \`payer.id\` | ID of the customer to which the card belongs. | | \`token\` | Recently obtained token that replaces the card's sensitive data and CVV. | | \`transaction\_amount\` | Transaction amount. | ::: :::: ::::: :::::AccordionComponent{title="Delete card"} Perform the deletion of a specific card associated with a saved customer, ensuring data is updated. The operation is available via the Mercado Pago API or through the available SDKs. ::::TabsComponent :::TabComponent{title="Via API"} Send a \*\*DELETE\*\* request to the endpoint :TagComponent{tag="API" text="/v1/customers/{customer\_id}/cards/{id}" href="/developers/en/reference/online-payments/checkout-api-payments/cards/delete-card/delete"} with the \*\*Customer ID\*\* (\`customer\_id\`) and \*\*Card ID\*\* (\`id\`) as path parameters. \`\`\`curl curl -X DELETE \\ 'https://api.mercadopago.com/v1/customers/12123adfasdf123u4u/cards/12123adfasdf123u4u'\\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer TEST-7434\*\*\*\*\*\*\*\*\*159-03141\*\*\*\*\*\*\*\*\*cee51edf8\*\*\*\*\*\*\*\*\*f94f589-1\*\*\*\*\*\*\*\*\*' \\ \`\`\` The response will return this result: \`\`\`json { "id": "8987269652", "expiration\_month": 7, "expiration\_year": 2023, "first\_six\_digits": "503143", "last\_four\_digits": "6351", "payment\_method": { "id": "master", "name": "Mastercard", "payment\_type\_id": "credit\_card", "thumbnail": "http://img.mlstatic.com/org-img/MP3/API/logos/master.gif", "secure\_thumbnail": "https://www.mercadopago.com/org-img/MP3/API/logos/master.gif" }, "security\_code": { "length": 3, "card\_location": "back" }, "issuer": { "id": 24, "name": "Mastercard" }, "cardholder": { "name": "APRO", "identification": { "number": "01234567890", "type": "CPF" } }, "date\_created": "2021-03-16T16:08:21.000-04:00", "date\_last\_updated": "2021-03-16T16:14:40.962-04:00", "customer\_id": "470183340-cpunOI7UsIHlHr", "user\_id": "470183340", "live\_mode": true } \`\`\` ::: :::TabComponent{title="Via SDK"} Use one of our SDKs to delete a specific card from a saved customer. Below you will find code examples organized by process stages in the available languages: * [csharp ](#editor%5F53) * [go ](#editor%5F55) * [java ](#editor%5F51) * [php ](#editor%5F50) * [python ](#editor%5F54) * [ruby ](#editor%5F52) php java ruby csharp python go ``` delete($customerId, $cardId); echo $deletedCard->id; } catch (MPApiException $e) { echo $e->getMessage(); } catch (Exception $e) { echo $e->getMessage(); } ?> ``` Copiar ``` String accessToken = "{{ACCESS_TOKEN}}"; MercadoPagoConfig.setAccessToken(accessToken); CustomerCardClient client = new CustomerCardClient(); String customerId = "{{CUSTOMER_ID}}"; String cardId = "{{CARD_ID}}"; try { CustomerCard deletedCard = client.delete(customerId, cardId); System.out.println(deletedCard.getId()); } catch (MPException | MPApiException e) { System.out.println(e.getMessage()); } ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') customer_id = '{{CUSTOMER_ID}}' card_id = '{{CARD_ID}}' begin deleted_card_response = sdk.card.delete(customer_id, card_id) deleted_card = deleted_card_response[:response] puts deleted_card rescue => e puts e.message end ``` Copiar ``` string accessToken = "{{ACCESS_TOKEN}}"; MercadoPagoConfig.AccessToken = accessToken; var client = new CustomerCardClient(); string customerId = "{{CUSTOMER_ID}}"; string cardId = "{{CARD_ID}}"; try { CustomerCard deletedCard = await client.DeleteAsync(customerId, cardId); Console.WriteLine(deletedCard.Id); } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") customer_id = "{{CUSTOMER_ID}}" card_id = "{{CARD_ID}}" try: deleted_card_response = sdk.card().delete(customer_id, card_id) deleted_card = deleted_card_response["response"] print(deleted_card) except Exception as e: print(e) ``` Copiar ``` package main import ( "context" "fmt" "github.com/mercadopago/sdk-go/pkg/config" "github.com/mercadopago/sdk-go/pkg/customercard" ) func main() { accessToken := "{{ACCESS_TOKEN}}" cfg, err := config.New(accessToken) if err != nil { fmt.Println(err) return } client := customercard.NewClient(cfg) customerID := "{{CUSTOMER_ID}}" cardID := "{{CARD_ID}}" deletedCard, err := client.Delete(context.Background(), customerID, cardID) if err != nil { fmt.Println(err) return } fmt.Println(deletedCard) } ``` Copiar The response will return this result: \`\`\`json { "additional\_info": { "request\_public": "true", "api\_client\_application": "application\_name", "api\_client\_scope": "scope\_name" }, "card\_number\_id": null, "cardholder": { "name": "NOME DO TITULAR", "identification": { "number": "00000000000", "type": "DOC" } }, "customer\_id": "0000000000-00000000000000", "date\_created": "2026-01-01T00:00:00.000-00:00", "date\_last\_updated": "2026-01-01T00:00:00.000-00:00", "expiration\_month": 12, "expiration\_year": 2030, "first\_six\_digits": "000000", "id": "1111111111", "issuer": { "id": 0, "name": "Bandeira" }, "last\_four\_digits": "0000", "live\_mode": false, "payment\_method": { "id": "metodo\_id", "name": "Nome do Metodo", "payment\_type\_id": "credit\_card", "thumbnail": "https://link-da-imagem.com/logo.png", "secure\_thumbnail": "https://link-da-imagem.com/logo.png" }, "security\_code": { "length": 3, "card\_location": "back" }, "user\_id": "0000000000" } \`\`\` :::::