Prerequisites
- Saved card — follow Save a Card and keep its
paymentMethodId. - Crossmint API key — a client-side key with the
payment-methods.create,payment-methods.read, andpayment-methods.updatescopes. Theupdatescope lets the user re-enter the card security code (CVC) later, when a card credential needs it. 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 idempotentPUT request with the consumer information used by card-network rails:
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".
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.
A card with no enabled rail, including one whose rails array is empty, can still back an order intent. In that case the order intent’s rails array includes an encrypted-card rail that returns the saved card encrypted to your public key; in production, encrypted card access must be enabled for your project. See Encrypted Card Fallback.
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 saved card number selects a deterministic registration and verification scenario, such as a rejected rail or a failed verification. See Test Agent Cards for the test cards.Next Steps
Create an Agent Card
Create an order intent backed by one of the card’s rails
Cards Quickstart
Run the complete flow in the reference app

