# Buscar Token do Cartão

## Recuperar Card Tokens

> Retorna todos os tokens de cartão associados a um comprador específico. Útil para listar cartões salvos do cliente.

```json
{"openapi":"3.0.3","info":{"title":"API de Card Tokens e Pagamentos","version":"2.0.0"},"servers":[{"url":"https://api.barte.com","description":"Servidor de Produção"},{"url":"https://sandbox-api.barte.com","description":"Servidor de Sandbox"}],"security":[{"X-Token-Api":[]}],"components":{"securitySchemes":{"X-Token-Api":{"type":"apiKey","name":"X-Token-Api","in":"header"}},"schemas":{"CardTokenListResponse":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"UUID do token"},"status":{"type":"string","enum":["ACTIVE","PENDING","INACTIVE"],"description":"Status do token"},"createdAt":{"type":"string","format":"date","description":"Data de criação"},"brand":{"type":"string","enum":["visa","mastercard","elo","american_express","hipercard","diners"],"description":"Bandeira do cartão"},"first6digits":{"type":"string","description":"Primeiros 6 dígitos"},"last4digits":{"type":"string","description":"Últimos 4 dígitos"},"buyerId":{"type":"string","format":"uuid","description":"UUID do comprador"},"expirationMonth":{"type":"string","description":"Mês de expiração"},"expirationYear":{"type":"string","description":"Ano de expiração"},"cardId":{"type":"string","format":"uuid","description":"ID do cartão para uso em pagamentos"}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"}},"metadata":{"$ref":"#/components/schemas/Metadata"}}},"ErrorDetail":{"type":"object","properties":{"status":{"type":"string"},"code":{"type":"string","enum":["PAYMENT-0000","PAYMENT-0500","PAYMENT-9999","BAR-7001","BAD_REQUEST","FORBIDDEN","METHOD_NOT_ALLOWED","NOT_ACCEPTABLE","UNSUPPORTED_MEDIA_TYPE","CARD-0001","CARD-0002","CARD-0003"]},"title":{"type":"string","enum":["BUSINESS_SELLER","BUSINESS_CHECKOUT","BUSINESS_COMMON","BUSINESS_SECURITY","BUSINESS_SUBSCRIPTION","INVALID_REQUEST_PARAM","BUSINESS_METRIC","BUSINESS_ACCOUNTANCY","BUSINESS_NOTIFICATION","BUSINESS_BARTE","BUSINESS_COMPANY","BUSINESS_INVOICE","BUSINESS_TRANSFER","BUSINESS_CARD","BUSINESS_ORDER","card_not_supported"]},"description":{"type":"string"},"action":{"type":"string"},"additionalInfo":{"type":"object","additionalProperties":{"type":"object"}}}},"Metadata":{"type":"object","properties":{"totalRecords":{"type":"integer"},"totalPages":{"type":"integer"},"requestDatetime":{"type":"string","format":"date-time"}}}}},"paths":{"/payment/v1/cards/{buyerUuid}":{"get":{"tags":["Recuperação de Card Tokens"],"summary":"Recuperar Card Tokens","description":"Retorna todos os tokens de cartão associados a um comprador específico. Útil para listar cartões salvos do cliente.","operationId":"getCardTokensByBuyer","parameters":[{"name":"buyerUuid","in":"path","description":"UUID do comprador","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Lista de tokens de cartão recuperada com sucesso","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CardTokenListResponse"}}}}},"400":{"description":"Requisição inválida","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Não autorizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Acesso proibido","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Erro interno do servidor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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://docs.barte.com/api-reference/tokenizacao-de-cartao-one-buy-click/buscar-token-do-cartao.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.
