Prerequisites
Before you begin, ensure that you’ve:- Obtained a Circle Mint sandbox API key with access to the Stablecoin Payins
- Obtained a Circle Mint sandbox API key with access to the Crypto Deposits API.
- Obtained a
merchantWalletIdfor the wallet that receives settled funds. - Installed cURL for API calls.
- (Optional) Configured webhook notifications.
Step 1: Create a payment intent
When the customer chooses to pay with USDC or EURC onchain, call Create a payment intent and choose a continuous or transient payment intent mode.- Continuous (default mode)
- Transient
Continuous payment intents are the default type. You do not include an Example response:
amount
at creation.Example request to create a continuous payment intent:cURL
JSON
Step 2: Obtain the deposit address
Circle does not return the deposit address in the initial response to creating a payment intent. Use webhook notifications or continuous polling to get the deposit address.- Webhooks
- Polling
After you
subscribe to notifications
for
paymentIntents, you receive updates when the payment intent changes. When
paymentMethods.address is set, the payload includes an updated timeline of
the historical payment intent statuses and timestamps.Example paymentIntents notification after the deposit address is assigned:Step 3: Customer makes payment
Once you’ve obtained the deposit address, display it to the customer and instruct them to send the payment.3.1. Display the deposit address
Pass the deposit address to the customer along with the stablecoin asset to send (USDC or EURC), and (for transient intents) the amount to pay. You can display the address in plain text or as a QR code to scan from a wallet.For transient payment intents, you can display the
expiresOn time to show the
customer how long they have to pay.If the customer does not send funds before expiresOn, the payment intent moves
to a complete status with context expired. You cannot reuse an expired
intent. Create a new payment intent to retry the checkout.3.2. Customer sends funds onchain
The customer makes the payment by sending USDC or EURC to the deposit address on the specified blockchain.Step 4: Confirm payment completion
After Circle confirms the onchain transfer, it updates the payment intent and creates a payment for that same inbound transfer. The intent tracks whether the checkout is paid, while the payment records the onchain transaction hash and sender address. Treat the payin as complete when both records match what you expect. Use webhook notifications or continuous polling to inspect the intent and payment.Step 4.1. Inspect the payment intent
- Webhooks
- Polling
Subscribe to
paymentIntents notifications. After the customer pays, the
payload includes an updated timeline, amountPaid, and paymentIds.Example when the payment intent is complete and paid:Step 4.2. Inspect the payment for the same transfer
A payment is linked to the payment intent and carries the onchain transaction hash and the customer’s sending address for that specific transfer.- Webhooks
- Polling
Subscribe to
payments notifications to receive the updated payment object
when the transfer settles.JSON
For blockchains that use a memo or address tag (for example, XLM or HBAR), the
addressTag field can appear on depositAddress in payment payloads.status is paid.