# Store a card

## Tokenize a Credit Card

> Creates a secure token for a credit card along with payer data. Optionally performs a micro-deposit validation to verify the card's validity.

```json
{"openapi":"3.0.0","info":{"title":"Credit Card Tokenization API","version":"3.0.0"},"servers":[{"url":"https://cc-api-stg.onekeypayments.com","description":"Staging environment"}],"paths":{"/v3/tokenization":{"post":{"summary":"Tokenize a Credit Card","description":"Creates a secure token for a credit card along with payer data. Optionally performs a micro-deposit validation to verify the card's validity.","tags":["Tokenization"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["credit_card","payer"],"properties":{"credit_card":{"type":"object","required":["holder_name","expiration_month","expiration_year","number","cvv"],"properties":{"holder_name":{"type":"string","description":"Name of the cardholder as it appears on the card"},"expiration_month":{"type":"integer","description":"Expiration month (1-12)","minimum":1,"maximum":12},"expiration_year":{"type":"integer","description":"Expiration year (YYYY format)"},"number":{"type":"string","description":"Complete card number without spaces"},"cvv":{"type":"string","description":"Card security code (3-4 digits)"}}},"payer":{"type":"object","required":["country","first_name","last_name","document_type","document"],"properties":{"country":{"type":"string","description":"Country ISO code (2 characters)"},"first_name":{"type":"string","description":"Payer's first name"},"last_name":{"type":"string","description":"Payer's last name"},"document_type":{"type":"string","description":"Type of identity document (e.g., DNI, CPF, PASSPORT)"},"document":{"type":"string","description":"Identity document number"}}},"micro_deposit_enabled":{"type":"boolean","description":"When true (default), performs a micro-deposit to validate the card","default":true}}}}}},"parameters":[{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","default":"application/json"},"description":"Media type of the body sent to the API"},{"in":"header","name":"X-Date","required":true,"schema":{"type":"string","format":"date-time"},"description":"ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)"},{"in":"header","name":"X-Login","required":true,"schema":{"type":"string"},"description":"Merchant X-Login API Key"},{"in":"header","name":"Authorization","required":true,"schema":{"type":"string"},"description":"Authorization control hash"},{"in":"header","name":"X-Idempotency-Key","required":false,"schema":{"type":"string"},"description":"Unique idempotency key for ensuring that the same request is not processed more than once"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"holder_name":{"type":"string","description":"Cardholder name"},"expiration_month":{"type":"integer","description":"Expiration month"},"expiration_year":{"type":"integer","description":"Expiration year"},"last_four_digits":{"type":"string","description":"Last four digits of the card"},"card_identifier":{"type":"string","description":"Unique card identifier (token) for future transactions"}}}}}},"401":{"description":"Unauthorized access","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"description":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.onekeypayments.com/api-reference/deposits-api/saving-cards-card-on-file/store-a-card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
