Use the Stablecoin Payins API to return funds against a payment intent that has already received at least one settled payment. You can issue a single full refund, a single partial refund, or multiple partial refunds up to the settled total. For the mental model that underpins this procedure, see Stablecoin payins and payouts. Regional availability also affects which payment intents are refundable today.Documentation Index
Fetch the complete documentation index at: https://developers.circle.com/llms.txt
Use this file to discover all available pages before exploring further.
Refunds for Stablecoin Payins booked through Circle Singapore (CIRCLE_SG) are
not supported. See Travel Rule
compliance for the data model
that applies to Singapore stablecoin transactions.
Prerequisites
Before you begin:- A settled payment exists on the payment intent you want to refund. If you have not accepted a payin yet, see Receive a stablecoin payin.
- You have a refund destination address that you control on the same blockchain as the original payment. The destination is merchant-supplied; Circle does not automatically return funds to the source wallet.
- You have a Circle Mint sandbox API key. See Getting started for setup.
Steps
Inspect the intent to confirm a settled payment
Before you initiate a refund, retrieve the payment intent and confirm that at
least one payment in A refund-eligible response includes a populated
paymentIds is settled. Send a GET request to
/v1/paymentIntents/{id}.paymentIds array, a non-zero
amountPaid, and a timeline whose latest entry has status complete with
context paid.Issue the refund
Send a The response returns a
POST request to /v1/paymentIntents/{id}/refund. The body specifies
the destination you control, the refund amount, and an idempotency key. The
request uses two amount fields:amountcarries the source-currency basis; onlycurrencyis required, and the value is derived fromtoAmount.toAmountcarries the actual refund amount that reaches the destination and must include bothamountandcurrency.
addressTag to the destination object.- Partial refund
- Full refund
Specify an amount lower than the settled total to return a portion of the
payment.
payment object with type refund, status
pending, and a depositAddress that holds the refund destination Circle will
use for the onchain transfer.Track refund completion
Refunds settle asynchronously after the onchain transfer confirms. Use webhooks
or polling to detect settlement.
- Webhook
- Polling
Subscribe to
payments notifications. The same channel that delivers inbound
payment events also delivers refund events, discriminated by the type field.(Optional) Issue an additional partial refund
If the original refund was partial and the intent still has refundable balance,
you can issue further partial refunds up to the total settled amount. Each
additional refund still requires the intent to be within 30 days of its creation
date, and each call must use a unique
idempotencyKey.See also
- Stablecoin payins and payouts: Concepts for the refund window and the payment intent state machine.
- Receive a stablecoin payin: Accept the payment that you later refund.
- Travel Rule compliance: Travel Rule data model for Stablecoin Payouts.