Prerequisites
- Staging API key — a client-side key from the Crossmint Staging Console. In staging, all scopes are included by default.
- Card flow — the integration from Save a Card, Register a Card, Create an Agent Card, and Retrieve Secure Card Numbers, pointed at
https://staging.crossmint.com.
Test Cards
Save one of these numbers with any future expiration date and any three-digit CVC. Any Visa or Mastercard number not listed follows its brand’s happy path.What a Successful Card Returns
Register a Card reports one card-network rail for the card. Therail is always agentic-token; the provider names the network program behind it, vic for Visa Intelligent Commerce or agentpay for Mastercard Agent Pay:
status: "pending_verification". After the cardholder approves the allowance in OrderIntentVerification, fetch the order intent again: the rail reports status: "active" and you can mint.
Failure Scenarios
The three cards below are designed to fail. The error each one produces is the expected result of the scenario, not
a problem with your integration.
Card Rejected at Registration
Save5186 1600 0000 0001. The registration request succeeds, but the Mastercard rail is reported in error:
encrypted-card rail, which is enabled for every staging project, so mint through it instead. See Mint an Encrypted Card.
One-Time Code Rejected
Save4929 9803 9556 7582. Registration succeeds with a vic rail enabled, and the order intent’s rail is pending_verification. In OrderIntentVerification, the Visa flow asks for a one-time code and rejects every code with INVALID_OTP. The user can enter another code, but this card never accepts one, so verification does not complete and the rail stays pending_verification:
pending_verification.
Hosted Page Returns but Verification Fails
Save5186 1600 0000 0003. Registration succeeds with an agentpay rail enabled. During verification, the mock Mastercard-hosted page shows a success message and returns to your application, but when Crossmint confirms the result with the network, the confirmation fails. OrderIntentVerification calls onVerificationError, and the rail stays pending_verification.
Confirm that your integration waits for onVerificationComplete and then fetches the order intent until the rail reports active, rather than minting as soon as the hosted page closes.
Test Verification
Verification is the step where the cardholder approves an order intent’s allowance through theOrderIntentVerification component. The mocks run the same browser flow as production, so popups, message listeners, and origin checks are all exercised.
- Visa — the verification asks the user to choose a one-time code method (a masked phone number or email address) and accepts any code, unless the card scenario says otherwise. On a device without a passkey, a mock Visa screen enrolls one. Later order intents on the same device go straight to passkey authentication, as in production.
- Mastercard — the component opens a mock Mastercard-hosted page that shows its progress and returns to your application. The rail becomes
activeonly after Crossmint confirms the result, so fetch the order intent again before minting.
Check the Minted Credentials
Mock credentials are deterministic, so repeated runs return stable values. Use them in integration tests only; they are not accepted by real merchants.
Credential expiry follows each network’s rule rather than a uniform test value. The Visa mock returns a short synthetic cryptogram window, so do not calibrate how long a credential stays usable against it. Use every credential immediately.
Test Common Scenarios
The allowance accounting in staging is real, so these scenarios behave exactly as in production.- Spend limits — create an order intent for
10.00, mint a credential for7.00, then read the order intent:amount.availableis3.00. Minting4.00next fails withORDER_INTENT_AMOUNT_EXCEEDED. - Encrypted card fallback — save
5186 1600 0000 0001and mint through theencrypted-cardrail, as described in Card Rejected at Registration. - CVC recollection — expire a saved card’s CVC on demand to test the
pending_cvc_recollectionstate. See Test in Staging.
Next Steps
Create an Agent Card
Create an order intent and verify its rail
Cards Quickstart
Run the complete flow in the reference app

