> For the complete documentation index, see [llms.txt](https://docs.xplorpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xplorpay.com/getting-started/getting-started/our-products/payment-processing/cards-on-file/collect-updated-payment-details.md).

# Collect Updated Payment Details

Retrieve token update statuses and collect a replacement payment method when required.

When Account Updater is enabled, retrieve token details before authorization. Inspect `token-update-status` before you charge the stored card.

A `CLOSED` status means you must not authorize the token. Collect a new payment method from the cardholder.

### Retrieve token details

Use the Tokens API to retrieve a token or search by Account Updater status.

| Request property      | Value                                                    |
| --------------------- | -------------------------------------------------------- |
| Method                | `GET`                                                    |
| Endpoint              | `https://gateway.clearent.net/rest/v2/tokens`            |
| Authentication        | `api-key` header with your secret API key                |
| Content type          | `application/json`                                       |
| Closed-token filter   | `?token-update-status=CLOSED`                            |
| Single-token endpoint | `https://gateway.clearent.net/rest/v2/tokens/{token-id}` |

### Search for closed tokens

```http
GET /rest/v2/tokens?token-update-status=CLOSED HTTP/1.1
Host: gateway.clearent.net
api-key: <secret-api-key>
Content-Type: application/json
```

Use the returned `token-id` to locate the customer in your system. Then ask the customer for a replacement payment method.

### Replace the payment method

1. Stop future billing against the unusable token.
2. Contact the customer using your approved communication channel.
3. Collect and tokenize the new payment method.
4. Associate the replacement token with future payments.

{% hint style="warning" %}
Do not store raw card data in your system.
{% endhint %}

### Related topics

* See [Tokens](/api-reference/api/payments/cards-card-not-present/vault/tokens.md) to retrieve and manage payment tokens.
* See [Tokenization](/getting-started/security-solutions/tokenization.md) before collecting a replacement payment method.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xplorpay.com/getting-started/getting-started/our-products/payment-processing/cards-on-file/collect-updated-payment-details.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
