> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register a Card

> Register a saved card and discover the order-intent rails it supports

Register a saved card once before creating order intents against it. Registration provisions every supported rail, such as Visa Intelligent Commerce or Mastercard Agent Pay. It does not grant spending permission and does not prompt the user for verification.

## Prerequisites

* **Saved card** — follow [Save a Card](/agents/payment-methods/cards/save-card) and keep its `paymentMethodId`.
* **Crossmint API key** — a client-side key with `payment-methods.create` and `payment-methods.read` scopes. In staging, all scopes are included by default.
* **User JWT** — use the JWT for the user who owns the saved card.

## Register the Card

Send an idempotent `PUT` request with the consumer information used by card-network rails:

```typescript theme={null}
const CROSSMINT_CLIENT_API_KEY = "YOUR_CROSSMINT_CLIENT_API_KEY";
const jwt = "YOUR_USER_JWT";
const paymentMethodId = "pm_123";

const response = await fetch(
    `https://staging.crossmint.com/api/unstable/payment-methods/${paymentMethodId}/order-intent-registration`,
    {
        method: "PUT",
        headers: {
            "Content-Type": "application/json",
            "X-API-KEY": CROSSMINT_CLIENT_API_KEY,
            Authorization: `Bearer ${jwt}`,
        },
        body: JSON.stringify({
            email: "buyer@example.com",
            countryCode: "US",
            languageCode: "en-US",
        }),
    }
);

if (!response.ok) {
    throw new Error(`Card registration failed (${response.status})`);
}

const registration = await response.json();
```

The response reports one or more supported rails independently:

```json theme={null}
{
    "paymentMethodId": "pm_123",
    "rails": [
        {
            "rail": "agentic-token",
            "provider": "vic",
            "status": "enabled"
        }
    ]
}
```

Read the complete `rails` array instead of branching on the card brand or assuming there is only one result. Visa cards can report `provider: "vic"`, and Mastercard cards can report `provider: "agentpay"`.

| Status    | Meaning                                |
| --------- | -------------------------------------- |
| `enabled` | The rail can back a new order intent   |
| `pending` | Rail provisioning has not finished     |
| `error`   | Provisioning failed; read `error.code` |

More than one rail can be available. Registration provisions those rails, but it does not choose between them or require every rail to succeed. Use `GET /api/unstable/payment-methods/{paymentMethodId}/order-intent-registration` to read the registration again.

Registration is separate from allowance verification: no email code, passkey, or spending approval occurs in this step. You choose which rail to use after creating an order intent.

## Test the Rails

In staging, the card number selects a deterministic scenario. Use any future expiration date and any three-digit CVC.

| Card                  | Scenario                                          |
| --------------------- | ------------------------------------------------- |
| `4242 4242 4242 4242` | Visa registration and verification succeed        |
| `4929 9803 9556 7582` | Visa allowance verification returns `INVALID_OTP` |
| `5555 5555 5555 4444` | Mastercard registration and verification succeed  |
| `5186 1600 0000 0001` | Mastercard registration returns `CARD_REJECTED`   |
| `5186 1600 0000 0003` | Mastercard allowance verification fails           |

## Next Steps

<CardGroup cols={2}>
  <Card title="Create an Agent Card" icon="credit-card" href="/agents/payment-methods/cards/create-agent-card">
    Create an order intent backed by one of the card's enabled rails
  </Card>

  <Card title="Cards Quickstart" icon="rocket" href="/agents/cards-quickstart">
    Run the complete flow in the reference app
  </Card>
</CardGroup>
