Return receipts
A return receipt states what reached a Flint Location. It records a physical fact and grants no refund or resolution authority.
Create a receipt with POST /v1/returns/{return_id}/receipts. Read receipts with GET /v1/return-receipts?return_id= and GET /v1/return-receipts/{return_receipt_id}, or expand return_receipts on GET /v1/returns/{return_id}. Receipts are written under their Return and read from their own top-level list.
These routes use the commerce.returns.operations.write scope, shared with inspections and dispositions. That separation lets a warehouse or WMS integration record custody without permission to move buyer funds. POST /v1/returns/{return_id}/process combines this work with decisions and resolutions, so it requires all three scopes: commerce.returns.write, commerce.returns.operations.write, and commerce.returns.resolutions.write. The Receiving and inspecting guide walks one parcel through receipt, inspection, and disposition.
Corrections#
A receipt is an immutable observation. To correct one, create a replacement carrying supersedes_return_receipt_id and a correction_reason. The original stays readable with an observation status of superseded. A receipt cannot be corrected after an inspection or disposition consumes it.
Automatic receipt disposition consumes matched merchandise immediately. Use a policy revision with receipt_disposition_mode: manual when your workflow needs a receipt-correction window.
Receipt line shapes#
Each receipt line requires a type, which decides its fields and what its quantity is allowed to do next.
type | Send | Effect |
|---|---|---|
matched | return_line_item_id | Counts toward received_quantity and satisfies after_receipt release timing |
unverified | unverified_item with a name, and optionally sku and description | Counts toward no line and releases no gate. Raises a merchandise_exception blocker until verified |
excess | return_line_item_id | Known extra merchandise beyond the line's approved handback quantity. Counts as excess |
A missing type returns 400 INVALID_REQUEST with param naming it, and a field from another type returns a NOT_ALLOWED detail. Requests don't accept verification_status; it stays on receipt line responses.
Verify an unidentified line with POST /v1/return-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verify once an operator establishes the identity. Unverified quantity can only take a non-inventory outcome such as discard, donate, or return_to_buyer, because Flint doesn't know which inventory item to increase. Excess quantity belongs to a known Return line, so it can take any disposition type.
release_timing gates every resolution type, including exchanges and replacements. See Return resolutions for how receipts release it.
The Return receipt object#
A record of returned items arriving at a location.
Returned by GET /v1/return-receipts/{return_receipt_id} and carried by the endpoints below.
Attributes
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
canceled_atstringRFC3339 timestamp.
canceled_byobjectWho canceled the disposition. Merchant reads only.
cancellation_reasonenumWhy the disposition was canceled.
created_in_errorchanged_dispositionduplicateother
cancellation_reason_messagestringDetail sent with the cancellation. Merchant reads only.
created_atstringRequiredRFC3339 timestamp.
created_byobjectRequiredWho created the disposition.
disposition_typeenumRequiredWhat happens to the received units.
sellablequality_controldamagedquarantinedrepairrefurbishliquidatedonatediscardreturn_to_buyerlost
external_reference_idstringCaller-owned identifier for this resource in an external system.
failure_codeenumReason code for a failed merchandise disposition, when available.
inventory_effect_failedinventory_item_unmapped
failure_messagestringExplanation of a failed merchandise disposition, when available.
inventory_location_idstringID of the Location whose stock the disposition changes. Required for `sellable`, `quality_control`, `damaged`, `quarantined`, and `lost`; rejected for the other types.
inventory_movement_idsarray of stringRequiredIDs of the inventory movements the disposition wrote. Empty when it moved no stock.
inventory_receipt_idstringID of the inventory receipt the disposition recorded. Absent when it recorded none.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
occurred_atstringRequiredRFC3339 timestamp.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
reasonenumRequiredWhy the disposition was made.
inspection_resultreturn_policywarehouse_overridesafety_requirementother
reason_messagestringOptional detail about `reason`, kept with the record.
replaced_by_return_disposition_idstringID of the disposition that took over this one. Present when a replacement canceled it.
replaces_return_disposition_idstringID of the `failed` or `canceled` disposition this one replaces. It takes over that disposition's unused capacity.
return_disposition_idstringRequiredUnique identifier for this return disposition, prefixed `retdsp_`.
return_idstringRequiredreturn_inspection_line_item_idstringID of the inspection line the disposition covers. Absent when it covers a receipt line.
return_line_item_idstringID of the Return line the units belong to.
return_receipt_line_item_idstringID of the receipt line the disposition covers. Absent when it covers an inspection line.
statusenumRequiredWhether inventory has applied the disposition.
pendingsucceededfailedcanceled
supported_actionsarray of enumRequiredActions that can succeed now. Empty unless the parent Return is open. cancel is listed only before the inventory effect starts.
cancelretry
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
line_itemsarray of objectRequiredThe lines recorded.
available_disposition_quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
return_line_item_idstringID of the Return line the units were matched to. Absent for unverified units.
return_receipt_idstringRequiredID of the receipt the line belongs to.
return_receipt_line_item_idstringRequiredUnique identifier for this return receipt line item, prefixed `retrcli_`.
supported_actionsarray of enumRequiredverify
unverified_itemobjectWhat the operator recorded for units that match no line. Present on `unverified` lines.
verification_reasonenumWhy the units were verified against the line.
order_match_confirmedsku_match_confirmedinspection_confirmedmerchant_reviewother
verification_reason_messagestringDetail about `verification_reason`.
verification_statusenumRequiredWhether the units are matched to a line.
matchedunverifiedexcess
verified_atstringRFC3339 timestamp.
verified_byobjectWho verified the line.
received_atstringRequiredRFC3339 timestamp.
receiving_location_idstringRequiredID of the Location that received the goods.
return_idstringRequiredID of the Return the goods belong to.
return_receipt_idstringRequiredUnique identifier for this return receipt, prefixed `retrc_`.
shipment_idstringID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
external_source_idstringYour source system's identifier. Required when source_system_type is pos, wms, erp, or other; not allowed when source_system_type is manual. Don't put secrets in this field.
source_system_typeenumRequiredSource of the event: manual for a manual entry, pos for a point of sale, wms for a warehouse management system, erp for an enterprise resource planning system, or other for another external system. Flint-authored events use flint in responses.
manualposwmserpotherflint
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_receipt_idstringID of the receipt that corrected this one. Absent while it is current.
supersedes_return_receipt_idstringID of the receipt this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
{
"created_at": "2026-09-08T14:00:00Z",
"generated_dispositions": [],
"line_items": [
{
"available_disposition_quantity": 1,
"quantity": 1,
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": [],
"verification_status": "matched"
}
],
"received_at": "2026-09-08T14:00:00Z",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:00:00Z",
"version": 1
}List return receipts#
/v1/return-receiptsRequires scope commerce.returns.operations.write or commerce.returns.policies.write or commerce.returns.read or commerce.returns.reasons.write or commerce.returns.resolutions.write or commerce.returns.write
Rate limit: read
List merchandise receipts. Omitting return_id lists receipts across every Return for the merchant. Default order: created_at descending, then return_receipt_id descending.
Query parameters
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
external_reference_idstringExact-match filter on the caller-owned external reference ID.
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. 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.
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque next_page_token from the previous response. 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 invalid, expired, or mismatched token returns a validation error.
querystringSearch by return receipt ID or external reference ID.
received_afterstringInclusive lower bound on received_at.
received_beforestringExclusive upper bound on received_at.
receiving_location_idstringFilter by receiving location id.
return_idstringFilter by return id.
return_line_item_idstringFilter by return line item id.
shipment_idstringFilter by shipment id.
source_system_typearray of enumFilter by source system type. 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.
manualposwmserpotherflint
statusarray of enumFilter by 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.
currentsuperseded
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
verification_statusarray of enumFilter by verification 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.
matchedunverifiedexcess
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
line_itemsarray of objectRequiredThe lines recorded.
received_atstringRequiredRFC3339 timestamp.
receiving_location_idstringRequiredID of the Location that received the goods.
return_idstringRequiredID of the Return the goods belong to.
return_receipt_idstringRequiredUnique identifier for this return receipt, prefixed `retrc_`.
shipment_idstringID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_receipt_idstringID of the receipt that corrected this one. Absent while it is current.
supersedes_return_receipt_idstringID of the receipt this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
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/return-receipts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-09-08T14:00:00Z",
"generated_dispositions": [],
"line_items": [
{
"available_disposition_quantity": 1,
"quantity": 1,
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": [],
"verification_status": "matched"
}
],
"received_at": "2026-09-08T14:00:00Z",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:00:00Z",
"version": 1
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Get return receipt#
/v1/return-receipts/{return_receipt_id}Requires scope commerce.returns.operations.write or commerce.returns.policies.write or commerce.returns.read or commerce.returns.reasons.write or commerce.returns.resolutions.write or commerce.returns.write
Rate limit: read
Retrieve one merchandise receipt with its line items and its current or superseded observation status.
Path parameters
return_receipt_idstringRequiredFlint return receipt id.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
line_itemsarray of objectRequiredThe lines recorded.
received_atstringRequiredRFC3339 timestamp.
receiving_location_idstringRequiredID of the Location that received the goods.
return_idstringRequiredID of the Return the goods belong to.
return_receipt_idstringRequiredUnique identifier for this return receipt, prefixed `retrc_`.
shipment_idstringID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_receipt_idstringID of the receipt that corrected this one. Absent while it is current.
supersedes_return_receipt_idstringID of the receipt this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
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/return-receipts/retrc_01KEZF7C0052GWDW41D9AJAVJZ \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-09-08T14:00:00Z",
"generated_dispositions": [],
"line_items": [
{
"available_disposition_quantity": 1,
"quantity": 1,
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": [],
"verification_status": "matched"
}
],
"received_at": "2026-09-08T14:00:00Z",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:00:00Z",
"version": 1
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Verify return receipt line item#
/v1/return-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verifyIdempotentRequires scope commerce.returns.operations.write
Rate limit: write
Establish the Return line identity for receipt quantity that arrived without one. expected_version compares against the receipt version. Unverified quantity counts toward no line and releases no release timing gate until it is verified.
Path parameters
return_receipt_idstringRequiredFlint return receipt id.
return_receipt_line_item_idstringRequiredFlint return receipt line item id.
Request body
expected_versionintegerOptional version of the return receipt. A stale value returns VERSION_CONFLICT with the receipt ID and its current version.
return_line_item_idstringRequiredID of the Return line the units were matched to. Absent for unverified units.
verification_reasonenumRequiredWhy the units were verified against the line.
order_match_confirmedsku_match_confirmedinspection_confirmedmerchant_reviewother
verification_reason_messagestringDetail about `verification_reason`.
curl -X POST https://api.withflintpay.com/v1/return-receipts/retrc_01KEZF7C0052GWDW41D9AJAVJZ/line-items/retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE/verify \
-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": 1,
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"verification_reason": "sku_match_confirmed"
}'Create return receipt#
/v1/returns/{return_id}/receiptsKey requiredRequires scope commerce.returns.operations.write
Rate limit: write
Record an immutable merchandise receipt observation. Corrections supersede an earlier receipt instead of editing physical history. Read receipts with `GET /v1/return-receipts?return_id=` or expand `return_receipts` on `GET /v1/returns/{return_id}`.
Path parameters
return_idstringRequiredFlint return id.
Request body
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
line_itemsarray of one ofRequiredThe lines recorded.
Send exactly one of these
The `matched` variant of `ReturnReceiptLineItemInput`.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
return_line_item_idstringRequiredThe expected Return line. Required for matched and excess merchandise.
typeenumRequiredWhether this observation matches a Return line, is unverified merchandise, or is known excess merchandise.
matched
received_atstringRequiredWhen the event occurred, at most 5 minutes in the future.
receiving_location_idstringRequiredID of the Location that received the goods.
shipment_idstringID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.
source_systemobjectSystem that recorded the observation. `null` when no source system was recorded.
external_source_idstringYour source system's identifier. Required when source_system_type is pos, wms, erp, or other; not allowed when source_system_type is manual. Don't put secrets in this field.
source_system_typeenumRequiredSource of the event: manual for a manual entry, pos for a point of sale, wms for a warehouse management system, erp for an enterprise resource planning system, or other for another external system. Flint-authored events use flint in responses.
manualposwmserpother
supersedes_return_receipt_idstringID of the receipt this one corrects.
curl -X POST https://api.withflintpay.com/v1/returns/ret_01KEZF7C00PG93650ZKVQNGF7X/receipts \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"line_items": [
{
"quantity": 1,
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"type": "matched"
}
],
"received_at": "2026-09-08T14:00:00Z",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"source_system": {
"source_system_type": "manual"
}
}'Was this helpful?
