Skip to main content
This quickstart takes an approved customer from card creation to a funded, spendable card: create the card, fund it based on your management model, and decrypt the card details for the cardholder.

Before you begin

Complete the shared setup steps: get your API keys, configure webhooks, and get your customer through compliance approval. You’ll also need to know your program type and management model, since it determines how you fund the card.
1

Issue a Card

Create a virtual or physical card for the approved user by calling the Create a Card endpoint.
  • Virtual cards are available immediately but require client-side decryption to display the PAN
  • Physical cards require a shipping address and activation after delivery
See Issuing Cards for configuration options and spending limits. See Push Provisioning steps to allow users to add their card to Apple Wallet or Google Wallet directly from your app.
2

Fund the Card

How you fund the card depends on your management model:
  1. Retrieve the user’s smart contract address via Get Contract Info
  2. Send supported tokens (for example, USDC) directly to the contract on-chain
  3. The credit limit updates automatically once the deposit is confirmed
See Rain-Managed Programs for detailed instructions and code examples. See Supported Chains & Tokens for the full list of supported networks.
84532 is Base Sepolia, the sandbox chain. Use the chain ID of the network you’re funding on.
3

Decrypt and Use the Card

For virtual cards, decrypt the card PAN on the client side so the cardholder can start spending. Rain uses RSA-OAEP encryption for card data.See Viewing Encrypted Card Details for the decryption implementation guide.
4

Make a Test Purchase

In sandbox, simulate a purchase on the card to confirm it can spend. The card must be active (activate physical cards first). Call POST /simulate/transactions/authorize with the card’s id:
A status of authorized means the card works end to end, and your webhook endpoint receives transaction.requested and transaction.created. If you get declined with account_credit_limit_exceeded, the funding from the previous step hasn’t landed yet.See Simulating Transactions to settle, reverse, and refund the purchase.

What’s next

Testing in Sandbox

Simulate transactions and test your integration before going live.

Transaction Lifecycle

Understand how transactions flow from authorization to settlement.

Managing Transactions

View, authorize, and manage cardholder transactions.