account option or the Ionic-Account header. A refund
belongs to the same merchant as the original payment. Each operation behaves as
it does for a direct merchant in
Refunds, captures, and cancellations.
Before you begin
- A platform secret key from Connect → API keys, kept on your server.
- An active connection in the same mode. The platform key and the merchant’s connection both grant each permission an operation needs:
@ionicfi/sdk0.4.1 or later for the TypeScript examples, installed from npm.
Refund a payment
Send the merchant’s PaymentIntent ID. Includeamount for a partial refund.
Idempotency-Key so a repeated click or timeout
does not refund twice. The key’s scope includes the receiving merchant and mode.
Check the refund’s status before telling the buyer the refund is complete.
A refund for an in-person payment can include terminal_id to run it on that
terminal. When the merchant has automatic refund receipts on, its
receipt prints there. See
Refunds on the Terminal.
Capture an authorization
A PaymentIntent created withcapture_method: "manual" waits in
requires_capture after confirmation. Capture it for the same merchant:
Cancel before capture
Cancel an uncaptured PaymentIntent to release the buyer’s authorization hold:Refund events
A platform webhook endpoint receives a merchant’srefund.created,
refund.succeeded, refund.failed, and refund.settled events when that
merchant’s connection grants refunds:read. Payment events, including
payment_intent.canceled, require payments:read. The event’s account field
names the merchant. See Webhooks for platforms.
What’s next
Handle webhooks
Receive every connected account’s events on one endpoint and match each to its connected account.
Manage customers
Create a connected account’s customers and choose the saved card used for future charges.
- Create a refund: every field and status.
- Capture a payment intent and Cancel a payment intent.

