These flows are actively being refined. Crossmint’s customer success engineers (CSE) will work with you to review your architecture. Contact Crossmint to get started.
Overview
Funding an agent’s wallet is a two-step process: your backend creates an order server-side, and then the human user completes the payment through an embedded checkout component rendered in your frontend. This keeps the agent out of the checkout process - it can request funds, but only the human can authorize spending.Prerequisites
- A stablecoin wallet created for the agent
- A server-side API key
- A client-side API key for the embedded checkout component
Integration Steps
Create an order server-side
When the agent needs funds (or the user decides to top up), your backend creates an order using the Crossmint Orders API. The API returns an
orderId and a clientSecret that you pass to the frontend.The tokenLocator follows the format <chain>:<contract_address>. Use the USDC contract address for your target chain.| Chain | Staging Token Address |
|---|---|
| Base Sepolia | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
| Solana Devnet | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
The
payment.receiptEmail field is required. Crossmint uses it to determine whether KYC is needed for the transaction and to send the user a payment receipt.Render the embedded checkout
On the client side, use the The embedded checkout renders a payment form where the user enters their card details (or uses a saved card). Once payment is confirmed, the USDC is delivered to the agent’s wallet.
CrossmintEmbeddedCheckout component to let the user complete the payment. The component handles card collection, KYC (if required), and order confirmation.
