Refunds
Refunds return funds to a buyer for an order, a succeeded payment intent, or a captured gift card redemption. Target an order_id, a payment_intent_id, explicit tender_allocations, or a standalone gift_card_load_id, and Flint works out which tenders the money comes from, how much tax goes back, and what the order's refunded totals become.
A refund returns money. When merchandise comes back, use a Return. To release an uncaptured hold, cancel it. Returns, order edits, and credit notes pay the buyer back with ordinary refunds on the same order. Those refunds carry return_id and return_resolution_id, order_edit_id, or credit_note_id and invoice_id. An order edit takes the units off the order and releases their stock. For a subscription renewal that cannot ship, choose out_of_stock on the refund that returns the remaining payment to cancel eligible shipment fulfillments and release their stock. The Refunds guide walks through each kind of refund with full requests and responses.
Choose a target and a refund type#
The target says what the money comes back from:
| Target | Refunds | refund_type |
|---|---|---|
order_id | The order's succeeded payments and captured gift card redemptions | full, amount, or targets |
payment_intent_id | One succeeded payment. Add order_id to require that the payment belongs to that order. | full or amount, and targets when the payment belongs to an order |
tender_allocations without order_id | Gift card redemptions made outside a Flint order, as Gift cards describes | amount |
gift_card_load_id | A standalone gift card bought with a Flint payment. See Gift card purchases. | full or amount |
refund_type is required, and it says what to refund and how much. credit_note returns credit from the required credit_note_id; omit amount_money to refund all available credit. It accepts the shared reason, note, metadata, and external reference fields, plus optional expected_credit_note_version. Order, payment, target, tender, and destination fields are not accepted on this variant. It also takes processed_by, refunded_at, and refund_reference to record a refund you paid outside Flint. Flint refunds only what the type describes:
refund_type | Refunds |
|---|---|
full | Everything still refundable on the target. Send the target alone, with no amount_money, line_items, charges, tax_breakdown_refunds, or tender_allocations. |
amount | Exactly amount_money, which is required. Line items, charges, and taxes you name must fit inside it, and Flint allocates the rest across the order. tender_allocations must add up to it. |
targets | The sum of the line_items, charges, and tax_breakdown_refunds you name, with their tax. Send at least one of those lists, and no amount_money, tender_allocations, or gift_card_load_id. |
Flint checks the body's shape before it looks anything up, so a field the type doesn't accept refunds nothing and returns 400 INVALID_REQUEST. Choose a refund type lists each detail code. The refund doesn't echo refund_type. Its amount_money, line_item_allocations, charge_allocations, and tender_allocations record what was refunded. Each line item allocation includes the owning order_id beside order_line_item_id. Every tax breakdown refund includes order_id too, including entries with order_charge_id and entries nested under line item allocations.
For shipping and other order charges, charge_allocations records each order_charge_id, amount_money, subtotal_money, discount_money, and tax_money. The subtotal is the amount returned after discounts and excluding tax; subtotal plus tax equals the amount returned. Allocations combine the charge across the refund's payments and work with automatic and external tax. For example, an $8.00 shipping refund with $0.58 tax records $8.58 in amount_money, $8.00 in subtotal_money, and $0.58 in tax_money.
A few more rules span several fields:
- Amounts are in the payment's currency, in minor units.
- A
line_itemsentry takes eitherquantityoramount_money. With only theorder_line_item_id, Flint refunds the line's remaining value and quantity. - Overriding the tax Flint works out, with top-level
tax_breakdown_refundsor a line's tax fields, also needs thecommerce.refunds.tax_overrides.writescope. See Refund tax. reasonis optional and never changes how the money moves. It feeds your reports and the buyer's refund receipt. Chooseout_of_stockwhen units could not be supplied. On a subscription renewal, that reason also requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded. If the refund finishes during the request and you can read the order, the response includes anycanceled_shipment_fulfillment_idsalready recorded. Read the order to see cancellations that finish later. Responses can also showpayment_returned, which only Flint sets and requests can't send. See Choose a reason.
Read remaining itemized capacity#
Read each current order line's refundable object before building a targets refund. It gives the remaining quantity, gross_money, discount_money, tax_money, and total_money for an ID-only line target. Read a charge's refundable_money for an ID-only charge target. These fields contain zero values when nothing remains refundable.
The values are a current snapshot and can change before a refund is created. They account for accepted refunds, including those still processing, bank reversals, and paid-order edits. An edit reserves the removed line or charge's whole value, including credit applied to added lines. Pending edit refunds and failed edit refunds that can be retried keep that reservation. Refunding an edit's reserved value does not consume it twice. A canceled, unapplied edit releases its reservation.
Use the current order_line_item_id, including the new ID an edit gives an added line. The historical refunded_quantity, removed_quantity, and refunded_money fields cannot determine remaining capacity because edit removals and refunds can overlap. A read does not reserve capacity: Flint checks it again when you submit the refund. Payment eligibility and destination rules still apply.
Return a platform fee#
By default a refund keeps the partner app's platform fee. The app that charged it can send refund_platform_fee: true with its partner app token to return the full or proportional share. The refund echoes that choice in refund_platform_fee, and payment_refunds[].refunded_platform_fee_money reports each payment's share when it has a collected fee. The credit_note variant doesn't accept the field. See Refunds and disputes for rounding, credentials, and ledger entries.
Where the money goes#
Without tender_allocations, Flint chooses the tenders: the order's original gift cards first, then its processor payments. Each line item, charge, or flat tax you name goes back to the tender that paid for it.
Use order_id by itself to refund across the order's eligible tenders. For a $4.00 order paid with a $3.00 gift card redemption and a $1.00 card charge, a full order refund restores $3.00 to the gift card and returns $1.00 to the card.
On a gift card redemption read, remaining_refundable_money gives the amount available on that redemption after refunds and order reservations. A merchant payment-intent read includes the same field when order reservations affect that payment. Use the amount for a refund scoped to that tender. Refund destination and payment-method rules still apply. Pending card refunds already reduce the payment's available amount and appear separately in the order's pending_refund_money.
An exchange applies some or all of the returned merchandise's value to the replacement order as return credit. A refund on the replacement can return money collected on that order, such as a balance the buyer paid. Return credit is excluded from the replacement's refundable amounts because the exchange already applied that value. On orders affected by an exchange, settlement_amounts.exchange_refundable_money gives the remaining order refund limit, including reservations for processing refunds.
To choose the tenders yourself, send tender_allocations with refund_type: "amount". The list is exhaustive: a tender you leave out gets nothing. The entries add up to amount_money, each stays within that tender's remaining refundable value, and together they must cover the line items, charges, and flat taxes you named.
Each part goes back to the tender that paid, its original destination, unless you choose new_gift_card. That issues new Flint gift cards as store credit and makes no processor refund. Set it for the parts Flint plans with destinations.payment_intent or destinations.gift_card_redemption, or on one explicit allocation with tender_allocations[].destination. destinations can't be combined with tender_allocations or gift_card_load_id.
- A payment can become store credit when it is a
succeededUSD card, Apple Pay, Google Pay, or Link payment on an order, with no open chargeback. Other payments return400 INVALID_REQUESTwith detailNOT_ALLOWED. Gift card value can always go to new cards. - When an original gift card is closed or can't hold the credit within its balance cap, the request returns
400 INVALID_REQUESTwith detailREQUIREDon the destination field. Choosenew_gift_cardand send it with a newIdempotency-Key.
Refund to store credit covers what store credit changes for you, the order, and the buyer.
Read the outcome from these fields:
| Field | Reports |
|---|---|
tender_allocations | Every tender the refund drew from, payment or gift card, with its amount, refunded_tip_money, status, failure_reason, destination, and the destination_cards Flint issued. Gift card entries also name the original card and redemption. |
payment_refunds | Only refunds sent to a processor. A refund that is all gift card credit or store credit has none. |
refunded_tip_money | The tip share of the refund, also reported on each part, so reports can keep sales and tips apart |
gift_card_codes | The codes of new gift cards. Only the create response carries them, and a same-key retry returns them again under the one-time secret rules. Refund reads, lists, and events never include them. |
If current replacement gift card codes are temporarily unavailable, the refund response still returns 201 and includes meta.warnings with code replacement_codes_unavailable. Retry the same request with the same Idempotency-Key to receive the codes.
Refunds paid outside Flint#
A credit-note refund with processed_by: "merchant" records money you already returned to the buyer, such as by check or wire. Flint moves no money. The Credit notes guide walks through a request.
| Field | On the request | On the refund |
|---|---|---|
processed_by | Optional on the credit_note variant: flint (the default) or merchant. | Always present: flint when Flint moved or is moving the money through a processor or a gift card, merchant when you returned it outside Flint. Extensible, so tolerate new values. Every other refund is flint. |
refunded_at | Optional, only with merchant. RFC 3339, defaults to now, and can't be in the future. | Present only when processed_by is merchant: when you say you returned the money. |
refund_reference | Optional, only with merchant. 1 to 255 characters, stored exactly as sent. | The check or wire number, when you sent one. external_reference_id stays your own ID for the refund. |
A recorded refund is created succeeded and never pending or failed. It has payment_refunds: [] and omits payment_intent_id and failure_reason. It posts no balance transaction, fee, or payout change, and Flint sends the buyer no refund receipt.
amount_money can be at most the smaller of the note's available_money and the invoice's manually recorded money not yet returned. Leave it out to record that amount. A larger amount, or none left, returns 409 LIMIT_EXCEEDED with details[0].maximum_money. Reversing a manual payment that recorded refunds depend on returns 409 RESOURCE_IN_USE with those refunds in blocking_resources. A recorded refund can't be reversed.
Refunds Flint creates#
Every refund says who decided to make it, and Flint-initiated refunds say why they're waiting:
| Field | Values |
|---|---|
initiated_by | Always present and read-only. merchant for every refund you or your integration asks for, including refunds from Returns, credit notes, order edits, and declined payment reviews. flint for a refund Flint makes on its own to return a payment it couldn't accept. Extensible. |
pending_reason | Always present. manual_review while a pending refund waits for Flint's team to check it, with nothing needed from you. null when the refund isn't pending or is on its way without review. Extensible. |
A refund with initiated_by: "flint" has reason: "payment_returned" and the order_id of the order the payment was for. It never counts toward that order's refunded amounts or refund_status. When it returns a payment Flint couldn't accept, it goes back to pending with pending_reason: "manual_review" instead of failing if a bank reverses it, and it fails with failure_reason: "payment_disputed" when the buyer wins a dispute on the charge before Flint sends the refund. Flint then still returns your processing fee to your balance, and the dispute fee is yours, as with any lost dispute. Its success sends the buyer a receipt variant that says their payment couldn't be applied to the order. Refunds Flint creates covers when Flint makes one.
A payment_returned refund can also fail with failure_reason: "refund_abandoned": Flint stopped trying to send this refund to the buyer's payment method. The money is still in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Set only on a refund with reason: payment_returned. This refund can't be retried through Flint. Flint returns its whole processing fee. Headless checkout reads the outcome in the session's refunds array, which contains all buyer-visible refunds on the order using the same projection as /v1/me/refunds.
A lost dispute can cover less than the original principal. The first Refund still keeps its original amount_money and ends failed with failure_reason: "payment_disputed"; Flint creates a second Refund for the remainder. For a $10 principal and a $4 lost dispute, the failed Refund stays at $10 and the new Refund is $6. The Dispute records the $4 repayment. Both Refunds appear in the order's refund_ids and stay excluded from order refund totals and capacity. For this limit, the failed first Refund consumes no capacity, and active Refund amounts together cannot exceed the principal. Flint refunds its whole application fee, and you bear the dispute fee.
Status#
A refund's status summarizes its parts. When processing finishes during the request, the create response reports the outcome: succeeded, partially_succeeded, or failed. Otherwise it returns pending. If Flint can't confirm the completed outcome before responding, it returns the recorded pending response. Follow the refund with GET /v1/refunds/{refund_id} or refund.* events for its current state. Only failed is final, because a bank can reject a credit after the processor accepted it.
- pending moves to succeeded on every part refunded
- pending moves to partially_succeeded on some parts failed
- pending moves to failed on every part failed
- succeeded moves to partially_succeeded on a bank rejects part of the credit
- succeeded moves to failed on a bank rejects the credit
- succeeded moves to pending on a bank reverses a Flint return
- partially_succeeded moves to failed on a bank rejects the rest
status on refundpendingRecorded, with at least one part still in progress. A refund on a payment with no order always starts here, because Flint submits it in the background.succeededEvery part succeeded. A bank rejection can still move it topartially_succeededorfailed.partially_succeededSome parts succeeded and the rest failed or were canceled.failure_reasonispayment_refund_failed; read the parts for the split.failedFinalNo money went back to the buyer.failure_reasonsays why, and the amount is refundable again under a newIdempotency-Key, except for a refund from an order edit, whose money stays held for the edit and goes back through its retry, and a refund withreason: "payment_returned"that failed withfailure_reason: "payment_disputed": the buyer won a dispute on the charge, so nothing is left to refund. Apayment_returnedrefund that failed withrefund_abandonedcannot be retried through Flint; Flint hasn't repaid the buyer. Repay them another way if you haven't already.
Note: A 201 means Flint recorded a refund
Once Flint records a refund, POST /v1/refunds returns 201 with it. A refund the processor or your balance rejects during the request can come back with status: "failed"; a pending response needs a read or event to confirm the outcome. 409 OPERATION_IN_PROGRESS or 409 IDEMPOTENCY_KEY_IN_PROGRESS means the original operation may still be running and a refund may already exist. Other 4xx responses refuse this attempt before it creates a refund.
Each payment_refunds and tender_allocations entry has its own status: pending, requires_action, succeeded, failed, or canceled. A canceled part is one Flint didn't try because another payment in the same refund failed first. While a status is succeeded, succeeded_at says when it first got there; on the refund, that's when its last part first succeeded. Track the refund to completion explains each part status, and When a refund fails lists every failure_reason.
Events#
Each status change sends one lifecycle event, and refund.updated covers every other change. The event's data.object is the refund as GET /v1/refunds/{refund_id} returns it.
refund.created: Flint recorded the refund, including refunds from Returns, order edits, and credit notes, and refunds Flint creates to return a payment it couldn't accept.refund.succeeded,refund.partially_succeeded, orrefund.failed: the status became that value, including when a bank rejected a refund that had succeeded. A refund recorded as paid outside Flint is createdsucceeded, so it sendsrefund.createdandrefund.succeededtogether, with the same snapshot andversion.refund.updated: the refund changed and its status didn't, such as aPATCH, one part finishing while another is still pending, or apending_reasonchange. A Flint-initiated refund that a bank reverses after it succeeded goes back topendingand sendsrefund.updated.
A refund that changes the order's refund_status, including a recorded one, also sends order.partially_refunded or order.refunded. Count refunds from refund.* events, because a second partial refund sends no order event. Refund events shows the order they arrive in and a handler.
What a refund changes#
- The order.
refund_statusbecomespartially_refunded, thenrefundedonce everything collected has gone back. Refunded line items, charges, and tips record their ownrefunded_money. The order'sstatus,payment_status, andoutstanding_moneydon't change, andrefund_idslists every refund, including failed ones. See What the refund changes on the order. - The payment intent.
refunded_moneyandrefund_statusinclude pending refunds and store credit, and a change to either sendspayment_intent.updated. The payment intent'sstatusnever changes. - Your balance. A refund sent to a processor posts a negative
refundbalance transaction and is paid from your available balance. The original processing fee isn't returned. Store credit moves no cash.
Recovery by key#
Every POST /v1/refunds requires an Idempotency-Key. Sending the same key and body again returns the recorded response with Idempotency-Replayed: true, however late the retry arrives and even if the refund's current status has changed. In rare failures, the first response can be pending while later same-key retries return the recorded final outcome. Read the refund for its current state. A replay never contacts the processor again, including when that refund failed. A new try after a refund failed is a new refund and needs a new key. After a refused request, next_steps says whether you can reuse its key.
If you lose the create response, find the refund with GET /v1/refunds?idempotency_key={key}. It returns the refund in its current status, including pending and failed, without gift card codes; a same-key replay returns those under the one-time secret rules. Recovery reads covers the matching rules and what an empty result means.
Versions#
Every refund has a version, a positive integer that starts at 1 and increases with each committed change: a PATCH, and each status change Flint records from the processor or the bank. Creating a refund also changes the refunded payment intent, which advances that payment intent's own version. An expanded payment_intent carries its own version, which the refund's doesn't cover.
PATCH /v1/refunds/{refund_id} changes only metadata and external_reference_id, and accepts an optional expected_version. A stale value returns 409 VERSION_CONFLICT with resource_type: "refund" and the current version in details[0].current_version, and nothing is saved. Read the refund again, merge your change into its current values, and send it with the new version. If you sent an Idempotency-Key, follow the key instruction in next_steps. POST /v1/refunds takes no expected_version: the remaining refundable amount protects it, as Errors to handle describes.
Find refunds#
GET /v1/refunds lists refunds newest first. Two filter rules span several parameters:
currencyselects refunds whoseamount_money.currencymatches, with or withoutmin_amountandmax_amount. The amount bounds need it. Send one three-letter uppercase ISO 4217 code, such asUSD; anything else returns400 INVALID_REQUESTwithparam: currency.statustakes the four refund statuses. A part status, such asrequires_actionorcanceled, returns400 INVALID_REQUEST.
Expand related records in the list#
expand adds the related record beside its ID on every refund in the response, or null when the refund has no such ID. Every path needs commerce.refunds.read plus the related resource's read scope:
expand | Adds | Also needs |
|---|---|---|
order | The order summary for order_id, including its buyer_contact | commerce.orders.read |
customer | The customer summary for customer_id | customers.read |
payment_intent | The payment intent summary for payment_intent_id | payments.payment_intents.read |
GET /v1/refunds/{refund_id} accepts the same paths plus payment_refunds.payment_intent. A key without a scope a path needs gets 403 INSUFFICIENT_SCOPE with param: expand. Expand related records covers how Flint batches each page and keeps page tokens valid, and Expanded order summaries lists what an order summary holds.
A daily check for failed refunds, with each one's order and payment:
curl -G https://api.withflintpay.com/v1/refunds \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "status=failed" \
--data-urlencode "created_after=2026-10-27T00:00:00Z" \
--data-urlencode "expand=order,payment_intent"
Gift card purchases#
Refunding a gift card's purchase returns the cash the buyer paid for it and removes the card's unspent value. For a card sold on a Flint order, refund its order line item. For a standalone card bought with a Flint payment, refund its funding load.
Refund a standalone purchase#
Send the card's original gift_card_load_id with refund_type full or amount, and no order_id, line items, charges, tax breakdowns, tender_allocations, or destinations. The load must be a standalone USD purchase paid with a Flint payment; a load from an order, a store credit load, or a replacement card's load returns 400 INVALID_REQUEST on gift_card_load_id. payment_intent_id is optional, and when you send it, it must be the load's original payment.
amount_money is the price paid, which can differ from the face value: refunding all $90.00 of a $100.00 card sold for $90.00 removes $100.00 of unspent value. full refunds whatever of the price paid hasn't been refunded yet.
Before the cash refund starts, Flint holds the matching unspent value. A pending or unknown processor outcome keeps the hold, a confirmed success removes the value, and a confirmed failure releases it. A refund that needs value already spent, or held by another pending refund, returns 409 LIMIT_EXCEEDED.
- Cash that funded no card. If the same payment also collected cash that didn't fund a gift card, refund that cash through
payment_intent_idwithout the load. It can't use money assigned to a card or held by another pending refund. - Value on a replacement card. If the value moved to a replacement card, a new cash refund still targets the original funding load, and Flint holds the unspent value on whichever cards now hold it.
The load's purchase_refunds records each refund with its consideration_money, value_money, and status. When the value didn't all stay on the original load, value_allocations names the loads it came from and each one's amount_money, and a replacement card's load lists pending holds in purchase_refund_value_holds. Gift card loads lists every field.
When a purchase refund fails after it succeeded#
If a bank rejects a purchase refund that had succeeded, Flint puts the removed value back. It goes to the original card when all of it came from that load and the card is open and can take it within its balance cap. Otherwise Flint issues replacement cards that keep the original funding history and restrictions. The load's purchase_refunds[].recovery names where the value went. Replaying the original refund request returns the replacement codes for 24 hours after the recovery; reads and events carry only card and load IDs.
Gift cards sold on an order#
Cash that paid for only part of a gift card on an order line item doesn't issue a card. If a refund of that cash fails after it succeeded, Flint doesn't issue a card for it either. The refund reports the cash in unissued_gift_card_recoveries, with the amount in returned_amount_money.
To pay that cash back to the buyer, create a new targets refund with the entry's order_id and payment_intent_id, and a line_items entry naming its order_line_item_id with the amount in amount_money, under a new Idempotency-Key. Flint returns the recovered cash before it removes value from cards that payment funded.
The source_remaining_amount_money and source_pending_amount_money amounts describe the whole settlement_allocation_id, so entries that share one aren't additive. The remaining amount includes cash that pending refunds hold; subtract the pending amount to find what you can refund now.
Related guides#
RefundsEvery kind of refund with requests and responses, failures, and errors to handle.ReturnsRefund merchandise that comes back, with eligibility, restocking, and return policies.Orders-firstHow refunds fit the order lifecycle and its refunded totals.The Refund object#
Money returned against a collected payment.
Returned by GET /v1/refunds/{refund_id} and carried by the endpoints below.
Attributes
amount_moneyobjectRequiredTotal refunded across all tenders, including `refunded_tip_money`.
amountintegerRequiredAmount in the currency's minor unit, such as cents for USD.
currencystringRequiredThree-letter uppercase ISO 4217 currency code for this amount, such as USD.
charge_allocationsarray of objectMoney returned for each order charge, including subtotal, discount, and tax, combined across payment refunds.
Not returned with a checkout credential or a customer session
amount_moneyobjectRequiredTotal returned for this charge, including tax.
discount_moneyobjectRequiredDiscount allocated to the refunded part of the charge. It does not increase the money returned.
order_charge_idstringRequiredID of the refunded order charge.
order_idstringRequiredID of the order containing the refunded charge.
subtotal_moneyobjectRequiredCharge amount returned excluding tax, after discounts.
tax_moneyobjectRequiredTax returned for this charge under automatic or external tax. Included in amount_money.
created_atstringRequiredRFC3339 timestamp.
credit_adjustment_moneyobjectRequiredMoney paid for Return resolution credits, included in amount_money. It carries no merchandise, shipping, tax, or tip allocation. Zero for refunds without credits.
amountintegerRequiredAmount in the currency's minor unit, such as cents for USD.
currencystringRequiredThree-letter uppercase ISO 4217 currency code for this amount, such as USD.
credit_note_idstringID of the credit note this refund paid out. Present only on refunds issued through a credit note.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
created_atstringRFC3339 timestamp.
customer_idstringRequiredUnique identifier for this customer, prefixed `cus_`.
emailstring or nullRequiredCustomer email. `null` when the customer has none. Unique among the environment's customers.
namestring or nullRequiredCustomer name. `null` when none is set.
phonestring or nullRequiredCustomer phone number. `null` when none is set.
statusenumRequiredWhere the customer is in the deletion lifecycle.
activedeletion_processingdeleted
updated_atstringRFC3339 timestamp.
customer_idstringID of the customer on the refunded order or payment. Absent when neither has one.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential or a customer session
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
Not returned with a checkout credential or a customer session
initiated_byenumRequiredWho decided to make this refund: `merchant` for you or your integration, `flint` for a refund Flint made on its own to return a payment it couldn't accept. Unlike a Return's `initiated_by`, it doesn't say which credential asked. Read-only.
Not returned with a checkout credential or a customer session
merchantflint
invoice_idstringID of the invoice whose credit note this refund paid out. Present only on refunds issued through a credit note.
line_item_allocationsarray of objectHow the refund applied to each order line item it covered, with quantity, tax, and adjustments.
adjustment_refundsarray of objectAmounts refunded back against adjustments withheld by earlier refunds of this line.
adjustmentsarray of objectAmounts withheld from this line's refund, such as a restocking fee.
automatic_refundobjectRequiredWhat Flint calculated for the refunded portion of the line before adjustments.
bundle_idstringID of the bundle the line was sold from.
categoriesarray of objectCatalog categories of the item.
modifiersarray of objectThe part of the refund that applies to each modifier on the line.
order_idstringRequiredID of the order that owns the refunded line item.
order_line_item_idstringRequiredID of the order line item this allocation refunded.
product_idstringID of the catalog product the line was sold from.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
refunded_moneyobjectRequiredAmount refunded for this line: the automatic refund less adjustments, plus any refunds back against earlier adjustments.
selected_optionsarray of objectVariant options selected for the item, such as size and color.
skustringSKU of the item as sold.
source_typeenumWhether the line was sold as a catalog `variant` or a `bundle`.
variantbundle
tax_breakdown_refundsarray of objectTax reversed for each jurisdiction on this line.
tax_refund_modeenumRequiredWhether Flint calculated the tax refunded (`automatic`) or you set it (`explicit`).
automaticexplicit
variant_idstringID of the catalog variant the line was sold from.
merchant_idstringRequiredID of the merchant this resource belongs to.
Not returned with a checkout credential or a customer session
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential or a customer session
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
buyer_contactobjectBuyer contact recorded on the order, including guest contact when retained. Omitted when the order has no recorded contact.
Not returned with a checkout credential or a customer session
closed_atstringWhen the order last closed. Present exactly when status is closed.
closed_reasonenumWhy the order closed. Present exactly when status is closed. Flint returns other for an unrecognized reason and may add new values.
invoice_voidedpaidclosed_by_merchantcheckout_expiredwritten_offsupersededreturn_resolution_canceledother
created_atstringWhen the order was created, in RFC3339 format.
customer_idstringCustomer associated with the order, when one is set.
deferred_promotionsarray of objectRequiredPromotions accepted at subscription signup. They attach when the subscription is provisioned and first discount its first charged cycle. They do not discount this order and are separate from discounts and order totals. Always present; empty when no promotions are deferred.
fulfillment_statusenumAggregate progress across the order's fulfillment quantities.
not_fulfilledpartially_fulfilledfulfilledcancelednot_applicableclosed
governing_delivery_selection_idstring or nullRequiredID of the delivery selection that governs this order. Null when no selection governs the order.
order_idstringRequiredStable identifier of the expanded order.
order_numberstringHuman-readable order number for receipts and merchant reference.
paid_atstring or nullRequiredWhen the current paid state began, including a final capture that releases the remaining balance. A reversal that reopens the order clears this timestamp. `null` when `payment_status` isn't `paid`, including an order whose balance was written off without being paid.
payment_intent_idsarray of stringPayment intents associated with the order.
payment_statusenumRequiredCollection progress. Reversing a recorded invoice payment can move this back to unpaid or partially_paid. An invoice write-off also completes collection without receiving the written-off amount.
unpaidpartially_paidpaid
pricing_amountsobjectRequiredOrder totals before accounting for collected payments and refunds.
refund_statusenumRequiredRefund progress for collected money. Refunds with `reason` `payment_returned` return money the order never received and don't count.
nonepartially_refundedrefunded
settlement_amountsobjectRequiredPayments, refunds, credits, and amounts still owed for the order.
statusenumRequiredWhether the order still accepts changes and new payments. An order closed as paid reopens if reversing a recorded invoice payment leaves an outstanding order balance. Refunds, fulfillment, disputes, returns, and metadata or note edits continue on a closed order.
openclosed
supported_actionsarray of enumLifecycle actions Flint accepts on the order now, independent of permissions. Always present with merchant credentials.
Not returned with a checkout credential or a customer session
closepayresolve_inventory_exception
updated_atstringWhen the order was last updated, in RFC3339 format.
order_edit_idstringID of the paid-order edit that created this refund. Present only on refunds issued through an order edit.
order_idstringID of the order the refund was issued against. For a refund with `reason` `payment_returned`, the order the returned payment was for; the order never received this money. Absent for a refund of a payment that has no order, and for a standalone gift card refund.
payment_intentobject or nullPresent only when `expand` includes `payment_intent`; `null` when expanded and there is no related payment intent.
amount_moneyobjectRequiredThe amount requested from the buyer, including any tip_money. Capturing doesn't change it: after a partial capture it still shows the requested amount, and captured_money shows what was collected. On a standalone payment intent, PATCH can change it only before the first confirmation attempt. An amount_money or tip_money change that leaves too little for stored splits returns LIMIT_EXCEEDED at the changed field with minimum_money.
capture_methodenumWhen money is collected. Defaults to automatic.
automaticmanual
created_atstringRFC3339 timestamp.
customer_idstringCustomer linked to this payment intent.
dispute_statusenumRequiredDispute state of this payment. none means no dispute or inquiry is open or recorded. The inquiry_ values track an issuer inquiry or early warning that isn't a chargeback. Read the dispute with GET /v1/disputes for its deadline and evidence.
noneinquiry_needs_responseinquiry_under_reviewinquiry_closedneeds_responseunder_reviewwonlostpreventedother
order_idstringOrder this payment intent belongs to. Create it through the order and confirm it with POST /v1/orders/{order_id}/pay. Capture and cancel use POST /v1/payment-intents/{payment_intent_id}/capture or /cancel for every payment intent. Order-owned intents accept PATCH for metadata and external_reference_id.
payment_intent_idstringRequiredFlint payment intent ID.
payment_sourceobjectSummary of the card or bank account used for the payment. Absent until a payment source is attached.
refund_statusenumHow much of captured_money has been refunded, including value issued as store credit, based on refunded_money.
nonepartially_refundedrefunded
statusenumRequiredLifecycle status. requires_payment_method covers both a new payment intent and one whose last attempt failed, so read last_payment_error with it. succeeded, canceled, and expired are final. Refunds and disputes never change status.
requires_payment_methodrequires_confirmationrequires_actionprocessingrequires_capturecanceledsucceededexpired
supported_actionsarray of enumVerbs this payment intent accepts now, each a POST to /v1/payment-intents/{payment_intent_id}/{action}. The list includes stored order facts and can change without a payment intent version change. Order legs list confirm when a single leg can pay the order or an open attempt can continue it. Several unpaid legs, selected gift cards, or automatic tax with a leg below the balance require pay_order instead. Invoice payments list only cancel. An unused first-period subscription payment lists cancel once the subscription is canceled. Order edit payments list confirm while awaiting payment details or action. A listed action can still be refused due to an open risk review, an order payment attempt, a closed order, or the merchant account. A managed_by_owner refusal names the owner and its command in remediation.next_actions. The merchant list is credential-independent. Checkout credentials receive that list filtered to confirm and cancel on their own session's intents, never capture. Customer sessions omit this field. New actions may be added. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
confirmcapturecancel
updated_atstringRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
payment_intent_idstringID of the payment the refund was issued against, when it targeted one payment. `payment_refunds` lists every payment it returned money through.
payment_refundsarray of objectThe part of the refund returned through each payment, with its own status. Absent when the refund was all gift card credit or store credit.
amount_moneyobjectRequiredAmount refunded through this payment, including `refunded_tip_money`.
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
payment_intentobject or nullPresent only when `expand` includes `payment_refunds.payment_intent`; `null` when expanded and there is no related payment intent.
payment_intent_idstringThe payment this part of the refund returned money through.
refunded_platform_fee_moneyobjectThe platform fee this payment refund returns to you, present when the payment carries a collected platform fee: its share when the refund was created with refund_platform_fee true, 0 when the partner app keeps the fee. Flint returns it once this payment refund succeeds. If this payment refund then fails, Flint doesn't take the returned fee back. See [Platform fees](/docs/guides/platform-fees).
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
split_reversalsarray of objectFixed seller allocations on the payment, each naming its payment split and reversal. Present only when the payment has splits; an empty array means no seller share was allocated. Read PaymentSplit.reversals for status, shortfall, and reinstated amounts.
Not returned with a checkout credential or a customer session
statusenumRequiredStatus of this payment refund or tender allocation. A succeeded refund can still fail after a bank rejection. Parent status transitions send refund.succeeded, refund.partially_succeeded, or refund.failed; other public changes send refund.updated.
pendingrequires_actionsucceededfailedcanceled
succeeded_atstringWhen this payment refund's `status` first became `succeeded`, as Flint recorded the processor's outcome. It keeps that time if the part fails and later succeeds again. The refund's `tender_allocations` entry for the same payment has the same value. Present only while `status` is `succeeded`.
payment_review_idstringID of the payment review whose decline created this refund. Present only on refunds issued for a declined review.
pending_reasonenum or nullRequiredWhy a pending refund is waiting. `null` when `status` isn't `pending`, or when the refund is on its way without review.
manual_reviewnull
processed_byenumRequiredWho moved or is moving the money for this refund. Flint processes refunds through a processor or a gift card; merchant means the merchant returned the money outside Flint and recorded it here. Existing refunds are processed by Flint.
flintmerchant
reasonenum or nullRequiredWhy the refund was issued. It never changes how the money moves. The buyer's refund receipt shows it only for `requested_by_customer`, `duplicate`, `defective_product`, `wrong_item_shipped`, `never_received`, `not_as_described`, `arrived_too_late`, `accidental_order`, and `out_of_stock`. Only Flint sets `payment_returned`, and it can't be sent in requests. `null` when no reason was recorded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stockpayment_returnednull
reason_messagestringNote explaining the refund, up to 1,024 characters.
refund_idstringRequiredUnique identifier for this refund, prefixed `ref_`.
refund_platform_feebooleanRequiredWhether the request asked to return the platform fee on the payments this refund refunds (refund_platform_fee). Each payment refund's refunded_platform_fee_money is what it returns.
Not returned with a checkout credential or a customer session
refund_referencestringThe merchant's opaque check, wire, or other reference for money returned outside Flint, preserved exactly. Present only when processed_by is merchant and a reference was supplied. external_reference_id is the merchant's own refund ID.
refunded_atstringWhen the merchant reports that the money was returned outside Flint. Present only when processed_by is merchant.
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
amountintegerRequiredAmount in the currency's minor unit, such as cents for USD.
currencystringRequiredThree-letter uppercase ISO 4217 currency code for this amount, such as USD.
return_idstringID of the return this refund paid out. Present only on refunds issued by a return.
return_resolution_idstringID of the return resolution that issued this refund. Present only on refunds issued by a return.
statusenumRequiredSummary of payment_refunds and tender_allocations. Only failed is final: succeeded and partially_succeeded can still change when a bank rejects a refund after accepting it. A refund Flint made to return a payment it couldn't accept goes from succeeded back to pending, with pending_reason manual_review, when a bank reverses it. Follow refund.created when it is accepted, refund.succeeded, refund.partially_succeeded, or refund.failed when its outcome changes, and refund.updated for other changes.
pendingsucceededpartially_succeededfailed
succeeded_atstringWhen `status` first became `succeeded`. For a refund with `payment_refunds` or `tender_allocations`, it's when the last of them first succeeded, so it equals the latest `succeeded_at` among them. For a refund Flint processes, it's when Flint recorded the outcome; with `processed_by` `merchant`, it equals `refunded_at`. Present only while `status` is `succeeded`; absent for every other status, including `partially_succeeded` and a refund that failed after it succeeded. A refund that succeeds again shows its first success time.
tax_breakdown_refundsarray of objectTax reversed on order-level charges and flat taxes, one entry per tax breakdown. Tax reversed on line items is in `line_item_allocations[].tax_breakdown_refunds`.
order_charge_idstringID of the order charge whose tax this reverses. Present only in the refund's top-level `tax_breakdown_refunds`.
order_idstringRequiredID of the order that owns this tax breakdown and its line item or charge, when present.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) this entry reverses.
tax_moneyobjectRequiredTax reversed for this breakdown.
tender_allocationsarray of objectEvery tender the refund drew from, payment or gift card, with its amount, tip share, status, and destination.
amount_moneyobjectRequiredAmount of the refund that went to this tender, including `refunded_tip_money`.
destinationenumWhere this allocation is refunded. original returns value to the tender that paid; new_gift_card issues new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
destination_cardsarray of objectThe gift cards that received this allocation's value, with the amount each received. Absent when the value went back to a payment.
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
gift_card_idstringThe gift card whose redemption this allocation refunded. Present when `tender_type` is `gift_card_redemption`.
gift_card_redemption_idstringThe gift card redemption this allocation refunded. Present when `tender_type` is `gift_card_redemption`.
payment_intent_idstringThe payment this allocation refunded. Present when `tender_type` is `payment_intent`.
refund_allocation_idstringRequiredUnique identifier for this tender allocation, prefixed `rta_`.
refunded_tip_moneyobjectRequiredShare of this allocation's `amount_money` that refunds tips.
statusenumRequiredStatus of this payment refund or tender allocation. A succeeded refund can still fail after a bank rejection. Parent status transitions send refund.succeeded, refund.partially_succeeded, or refund.failed; other public changes send refund.updated.
pendingrequires_actionsucceededfailedcanceled
succeeded_atstringWhen this tender's `status` first became `succeeded`. Gift card credit and store credit (`destination` `new_gift_card`) succeed when the refund is created. A `payment_intent` tender with `destination` `original` has the same value as its `payment_refunds` entry; store credit has no `payment_refunds` entry. Tax reports use it as `refund_succeeded_at` on the rows for this tender. Present only while `status` is `succeeded`.
tender_typeenumRequiredWhich kind of original tender this allocation refunded.
payment_intentgift_card_redemption
unissued_gift_card_recoveriesarray of objectCash returned after an unissued gift card purchase refund failed. Return it through a new refund against payment_intent_id and order_line_item_id. It does not issue another card. Source remaining and pending amounts describe the entire original settlement allocation; repeated entries for that source are not additive.
Not returned with a checkout credential or a customer session
order_idstringRequiredThe order the gift card was sold on.
order_line_item_idstringRequiredThe gift card line item the cash paid for. Name it in a `line_items` entry of the new refund.
payment_intent_idstringRequiredThe payment the returned cash belongs to. Name it in the new refund.
purchase_refund_allocation_idstringRequiredID of the gift card purchase refund allocation whose cash came back after it failed.
returned_amount_moneyobjectRequiredCash that came back and funded no gift card.
settlement_allocation_idstringRequiredID of the settlement allocation this entry draws on. Entries that share one describe the same pool, so their amounts aren't additive.
source_pending_amount_moneyobjectRequiredCash on the whole settlement allocation that pending refunds hold.
source_remaining_amount_moneyobjectRequiredCash left on the whole settlement allocation, including cash that pending refunds hold. Subtract `source_pending_amount_money` to find what you can refund now.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"created_at": "2026-03-17T14:30:00Z",
"credit_adjustment_money": {
"amount": 0,
"currency": "USD"
},
"customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
"idempotency_key": null,
"initiated_by": "merchant",
"line_item_allocations": [
{
"automatic_refund": {
"discount_money": {
"amount": 0,
"currency": "USD"
},
"subtotal_money": {
"amount": 800,
"currency": "USD"
},
"tax_money": {
"amount": 75,
"currency": "USD"
},
"total_money": {
"amount": 875,
"currency": "USD"
}
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
"quantity": 1,
"refunded_money": {
"amount": 875,
"currency": "USD"
},
"tax_breakdown_refunds": [
{
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JQ7KAWR90GZM108",
"tax_money": {
"amount": 75,
"currency": "USD"
}
}
],
"tax_refund_mode": "automatic"
}
],
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"ticket_id": "tkt_123"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"payment_refunds": [
{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z"
}
],
"pending_reason": null,
"processed_by": "flint",
"reason": "requested_by_customer",
"refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
"refund_platform_fee": false,
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z",
"tax_breakdown_refunds": [
{
"order_charge_id": "och_01KEZF7C00YH9T408H27KFXV3Z",
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JWJYDF84K29PDCG",
"tax_money": {
"amount": 25,
"currency": "USD"
}
}
],
"updated_at": "2026-03-17T14:30:00Z",
"version": 1
}List refunds#
/v1/refundsRequires scope commerce.refunds.read or commerce.refunds.write
Rate limit: read
Returns a paginated list of refunds for the authenticated merchant. Default order: created_at descending, then refund_id descending.
Query parameters
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
order_idstringFilter by order ID.
payment_intent_idstringFilter by payment intent ID.
customer_idstringFilter by customer ID.
statusarray of enumFilter by refund status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
pendingsucceededpartially_succeededfailed
reasonarray of enumFilter by refund reasons. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stockpayment_returned
min_amountintegerInclusive lower bound on amount_money.amount. Requires currency.
max_amountintegerInclusive upper bound on amount_money.amount. Requires currency.
currencystringExact parent refund amount_money.currency filter, with or without amount bounds. Send a three-letter uppercase ISO 4217 code without surrounding whitespace. Amount bounds require currency.
external_reference_idstringExact-match filter on the caller-owned external reference ID.
credit_note_idstringExact match on the credit note whose credit was refunded. Unknown or other-merchant IDs return an empty page.
return_idstringFilter by linked Return ID.
return_resolution_idstringFilter by linked ReturnResolution ID.
querystringSearch across refund_id, external_reference_id, and reason_message. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.
sort_byenumField to sort by. Defaults to created_at; ties are broken by refund_id.
created_atupdated_atamount_money
sort_directionenumSort direction. Defaults to desc.
ascdesc
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
expandarray of enumInclude related objects in the response. Supported expansions: customer, order, payment_intent. Include the requested related resources using scoped batch reads for this page. Each relationship requires its existing target read scopes. Expansion changes the representation without changing pagination tokens. Limits: at most 10 unique expand paths per request.
customerorderpayment_intent
Response · 200
A page of refunds.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
amount_moneyobjectRequiredTotal refunded across all tenders, including `refunded_tip_money`.
charge_allocationsarray of objectMoney returned for each order charge, including subtotal, discount, and tax, combined across payment refunds.
Not returned with a checkout credential or a customer session
created_atstringRequiredRFC3339 timestamp.
credit_adjustment_moneyobjectRequiredMoney paid for Return resolution credits, included in amount_money. It carries no merchandise, shipping, tax, or tip allocation. Zero for refunds without credits.
credit_note_idstringID of the credit note this refund paid out. Present only on refunds issued through a credit note.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
customer_idstringID of the customer on the refunded order or payment. Absent when neither has one.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential or a customer session
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
Not returned with a checkout credential or a customer session
initiated_byenumRequiredWho decided to make this refund: `merchant` for you or your integration, `flint` for a refund Flint made on its own to return a payment it couldn't accept. Unlike a Return's `initiated_by`, it doesn't say which credential asked. Read-only.
Not returned with a checkout credential or a customer session
merchantflint
invoice_idstringID of the invoice whose credit note this refund paid out. Present only on refunds issued through a credit note.
line_item_allocationsarray of objectHow the refund applied to each order line item it covered, with quantity, tax, and adjustments.
merchant_idstringRequiredID of the merchant this resource belongs to.
Not returned with a checkout credential or a customer session
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential or a customer session
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
order_edit_idstringID of the paid-order edit that created this refund. Present only on refunds issued through an order edit.
order_idstringID of the order the refund was issued against. For a refund with `reason` `payment_returned`, the order the returned payment was for; the order never received this money. Absent for a refund of a payment that has no order, and for a standalone gift card refund.
payment_intentobject or nullPresent only when `expand` includes `payment_intent`; `null` when expanded and there is no related payment intent.
payment_intent_idstringID of the payment the refund was issued against, when it targeted one payment. `payment_refunds` lists every payment it returned money through.
payment_refundsarray of objectThe part of the refund returned through each payment, with its own status. Absent when the refund was all gift card credit or store credit.
payment_review_idstringID of the payment review whose decline created this refund. Present only on refunds issued for a declined review.
pending_reasonenum or nullRequiredWhy a pending refund is waiting. `null` when `status` isn't `pending`, or when the refund is on its way without review.
manual_reviewnull
processed_byenumRequiredWho moved or is moving the money for this refund. Flint processes refunds through a processor or a gift card; merchant means the merchant returned the money outside Flint and recorded it here. Existing refunds are processed by Flint.
flintmerchant
reasonenum or nullRequiredWhy the refund was issued. It never changes how the money moves. The buyer's refund receipt shows it only for `requested_by_customer`, `duplicate`, `defective_product`, `wrong_item_shipped`, `never_received`, `not_as_described`, `arrived_too_late`, `accidental_order`, and `out_of_stock`. Only Flint sets `payment_returned`, and it can't be sent in requests. `null` when no reason was recorded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stockpayment_returnednull
reason_messagestringNote explaining the refund, up to 1,024 characters.
refund_idstringRequiredUnique identifier for this refund, prefixed `ref_`.
refund_platform_feebooleanRequiredWhether the request asked to return the platform fee on the payments this refund refunds (refund_platform_fee). Each payment refund's refunded_platform_fee_money is what it returns.
Not returned with a checkout credential or a customer session
refund_referencestringThe merchant's opaque check, wire, or other reference for money returned outside Flint, preserved exactly. Present only when processed_by is merchant and a reference was supplied. external_reference_id is the merchant's own refund ID.
refunded_atstringWhen the merchant reports that the money was returned outside Flint. Present only when processed_by is merchant.
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
return_idstringID of the return this refund paid out. Present only on refunds issued by a return.
return_resolution_idstringID of the return resolution that issued this refund. Present only on refunds issued by a return.
statusenumRequiredSummary of payment_refunds and tender_allocations. Only failed is final: succeeded and partially_succeeded can still change when a bank rejects a refund after accepting it. A refund Flint made to return a payment it couldn't accept goes from succeeded back to pending, with pending_reason manual_review, when a bank reverses it. Follow refund.created when it is accepted, refund.succeeded, refund.partially_succeeded, or refund.failed when its outcome changes, and refund.updated for other changes.
pendingsucceededpartially_succeededfailed
succeeded_atstringWhen `status` first became `succeeded`. For a refund with `payment_refunds` or `tender_allocations`, it's when the last of them first succeeded, so it equals the latest `succeeded_at` among them. For a refund Flint processes, it's when Flint recorded the outcome; with `processed_by` `merchant`, it equals `refunded_at`. Present only while `status` is `succeeded`; absent for every other status, including `partially_succeeded` and a refund that failed after it succeeded. A refund that succeeds again shows its first success time.
tax_breakdown_refundsarray of objectTax reversed on order-level charges and flat taxes, one entry per tax breakdown. Tax reversed on line items is in `line_item_allocations[].tax_breakdown_refunds`.
tender_allocationsarray of objectEvery tender the refund drew from, payment or gift card, with its amount, tip share, status, and destination.
unissued_gift_card_recoveriesarray of objectCash returned after an unissued gift card purchase refund failed. Return it through a new refund against payment_intent_id and order_line_item_id. It does not issue another card. Source remaining and pending amounts describe the entire original settlement allocation; repeated entries for that source are not additive.
Not returned with a checkout credential or a customer session
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/refunds \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"A page of refunds.
{
"data": [
{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"created_at": "2026-03-17T14:30:00Z",
"credit_adjustment_money": {
"amount": 0,
"currency": "USD"
},
"customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
"idempotency_key": null,
"initiated_by": "merchant",
"line_item_allocations": [
{
"automatic_refund": {
"discount_money": {
"amount": 0,
"currency": "USD"
},
"subtotal_money": {
"amount": 800,
"currency": "USD"
},
"tax_money": {
"amount": 75,
"currency": "USD"
},
"total_money": {
"amount": 875,
"currency": "USD"
}
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
"quantity": 1,
"refunded_money": {
"amount": 875,
"currency": "USD"
},
"tax_breakdown_refunds": [
{
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JQ7KAWR90GZM108",
"tax_money": {
"amount": 75,
"currency": "USD"
}
}
],
"tax_refund_mode": "automatic"
}
],
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"ticket_id": "tkt_123"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"payment_refunds": [
{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z"
}
],
"pending_reason": null,
"processed_by": "flint",
"reason": "requested_by_customer",
"refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
"refund_platform_fee": false,
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z",
"tax_breakdown_refunds": [
{
"order_charge_id": "och_01KEZF7C00YH9T408H27KFXV3Z",
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JWJYDF84K29PDCG",
"tax_money": {
"amount": 25,
"currency": "USD"
}
}
],
"updated_at": "2026-03-17T14:30:00Z",
"version": 1
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM694EG9SNYD9JYR0SQVVP6"
}Create refund#
/v1/refundsKey requiredRequires scope commerce.refunds.write
Also requires commerce.credit_notes.write. Required for refund_type credit_note.
Also requires commerce.refunds.tax_overrides.write when providing tax overrides.
Rate limit: external_provider_action
Creates a refund for an issued credit note on a paid invoice, an order, a payment intent, a captured gift card redemption, or a gift card load. Set refund_type to credit_note with credit_note_id to refund credit; omit amount_money to refund all available credit, resolved when Flint accepts the request. Credit-note refunds return card and bank payments collected through Flint, largest remaining first; gift card value is not refunded through credit notes yet. Set refund_type to full for the full remaining refundable amount, amount for an explicit amount_money, or targets for named line items, charges, and taxes. To refund a gift card redemption made outside a Flint order, set refund_type to amount and send one tender_allocations entry per redemption, with no order_id. A created refund is returned even when processing fails; inspect `status` and `failure_reason`. A same-key replay returns the original refund without another money attempt. For a subscription renewal, choosing reason out_of_stock also requests cancellation of any eligible unshipped shipment once the order is fully refunded. Flint releases its committed stock. Read the order to see its fulfillment status.
Request body
Send exactly one of these
The `credit_note` variant of `CreateRefundRequest`.
amount_moneyobjectRequired for refund_type amount and optional for credit_note; omit it on credit_note to refund all available credit, resolved once when Flint accepts the request. With processed_by merchant, the default is capped by the invoice's manually recorded money not already returned. Forbidden for full and targets. Total to refund, including named targets and any value Flint allocates to the remaining components. Tender allocations must sum to this amount.
amountintegerRequiredAmount in the currency's minor unit, such as cents for USD.
currencystringRequiredThree-letter uppercase ISO 4217 currency code for this amount, such as USD.
chargesarray of objectNamed order charges to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest.
amount_moneyobjectAmount to refund from this charge. Omit it to refund the charge's full remaining amount.
order_charge_idstringRequiredID of the order charge to refund.
credit_note_idstringRequiredIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
gift_card_load_idstringAllowed with refund_type full or amount. Original standalone gift card funding load paid by a Flint payment. Refunds its paid consideration and removes the corresponding eligible unspent face value. Requires Idempotency-Key; cannot be combined with order, line item, charge, tax or tender targets.
line_itemsarray of objectNamed order line items to refund. Allowed with refund_type amount or targets. In amount mode their resolved value must fit within amount_money; Flint allocates the rest.
adjustment_refundsarray of objectAmounts to refund back against adjustments withheld by earlier refunds of this line. Each uses the adjustment's remaining value, not the line's again.
amount_moneyobjectAmount to refund for this line before `refund_adjustments`. Send either `quantity` or `amount_money`. Omit both to refund the line's remaining value and quantity. Released subscription credit can leave refundable money even when the remaining quantity is zero.
order_line_item_idstringRequiredID of the order line item to refund.
quantityintegerWhole-number quantity; fractional quantities are not supported.
refund_adjustmentsarray of objectAmounts to withhold from this line's refund, such as a restocking fee. Together they must be less than the amount the line would otherwise refund.
tax_adjustment_auditobjectWho made the adjustment and where it came from, kept for your audit trail. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_adjustment_reasonobjectWhy you are refunding less tax than calculated. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_breakdown_refundsarray of objectTax to refund for each jurisdiction on the line. Required with `tax_refund_mode` `explicit` when the line has jurisdiction breakdowns.
tax_moneyobjectTax to refund for this line. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_refund_modeenumWhether Flint calculates the tax refunded (`automatic`, the default) or you set it with `tax_money` (`explicit`).
automaticexplicit
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
credit_note
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
tax_breakdown_refundsarray of objectNamed order tax breakdowns to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest. Requires commerce.refunds.tax_overrides.write.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) to refund.
tax_moneyobjectTax to refund for this breakdown. Used when you set the tax refund yourself.
tender_allocationsarray of one ofExhaustive allocations to original tenders. Allowed only with refund_type amount. Amounts must sum to the required amount_money. Selected line-item, charge and flat-tax components must be covered by their original tenders. Additional untargeted value follows the default tender order. Destinations default to original. Select new_gift_card when the original card is closed or cannot accept the full credit within its balance cap. For gift card redemptions made outside a Flint order, send the allocations without order_id.
Send exactly one of these
The `payment_intent` variant of `RefundTenderAllocationInput`.
amount_moneyobjectRequiredAmount to refund to this tender. Above zero. For a gift card redemption it is in USD.
destinationenumWhere this allocation is refunded. original returns value to the tender that paid; new_gift_card issues new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
payment_intent_idstringRequiredThe succeeded payment intent to refund. Required for tender_type payment_intent.
tender_typeenumRequiredWhich kind of original tender to refund.
payment_intent
The `full` variant of `CreateRefundRequest`.
credit_note_idstringIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
gift_card_load_idstringAllowed with refund_type full or amount. Original standalone gift card funding load paid by a Flint payment. Refunds its paid consideration and removes the corresponding eligible unspent face value. Requires Idempotency-Key; cannot be combined with order, line item, charge, tax or tender targets.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
full
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
The `amount` variant of `CreateRefundRequest`.
amount_moneyobjectRequiredRequired for refund_type amount and optional for credit_note; omit it on credit_note to refund all available credit, resolved once when Flint accepts the request. With processed_by merchant, the default is capped by the invoice's manually recorded money not already returned. Forbidden for full and targets. Total to refund, including named targets and any value Flint allocates to the remaining components. Tender allocations must sum to this amount.
amountintegerRequiredAmount in the currency's minor unit, such as cents for USD.
currencystringRequiredThree-letter uppercase ISO 4217 currency code for this amount, such as USD.
chargesarray of objectNamed order charges to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest.
amount_moneyobjectAmount to refund from this charge. Omit it to refund the charge's full remaining amount.
order_charge_idstringRequiredID of the order charge to refund.
credit_note_idstringIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
gift_card_load_idstringAllowed with refund_type full or amount. Original standalone gift card funding load paid by a Flint payment. Refunds its paid consideration and removes the corresponding eligible unspent face value. Requires Idempotency-Key; cannot be combined with order, line item, charge, tax or tender targets.
line_itemsarray of objectNamed order line items to refund. Allowed with refund_type amount or targets. In amount mode their resolved value must fit within amount_money; Flint allocates the rest.
adjustment_refundsarray of objectAmounts to refund back against adjustments withheld by earlier refunds of this line. Each uses the adjustment's remaining value, not the line's again.
amount_moneyobjectAmount to refund for this line before `refund_adjustments`. Send either `quantity` or `amount_money`. Omit both to refund the line's remaining value and quantity. Released subscription credit can leave refundable money even when the remaining quantity is zero.
order_line_item_idstringRequiredID of the order line item to refund.
quantityintegerWhole-number quantity; fractional quantities are not supported.
refund_adjustmentsarray of objectAmounts to withhold from this line's refund, such as a restocking fee. Together they must be less than the amount the line would otherwise refund.
tax_adjustment_auditobjectWho made the adjustment and where it came from, kept for your audit trail. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_adjustment_reasonobjectWhy you are refunding less tax than calculated. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_breakdown_refundsarray of objectTax to refund for each jurisdiction on the line. Required with `tax_refund_mode` `explicit` when the line has jurisdiction breakdowns.
tax_moneyobjectTax to refund for this line. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_refund_modeenumWhether Flint calculates the tax refunded (`automatic`, the default) or you set it with `tax_money` (`explicit`).
automaticexplicit
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
amount
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
tax_breakdown_refundsarray of objectNamed order tax breakdowns to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest. Requires commerce.refunds.tax_overrides.write.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) to refund.
tax_moneyobjectTax to refund for this breakdown. Used when you set the tax refund yourself.
tender_allocationsarray of one ofExhaustive allocations to original tenders. Allowed only with refund_type amount. Amounts must sum to the required amount_money. Selected line-item, charge and flat-tax components must be covered by their original tenders. Additional untargeted value follows the default tender order. Destinations default to original. Select new_gift_card when the original card is closed or cannot accept the full credit within its balance cap. For gift card redemptions made outside a Flint order, send the allocations without order_id.
Send exactly one of these
The `payment_intent` variant of `RefundTenderAllocationInput`.
amount_moneyobjectRequiredAmount to refund to this tender. Above zero. For a gift card redemption it is in USD.
destinationenumWhere this allocation is refunded. original returns value to the tender that paid; new_gift_card issues new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
payment_intent_idstringRequiredThe succeeded payment intent to refund. Required for tender_type payment_intent.
tender_typeenumRequiredWhich kind of original tender to refund.
payment_intent
The `targets` variant of `CreateRefundRequest`.
Send at least one of these
chargesarray of objectNamed order charges to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest.
amount_moneyobjectAmount to refund from this charge. Omit it to refund the charge's full remaining amount.
order_charge_idstringRequiredID of the order charge to refund.
credit_note_idstringIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
line_itemsarray of objectRequiredNamed order line items to refund. Allowed with refund_type amount or targets. In amount mode their resolved value must fit within amount_money; Flint allocates the rest.
adjustment_refundsarray of objectAmounts to refund back against adjustments withheld by earlier refunds of this line. Each uses the adjustment's remaining value, not the line's again.
amount_moneyobjectAmount to refund for this line before `refund_adjustments`. Send either `quantity` or `amount_money`. Omit both to refund the line's remaining value and quantity. Released subscription credit can leave refundable money even when the remaining quantity is zero.
order_line_item_idstringRequiredID of the order line item to refund.
quantityintegerWhole-number quantity; fractional quantities are not supported.
refund_adjustmentsarray of objectAmounts to withhold from this line's refund, such as a restocking fee. Together they must be less than the amount the line would otherwise refund.
tax_adjustment_auditobjectWho made the adjustment and where it came from, kept for your audit trail. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_adjustment_reasonobjectWhy you are refunding less tax than calculated. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_breakdown_refundsarray of objectTax to refund for each jurisdiction on the line. Required with `tax_refund_mode` `explicit` when the line has jurisdiction breakdowns.
tax_moneyobjectTax to refund for this line. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_refund_modeenumWhether Flint calculates the tax refunded (`automatic`, the default) or you set it with `tax_money` (`explicit`).
automaticexplicit
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
targets
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
tax_breakdown_refundsarray of objectNamed order tax breakdowns to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest. Requires commerce.refunds.tax_overrides.write.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) to refund.
tax_moneyobjectTax to refund for this breakdown. Used when you set the tax refund yourself.
chargesarray of objectRequiredNamed order charges to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest.
amount_moneyobjectAmount to refund from this charge. Omit it to refund the charge's full remaining amount.
order_charge_idstringRequiredID of the order charge to refund.
credit_note_idstringIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
line_itemsarray of objectNamed order line items to refund. Allowed with refund_type amount or targets. In amount mode their resolved value must fit within amount_money; Flint allocates the rest.
adjustment_refundsarray of objectAmounts to refund back against adjustments withheld by earlier refunds of this line. Each uses the adjustment's remaining value, not the line's again.
amount_moneyobjectAmount to refund for this line before `refund_adjustments`. Send either `quantity` or `amount_money`. Omit both to refund the line's remaining value and quantity. Released subscription credit can leave refundable money even when the remaining quantity is zero.
order_line_item_idstringRequiredID of the order line item to refund.
quantityintegerWhole-number quantity; fractional quantities are not supported.
refund_adjustmentsarray of objectAmounts to withhold from this line's refund, such as a restocking fee. Together they must be less than the amount the line would otherwise refund.
tax_adjustment_auditobjectWho made the adjustment and where it came from, kept for your audit trail. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_adjustment_reasonobjectWhy you are refunding less tax than calculated. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_breakdown_refundsarray of objectTax to refund for each jurisdiction on the line. Required with `tax_refund_mode` `explicit` when the line has jurisdiction breakdowns.
tax_moneyobjectTax to refund for this line. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_refund_modeenumWhether Flint calculates the tax refunded (`automatic`, the default) or you set it with `tax_money` (`explicit`).
automaticexplicit
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
targets
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
tax_breakdown_refundsarray of objectNamed order tax breakdowns to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest. Requires commerce.refunds.tax_overrides.write.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) to refund.
tax_moneyobjectTax to refund for this breakdown. Used when you set the tax refund yourself.
chargesarray of objectNamed order charges to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest.
amount_moneyobjectAmount to refund from this charge. Omit it to refund the charge's full remaining amount.
order_charge_idstringRequiredID of the order charge to refund.
credit_note_idstringIssued credit note on a paid invoice whose credit is returned to the buyer. Required only for refund_type credit_note.
destinationsobjectDefault destinations for allocations Flint plans. Allowed with full, amount without tender_allocations, and targets. Each key defaults to original, and a key for a tender absent from the refund has no effect. Not allowed with tender_allocations or gift_card_load_id; use destination on each explicit allocation. new_gift_card on a payment intent is store credit and requires a payment belonging to an order. Payments without an order return 400 INVALID_REQUEST with a NOT_ALLOWED detail at destinations.payment_intent. The merchant keeps the cash and the original processing fee is not returned; no processor refund is made. New gift card codes are returned for 24 hours. The refund reports each result in tender_allocations, without echoing destinations.
gift_card_redemptionenumWhere gift card redemption value is refunded. original credits the original gift card; new_gift_card issues new gift cards, including when the original is closed or cannot accept the full credit.
originalnew_gift_card
payment_intentenumDefault destination for every payment intent allocation Flint plans for this refund. original returns value to the payment; new_gift_card issues store credit on new Flint gift cards. Payment intent store credit requires a succeeded USD card, Apple Pay, Google Pay, or Link payment that belongs to an order, with no open chargeback. Affirm, ACH debit, other payment options, non-USD payments, and payments without an order return INVALID_REQUEST with a NOT_ALLOWED detail. Payment chargebacks use the existing dispute refusal. Gift card redemption destinations are unaffected by the payment restrictions.
originalnew_gift_card
expected_credit_note_versionintegerCredit note version last read. Optional; a stale version returns VERSION_CONFLICT with the current_version.
external_reference_idstringCaller-owned identifier for this resource in an external system.
line_itemsarray of objectNamed order line items to refund. Allowed with refund_type amount or targets. In amount mode their resolved value must fit within amount_money; Flint allocates the rest.
adjustment_refundsarray of objectAmounts to refund back against adjustments withheld by earlier refunds of this line. Each uses the adjustment's remaining value, not the line's again.
amount_moneyobjectAmount to refund for this line before `refund_adjustments`. Send either `quantity` or `amount_money`. Omit both to refund the line's remaining value and quantity. Released subscription credit can leave refundable money even when the remaining quantity is zero.
order_line_item_idstringRequiredID of the order line item to refund.
quantityintegerWhole-number quantity; fractional quantities are not supported.
refund_adjustmentsarray of objectAmounts to withhold from this line's refund, such as a restocking fee. Together they must be less than the amount the line would otherwise refund.
tax_adjustment_auditobjectWho made the adjustment and where it came from, kept for your audit trail. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_adjustment_reasonobjectWhy you are refunding less tax than calculated. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_breakdown_refundsarray of objectTax to refund for each jurisdiction on the line. Required with `tax_refund_mode` `explicit` when the line has jurisdiction breakdowns.
tax_moneyobjectTax to refund for this line. Required when `tax_refund_mode` is `explicit`, and not allowed otherwise.
tax_refund_modeenumWhether Flint calculates the tax refunded (`automatic`, the default) or you set it with `tax_money` (`explicit`).
automaticexplicit
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringOrder to refund. May be combined with payment_intent_id to select a payment on that order. Required for named targets unless payment_intent_id belongs to an order.
payment_intent_idstringPayment to refund. May be combined with its order_id. Named targets require a payment on an order.
processed_byenumWho moves the money for this refund. Allowed only for refund_type credit_note. Omit or use flint for Flint to return the money to the invoice's payments. Use merchant to record money you already returned outside Flint, for example by check or wire; Flint moves no money.
flintmerchant
reasonenumOptional. When omitted, no reason is recorded or sent to the processor, and the buyer's refund email has no reason line. On a subscription renewal, out_of_stock requests cancellation of eligible unshipped shipment fulfillments once the order is fully refunded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stock
reason_messagestringOptional note explaining the refund, up to 1,024 characters.
refund_platform_feebooleanReturn the partner app's platform fee to the merchant as part of this refund. By default the partner app keeps its fee. With true, each refunded payment that carries the partner app's collected platform fee returns all of the fee's unreturned amount when this refund returns the whole captured amount, and otherwise a proportional share, rounded half up; the refund that completes the payment returns what rounding left, when every earlier refund of it also returned the fee. Each payment refund reports its share in refunded_platform_fee_money, and Flint returns it to the merchant once that payment refund succeeds. Payments without a platform fee are refunded normally. Only the partner app install token whose app charged the fee can send true; from any other credential, or when a refunded payment carries another app's fee, it is INVALID_REQUEST with NOT_ALLOWED on refund_platform_fee. Not accepted with refund_type credit_note. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
refund_referencestringOptional check, wire, or other reference for the money you returned outside Flint. Opaque, 1 to 255 characters, and preserved exactly. Use external_reference_id for your own refund ID. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
refund_typeenumRequiredWhat to refund and how much: credit_note returns a credit note's available credit; full refunds the full remaining amount; amount requires amount_money and permits named targets and tender_allocations within that amount; targets refunds named line_items, charges, or tax_breakdown_refunds without amount_money. Full and targets do not accept tender_allocations. Gift card loads support full and amount only.
targets
refunded_atstringWhen you report returning the money outside Flint. Omit to use the current time. Must be an RFC 3339 timestamp at or before now; offsets are normalized to UTC and fractional seconds are truncated. Accepted only when `processed_by` is `merchant`; otherwise the request fails with `400 INVALID_REQUEST` (`NOT_ALLOWED`).
split_reversalsarray of objectExhaustive seller amounts to take back from the payments this refund covers. Omit for cumulative allocation; send [] to fund the whole refund yourself. Splits not named give back nothing. Each split must be eligible and belong to a refunded payment. Each positive amount uses the payment's currency and is at most its unreversed amount; otherwise LIMIT_EXCEEDED reports maximum_money. Entries for each payment total at most that payment's refund; otherwise INVALID_REQUEST reports maximum_money at split_reversals.
amount_moneyobjectRequiredPositive seller amount to take back, in the payment's currency.
payment_split_idstringRequiredAn eligible split on a payment this refund covers. Each split may appear once.
tax_breakdown_refundsarray of objectRequiredNamed order tax breakdowns to refund. Allowed with refund_type amount or targets. In amount mode their value must fit within amount_money; Flint allocates the rest. Requires commerce.refunds.tax_overrides.write.
tax_breakdown_idstringRequiredID of the tax breakdown (one jurisdiction's tax) to refund.
tax_moneyobjectTax to refund for this breakdown. Used when you set the tax refund yourself.
Response · 201
The created refund.
dataobjectRequiredResource, collection, or operation result returned by this request.
canceled_shipment_fulfillment_idsarray of stringCanceled shipment fulfillment IDs on a fully refunded subscription renewal with reason out_of_stock. Present when the caller can read the order and shipment cancellations have been recorded. Read the order for later changes.
gift_card_codesarray of objectNew gift card codes recovered only within 24 hours of the original command and only while each code remains current. Omitted after the recovery window and never returned by ordinary refund reads or events.
amount_moneyobjectRequiredTotal refunded across all tenders, including `refunded_tip_money`.
charge_allocationsarray of objectMoney returned for each order charge, including subtotal, discount, and tax, combined across payment refunds.
Not returned with a checkout credential or a customer session
created_atstringRequiredRFC3339 timestamp.
credit_adjustment_moneyobjectRequiredMoney paid for Return resolution credits, included in amount_money. It carries no merchandise, shipping, tax, or tip allocation. Zero for refunds without credits.
credit_note_idstringID of the credit note this refund paid out. Present only on refunds issued through a credit note.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
customer_idstringID of the customer on the refunded order or payment. Absent when neither has one.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential or a customer session
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
Not returned with a checkout credential or a customer session
initiated_byenumRequiredWho decided to make this refund: `merchant` for you or your integration, `flint` for a refund Flint made on its own to return a payment it couldn't accept. Unlike a Return's `initiated_by`, it doesn't say which credential asked. Read-only.
Not returned with a checkout credential or a customer session
merchantflint
invoice_idstringID of the invoice whose credit note this refund paid out. Present only on refunds issued through a credit note.
line_item_allocationsarray of objectHow the refund applied to each order line item it covered, with quantity, tax, and adjustments.
merchant_idstringRequiredID of the merchant this resource belongs to.
Not returned with a checkout credential or a customer session
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential or a customer session
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
order_edit_idstringID of the paid-order edit that created this refund. Present only on refunds issued through an order edit.
order_idstringID of the order the refund was issued against. For a refund with `reason` `payment_returned`, the order the returned payment was for; the order never received this money. Absent for a refund of a payment that has no order, and for a standalone gift card refund.
payment_intentobject or nullPresent only when `expand` includes `payment_intent`; `null` when expanded and there is no related payment intent.
payment_intent_idstringID of the payment the refund was issued against, when it targeted one payment. `payment_refunds` lists every payment it returned money through.
payment_refundsarray of objectThe part of the refund returned through each payment, with its own status. Absent when the refund was all gift card credit or store credit.
payment_review_idstringID of the payment review whose decline created this refund. Present only on refunds issued for a declined review.
pending_reasonenum or nullRequiredWhy a pending refund is waiting. `null` when `status` isn't `pending`, or when the refund is on its way without review.
manual_reviewnull
processed_byenumRequiredWho moved or is moving the money for this refund. Flint processes refunds through a processor or a gift card; merchant means the merchant returned the money outside Flint and recorded it here. Existing refunds are processed by Flint.
flintmerchant
reasonenum or nullRequiredWhy the refund was issued. It never changes how the money moves. The buyer's refund receipt shows it only for `requested_by_customer`, `duplicate`, `defective_product`, `wrong_item_shipped`, `never_received`, `not_as_described`, `arrived_too_late`, `accidental_order`, and `out_of_stock`. Only Flint sets `payment_returned`, and it can't be sent in requests. `null` when no reason was recorded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stockpayment_returnednull
reason_messagestringNote explaining the refund, up to 1,024 characters.
refund_idstringRequiredUnique identifier for this refund, prefixed `ref_`.
refund_platform_feebooleanRequiredWhether the request asked to return the platform fee on the payments this refund refunds (refund_platform_fee). Each payment refund's refunded_platform_fee_money is what it returns.
Not returned with a checkout credential or a customer session
refund_referencestringThe merchant's opaque check, wire, or other reference for money returned outside Flint, preserved exactly. Present only when processed_by is merchant and a reference was supplied. external_reference_id is the merchant's own refund ID.
refunded_atstringWhen the merchant reports that the money was returned outside Flint. Present only when processed_by is merchant.
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
return_idstringID of the return this refund paid out. Present only on refunds issued by a return.
return_resolution_idstringID of the return resolution that issued this refund. Present only on refunds issued by a return.
statusenumRequiredSummary of payment_refunds and tender_allocations. Only failed is final: succeeded and partially_succeeded can still change when a bank rejects a refund after accepting it. A refund Flint made to return a payment it couldn't accept goes from succeeded back to pending, with pending_reason manual_review, when a bank reverses it. Follow refund.created when it is accepted, refund.succeeded, refund.partially_succeeded, or refund.failed when its outcome changes, and refund.updated for other changes.
pendingsucceededpartially_succeededfailed
succeeded_atstringWhen `status` first became `succeeded`. For a refund with `payment_refunds` or `tender_allocations`, it's when the last of them first succeeded, so it equals the latest `succeeded_at` among them. For a refund Flint processes, it's when Flint recorded the outcome; with `processed_by` `merchant`, it equals `refunded_at`. Present only while `status` is `succeeded`; absent for every other status, including `partially_succeeded` and a refund that failed after it succeeded. A refund that succeeds again shows its first success time.
tax_breakdown_refundsarray of objectTax reversed on order-level charges and flat taxes, one entry per tax breakdown. Tax reversed on line items is in `line_item_allocations[].tax_breakdown_refunds`.
tender_allocationsarray of objectEvery tender the refund drew from, payment or gift card, with its amount, tip share, status, and destination.
unissued_gift_card_recoveriesarray of objectCash returned after an unissued gift card purchase refund failed. Return it through a new refund against payment_intent_id and order_line_item_id. It does not issue another card. Source remaining and pending amounts describe the entire original settlement allocation; repeated entries for that source are not additive.
Not returned with a checkout credential or a customer session
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/refunds \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"metadata": {
"ticket_id": "tkt_123"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"reason": "requested_by_customer",
"refund_type": "amount"
}'Get refund#
/v1/refunds/{refund_id}Requires scope commerce.refunds.read or commerce.refunds.write
Rate limit: read
Returns a single refund by ID.
Path parameters
refund_idstringRequiredFlint refund ID. Must be a valid ID with prefix ref_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expandarray of enumInclude related objects in the response. Supported expansions: customer, order, payment_intent, payment_refunds.payment_intent. Expansion requires commerce.refunds.read plus the read scope for each expanded resource. Limits: at most 10 unique expand paths per request. To-many expansions are capped at 20 related objects per path.
customerorderpayment_intentpayment_refunds.payment_intent
Response · 200
The requested refund.
dataobjectRequiredResource, collection, or operation result returned by this request.
amount_moneyobjectRequiredTotal refunded across all tenders, including `refunded_tip_money`.
charge_allocationsarray of objectMoney returned for each order charge, including subtotal, discount, and tax, combined across payment refunds.
Not returned with a checkout credential or a customer session
created_atstringRequiredRFC3339 timestamp.
credit_adjustment_moneyobjectRequiredMoney paid for Return resolution credits, included in amount_money. It carries no merchandise, shipping, tax, or tip allocation. Zero for refunds without credits.
credit_note_idstringID of the credit note this refund paid out. Present only on refunds issued through a credit note.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
customer_idstringID of the customer on the refunded order or payment. Absent when neither has one.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential or a customer session
failure_reasonenumWhy a refund failed or a payment refund was canceled. Failed and canceled amounts become refundable again, except a refund with reason payment_returned that failed with payment_disputed: the buyer won a dispute on the charge, so nothing is left to refund. A payment_returned refund that failed with refund_abandoned can't be retried through Flint either: the money is in your balance. Flint hasn't repaid the buyer. Repay them another way if you haven't already. Fix the cause, then create a new refund with a new idempotency key. Unknown provider values are returned as refund_failed.
expired_or_canceled_cardlost_or_stolen_cardinsufficient_fundsinsufficient_available_balancedeclinedmerchant_requestpayment_disputedrefund_abandonedpayment_refund_failedpayment_refund_not_attemptedrefund_failed
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource.
Not returned with a checkout credential or a customer session
initiated_byenumRequiredWho decided to make this refund: `merchant` for you or your integration, `flint` for a refund Flint made on its own to return a payment it couldn't accept. Unlike a Return's `initiated_by`, it doesn't say which credential asked. Read-only.
Not returned with a checkout credential or a customer session
merchantflint
invoice_idstringID of the invoice whose credit note this refund paid out. Present only on refunds issued through a credit note.
line_item_allocationsarray of objectHow the refund applied to each order line item it covered, with quantity, tax, and adjustments.
merchant_idstringRequiredID of the merchant this resource belongs to.
Not returned with a checkout credential or a customer session
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential or a customer session
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
order_edit_idstringID of the paid-order edit that created this refund. Present only on refunds issued through an order edit.
order_idstringID of the order the refund was issued against. For a refund with `reason` `payment_returned`, the order the returned payment was for; the order never received this money. Absent for a refund of a payment that has no order, and for a standalone gift card refund.
payment_intentobject or nullPresent only when `expand` includes `payment_intent`; `null` when expanded and there is no related payment intent.
payment_intent_idstringID of the payment the refund was issued against, when it targeted one payment. `payment_refunds` lists every payment it returned money through.
payment_refundsarray of objectThe part of the refund returned through each payment, with its own status. Absent when the refund was all gift card credit or store credit.
payment_review_idstringID of the payment review whose decline created this refund. Present only on refunds issued for a declined review.
pending_reasonenum or nullRequiredWhy a pending refund is waiting. `null` when `status` isn't `pending`, or when the refund is on its way without review.
manual_reviewnull
processed_byenumRequiredWho moved or is moving the money for this refund. Flint processes refunds through a processor or a gift card; merchant means the merchant returned the money outside Flint and recorded it here. Existing refunds are processed by Flint.
flintmerchant
reasonenum or nullRequiredWhy the refund was issued. It never changes how the money moves. The buyer's refund receipt shows it only for `requested_by_customer`, `duplicate`, `defective_product`, `wrong_item_shipped`, `never_received`, `not_as_described`, `arrived_too_late`, `accidental_order`, and `out_of_stock`. Only Flint sets `payment_returned`, and it can't be sent in requests. `null` when no reason was recorded.
duplicatefraudulentrequested_by_customerdefective_productwrong_item_shippednever_receivednot_as_describedarrived_too_latecustomer_changed_mindbetter_price_foundaccidental_orderotherout_of_stockpayment_returnednull
reason_messagestringNote explaining the refund, up to 1,024 characters.
refund_idstringRequiredUnique identifier for this refund, prefixed `ref_`.
refund_platform_feebooleanRequiredWhether the request asked to return the platform fee on the payments this refund refunds (refund_platform_fee). Each payment refund's refunded_platform_fee_money is what it returns.
Not returned with a checkout credential or a customer session
refund_referencestringThe merchant's opaque check, wire, or other reference for money returned outside Flint, preserved exactly. Present only when processed_by is merchant and a reference was supplied. external_reference_id is the merchant's own refund ID.
refunded_atstringWhen the merchant reports that the money was returned outside Flint. Present only when processed_by is merchant.
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
return_idstringID of the return this refund paid out. Present only on refunds issued by a return.
return_resolution_idstringID of the return resolution that issued this refund. Present only on refunds issued by a return.
statusenumRequiredSummary of payment_refunds and tender_allocations. Only failed is final: succeeded and partially_succeeded can still change when a bank rejects a refund after accepting it. A refund Flint made to return a payment it couldn't accept goes from succeeded back to pending, with pending_reason manual_review, when a bank reverses it. Follow refund.created when it is accepted, refund.succeeded, refund.partially_succeeded, or refund.failed when its outcome changes, and refund.updated for other changes.
pendingsucceededpartially_succeededfailed
succeeded_atstringWhen `status` first became `succeeded`. For a refund with `payment_refunds` or `tender_allocations`, it's when the last of them first succeeded, so it equals the latest `succeeded_at` among them. For a refund Flint processes, it's when Flint recorded the outcome; with `processed_by` `merchant`, it equals `refunded_at`. Present only while `status` is `succeeded`; absent for every other status, including `partially_succeeded` and a refund that failed after it succeeded. A refund that succeeds again shows its first success time.
tax_breakdown_refundsarray of objectTax reversed on order-level charges and flat taxes, one entry per tax breakdown. Tax reversed on line items is in `line_item_allocations[].tax_breakdown_refunds`.
tender_allocationsarray of objectEvery tender the refund drew from, payment or gift card, with its amount, tip share, status, and destination.
unissued_gift_card_recoveriesarray of objectCash returned after an unissued gift card purchase refund failed. Return it through a new refund against payment_intent_id and order_line_item_id. It does not issue another card. Source remaining and pending amounts describe the entire original settlement allocation; repeated entries for that source are not additive.
Not returned with a checkout credential or a customer session
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/refunds/ref_01KEZF7C003DTD59WKYHEXYQ1K \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The requested refund.
{
"data": {
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"created_at": "2026-03-17T14:30:00Z",
"credit_adjustment_money": {
"amount": 0,
"currency": "USD"
},
"customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
"idempotency_key": null,
"initiated_by": "merchant",
"line_item_allocations": [
{
"automatic_refund": {
"discount_money": {
"amount": 0,
"currency": "USD"
},
"subtotal_money": {
"amount": 800,
"currency": "USD"
},
"tax_money": {
"amount": 75,
"currency": "USD"
},
"total_money": {
"amount": 875,
"currency": "USD"
}
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
"quantity": 1,
"refunded_money": {
"amount": 875,
"currency": "USD"
},
"tax_breakdown_refunds": [
{
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JQ7KAWR90GZM108",
"tax_money": {
"amount": 75,
"currency": "USD"
}
}
],
"tax_refund_mode": "automatic"
}
],
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"ticket_id": "tkt_123"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"payment_refunds": [
{
"amount_money": {
"amount": 1000,
"currency": "USD"
},
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z"
}
],
"pending_reason": null,
"processed_by": "flint",
"reason": "requested_by_customer",
"refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
"refund_platform_fee": false,
"refunded_tip_money": {
"amount": 100,
"currency": "USD"
},
"status": "succeeded",
"succeeded_at": "2026-03-17T14:30:00Z",
"tax_breakdown_refunds": [
{
"order_charge_id": "och_01KEZF7C00YH9T408H27KFXV3Z",
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"tax_breakdown_id": "txb_01KEZF7C004JWJYDF84K29PDCG",
"tax_money": {
"amount": 25,
"currency": "USD"
}
}
],
"updated_at": "2026-03-17T14:30:00Z",
"version": 1
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM694EG9SNYD9JYR0SQVVP6"
}Update refund#
/v1/refunds/{refund_id}IdempotentRequires scope commerce.refunds.write
Rate limit: write
Updates refund metadata and external_reference_id.
Path parameters
refund_idstringRequiredFlint refund ID. Must be a valid ID with prefix ref_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional expected version of this resource. A stale value returns 409 VERSION_CONFLICT with the current version. Retrieve the resource and rebuild the request before retrying.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
metadatamap of string or nullCaller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
curl -X PATCH https://api.withflintpay.com/v1/refunds/ref_01KEZF7C003DTD59WKYHEXYQ1K \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"metadata": {
"reviewed_by": "ops"
}
}'Was this helpful?