Return resolutions

Return resolutions represent buyer-value outcomes. Previewing is side-effect free. Creating an ordinary proposed resolution reserves Return value capacity, and confirming it freezes the calculation and starts or gates downstream effects. The Return resolutions guide covers the flow end to end.

Effects remain normal Flint resources. Refund resolutions link Refunds, exchanges and replacements link Orders, and buyer balances link PaymentIntents. Read execution_blockers and linked effect statuses instead of treating a successful API response as proof that money moved or merchandise shipped.

Types#

TypeOutcome
refundMoney back on the original payment
exchangeDifferent merchandise, with any difference settled either way
replacementThe same merchandise again, with no money moving
no_monetary_actionGoods come back and no value is owed
correctionAdjusts a resolution that already settled

Store credit is reserved and not published until Flint has a reconciled credit ledger. A refund goes to the original payer and payment method, including on a gift return; where that is unacceptable, decline the monetary resolution.

Lifecycle#

proposed to pending to partially_fulfilled to fulfilled, with requires_action, failed, and canceled as the ways out. requires_action means something outside Flint has to happen, usually the buyer paying an exchange balance.

A confirmed resolution stays pending while execution_blockers names what it is waiting for.

BlockerCleared by
handoff_pendingThe buyer handing merchandise to a carrier
receipt_pendingThe warehouse recording arrival
inspection_pendingAn inspection and its acceptance decision
manual_release_pendingA call to /release
buyer_payment_pendingThe buyer paying a balance
refund_pendingThe refund settling
replacement_order_pendingThe replacement Order being created
fulfillment_pendingThe replacement shipping
credit_effect_pendingA linked credit effect completing

The first three follow from refund_timing on the decision (after_handoff, after_receipt, after_inspection), which is how you avoid paying out for goods that never arrive.

Adjustments#

Fees and credits are adjustments on the resolution rather than separate objects, so they stay in the same arithmetic as the refund: restocking_fee, return_shipping_fee, other_fee, goodwill_credit, price_correction, other. Each carries a value_effect of deduction or credit and rolls up into the Return's financial_summary as deduction_money or credit_money, never netted invisibly into refunded_money.

Corrections#

A correction is a new resolution with resolution_type=correction and corrects_return_resolution_id. Its target must be fulfilled and belong to the same reopened Return. Corrections contain applied credit or deduction adjustments but no Return line allocations, replacement lines, or pricing basis. They preserve the original resource graph and create a normal compensating Refund for positive net buyer credit when confirmed. Deductions may offset a credit to zero, but a correction that leaves the buyer owing money is rejected: a buyer pays through a checkout, and a correction has no order to check out. Reverse lookup uses the corrects_return_resolution_id list filter.

Writes#

PATCH /v1/return-resolutions/{return_resolution_id} owns both line_items and replacement_line_items. When either array is present, it replaces that collection atomically and requires the parent resolution's expected_version. Retain a child by sending its stable child ID, omit it to remove it, or omit the child ID to add a member. A replacement line takes exactly one of variant_id, bundle_id, or name. The /release action is available only while action_reason is manual_release.

The Return resolution object#

Every field on a return resolution, as returned by retrieve and carried by the endpoints below.

Attributes

action_reasonenum
  • buyer_payment
  • buyer_selection
  • merchant_review
  • manual_release
  • linked_effect_retry
  • other
action_required_byenum
  • buyer
  • merchant
  • integration
adjustmentsarray of objectRequired
buyer_payment_amount_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

buyer_refund_amount_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

canceled_atstring

RFC3339 timestamp.

confirmed_atstring

RFC3339 timestamp.

confirmed_byobject
corrects_return_resolution_idstring
created_atstringRequired

RFC3339 timestamp.

created_byobjectRequired
credit_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

deduction_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

execution_blockersarray of objectRequired
external_reference_idstring

Caller-owned identifier for this resource in an external system.

failure_codestring

Reason code for a failed Return resolution, when available.

failure_messagestring

Explanation of a failed Return resolution, when available.

fulfilled_atstring

RFC3339 timestamp.

line_itemsarray of objectRequired
metadatamap of stringRequired
payment_intent_idsarray of stringRequired
payment_intentsarray of object
pricing_basisenum
  • original_price
  • current_price
  • merchant_agreed_price
refund_idsarray of stringRequired
refundsarray of object
replacement_line_itemsarray of objectRequired
replacement_orderobject or null
replacement_order_idstring
replacement_total_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

resolution_typeenumRequired
  • refund
  • exchange
  • replacement
  • no_monetary_action
  • correction
return_idstringRequired
return_policy_revision_idstring
return_resolution_idstringRequired
returned_total_moneyobjectRequired

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

statusenumRequired
  • proposed
  • pending
  • requires_action
  • partially_fulfilled
  • fulfilled
  • failed
  • canceled
supported_actionsarray of stringRequired
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired
JSON
{
  "payment_intent_ids": [
    "pi_01K1PAYMENT00000000000000"
  ],
  "refund_ids": [
    "ref_01K1REFUND00000000000000"
  ],
  "replacement_order_id": "ord_01K1REPLACEMENT000000000",
  "return_id": "ret_01K1RETURN000000000000000",
  "return_resolution_id": "retres_01K1RESOLUTION000000000"
}

List return resolutions#

GET/v1/return-resolutions

Requires scope commerce.return_policies.write or commerce.return_reasons.write or commerce.returns.operations.write or commerce.returns.read or commerce.returns.resolutions.write or commerce.returns.write

List resolutions. Filter by corrects_return_resolution_id to retrieve the correction history for a resolution that already settled.

Query parameters

action_required_byenum

Filter by action required by.

  • buyer
  • merchant
  • integration
corrects_return_resolution_idstring

Filter by corrects return resolution id.

created_afterstring

RFC3339 created after filter.

created_beforestring

RFC3339 created before filter.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

page_sizeinteger

Page size. Defaults to 20 and is capped at 100.

page_tokenstring

Opaque cursor returned by the previous page.

querystring

Search by return resolution ID or external reference ID.

resolution_typearray of enum

Filter by resolution type.

  • refund
  • exchange
  • replacement
  • no_monetary_action
  • correction
return_idstring

Filter by return id.

return_line_item_idstring

Filter by return line item id.

return_policy_revision_idstring

Filter by return policy revision id.

statusarray of enum

Filter by status.

  • proposed
  • pending
  • requires_action
  • partially_fulfilled
  • fulfilled
  • failed
  • canceled
updated_afterstring

RFC3339 updated after filter.

updated_beforestring

RFC3339 updated before filter.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/return-resolutions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Get return resolution#

GET/v1/return-resolutions/{return_resolution_id}

Requires scope commerce.return_policies.write or commerce.return_reasons.write or commerce.returns.operations.write or commerce.returns.read or commerce.returns.resolutions.write or commerce.returns.write

Retrieve one resolution with its amounts, adjustments, execution blockers, and linked refunds, payments, and replacement order. Supports expand for those links.

Path parameters

return_resolution_idstringRequired

Flint return resolution id.

Query parameters

expandarray of enum

Supported expansions: payment_intents, refunds, replacement_order. Expanded relationships are returned only when explicitly requested and authorized. Limits: at most 10 unique expand paths per request; path depth at most 2. To-many expansions are capped at 20 related objects per path. Repeat expand, for example expand=payment_intents&expand=refunds, or pass one comma-separated value.

  • payment_intents
  • refunds
  • replacement_order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "payment_intent_ids": [
      "pi_01K1PAYMENT00000000000000"
    ],
    "refund_ids": [
      "ref_01K1REFUND00000000000000"
    ],
    "replacement_order_id": "ord_01K1REPLACEMENT000000000",
    "return_id": "ret_01K1RETURN000000000000000",
    "return_resolution_id": "retres_01K1RESOLUTION000000000"
  },
  "request_id": "req_123"
}

Update return resolution#

PATCH/v1/return-resolutions/{return_resolution_id}Idempotent

Requires scope commerce.returns.resolutions.write

Update a proposed resolution before confirmation. A present line_items or replacement_line_items array replaces that collection and requires expected_version.

Path parameters

return_resolution_idstringRequired

Flint return resolution id.

Request body

adjustment_setobject
expected_versioninteger
external_reference_idstring or null

Caller-owned identifier for this resource in an external system.

line_itemsarray of object
metadatamap of string or null

Caller-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 metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

pricing_basisenum
  • original_price
  • current_price
  • merchant_agreed_price
replacement_line_itemsarray of one of

Response · 200

Same response as Get return resolution.

curl -X PATCH https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "adjustment_set": {
      "adjustments": [
        {
          "adjustment_type": {},
          "applied_amount_money": {},
          "assessed_amount_money": {},
          "reason": {},
          "value_effect": {}
        }
      ]
    },
    "expected_version": 0,
    "external_reference_id": "",
    "line_items": [
      {
        "quantity": 0,
        "return_line_item_id": ""
      }
    ],
    "metadata": {},
    "pricing_basis": "original_price",
    "replacement_line_items": [
      {
        "quantity": 0
      }
    ]
  }'

Cancel return resolution#

POST/v1/return-resolutions/{return_resolution_id}/cancelIdempotent

Requires scope commerce.returns.resolutions.write

Cancel a resolution and release the line value it reserved. Effects that already succeeded are undone with a compensating correction instead.

Path parameters

return_resolution_idstringRequired

Flint return resolution id.

Request body

expected_versioninteger
reasonenumRequired
  • buyer_request
  • merchant_request
  • duplicate
  • expired
  • created_in_error
  • other
reason_messagestring

Response · 200

Same response as Get return resolution.

curl -X POST https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id}/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "buyer_request"
  }'

Get or create return resolution checkout session#

POST/v1/return-resolutions/{return_resolution_id}/checkout-sessionIdempotent

Requires scope commerce.returns.resolutions.write

Create or reuse a hosted or embedded checkout session for the buyer's balance on a replacement order linked to this return resolution. Omit surface to use hosted. The same surface reuses the open session; changing surface replaces an idle session and returns CHECKOUT_SURFACE_CHANGE_NOT_ALLOWED while a payment is in progress. Use redirects to set where the buyer goes after paying or canceling. The return_url field is an alias for redirects.success_redirect_url and must be an address of the merchant's customer account. A reused session takes a new success destination only until a payment starts, then keeps its existing destination.

Path parameters

return_resolution_idstringRequired

Flint return resolution id.

Request body

page_originstring

Origin of the page where you render this embedded checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is embedded. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.

redirectsobject

Buyer destinations. Embedded checkout requires success_redirect_url when a redirect payment option is offered. Keep return_url and redirects.success_redirect_url consistent when sending both.

return_urlstring

Where the checkout sends the buyer after paying, such as the Return's page in the customer account. It must be an HTTPS address of the merchant's customer account: /{merchant_id} on Flint's account host, the merchant's active custom account domain, or the host of customer_account.merchant_account_url when the merchant hosts the account. HTTP is accepted only for localhost in test mode. Anything else fails with INVALID_RETURN_URL.

surfaceenum

Defaults to hosted. The same surface reuses the open checkout. A different surface replaces it only while no payment is in progress; otherwise the request returns CHECKOUT_SURFACE_CHANGE_NOT_ALLOWED.

  • hosted
  • embedded

Response · 201

dataobjectRequired

The checkout session and the credential to operate it. For hosted checkout, send the buyer to checkout_session.url. For embedded checkout, pass checkout_access.checkout_auth_token to your checkout client.

metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id}/checkout-session \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "page_origin": "",
    "redirects": {
      "cancel_redirect_url": "",
      "success_redirect_url": ""
    },
    "return_url": "",
    "surface": "hosted"
  }'
curl -X POST https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id}/confirm \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 0
  }'
curl -X POST https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id}/release \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "merchant_approved"
  }'

Retry return resolution#

POST/v1/return-resolutions/{return_resolution_id}/retryIdempotent

Requires scope commerce.returns.resolutions.write

Retry a failed resolution. A new attempt starts, historical payment and refund IDs stay on the resolution, and a late event from an earlier attempt cannot settle the new attempt.

Path parameters

return_resolution_idstringRequired

Flint return resolution id.

Request body

expected_versioninteger
reasonenumRequired
  • dependency_recovered
  • payment_method_updated
  • operator_retry
  • other
reason_messagestring

Response · 200

Same response as Get return resolution.

curl -X POST https://api.withflintpay.com/v1/return-resolutions/{return_resolution_id}/retry \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "dependency_recovered"
  }'

Create return resolution#

POST/v1/returns/{return_id}/resolutionsIdempotent

Requires scope commerce.returns.resolutions.write

Propose a buyer-value outcome for approved quantity. Creating a resolution reserves line value. Confirmation is what freezes it and starts its effects.

Path parameters

return_idstringRequired

Flint return id.

Request body

Send exactly one of these

adjustmentsarray of object
expected_versioninteger
external_reference_idstring

Caller-owned identifier for this resource in an external system.

line_itemsarray of objectRequired
metadatamap of string
pricing_basisenum
  • original_price
  • current_price
  • merchant_agreed_price
replacement_line_itemsarray of one of
resolution_typeenumRequired
  • refund
  • exchange
  • replacement
  • no_monetary_action

Response · 201

Same response as Get return resolution.

curl -X POST https://api.withflintpay.com/v1/returns/ret_01K0P7W6A4N9F3J2T8Q5R1C6XM/resolutions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "resolution_type": "refund"
  }'

Was this helpful?