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
2
Fund the Card
How you fund the card depends on your management model:
- Rain-Managed
- Partner-Managed
- Retrieve the user’s smart contract address via Get Contract Info
- Send supported tokens (for example, USDC) directly to the contract on-chain
- The credit limit updates automatically once the deposit is confirmed
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 A
active (activate physical cards first). Call
POST /simulate/transactions/authorize with the card’s id: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.