Skip to content

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.

typeSendEffect
matchedreturn_line_item_idCounts toward received_quantity and satisfies after_receipt release timing
unverifiedunverified_item with a name, and optionally sku and descriptionCounts toward no line and releases no gate. Raises a merchandise_exception blocker until verified
excessreturn_line_item_idKnown 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_reasonenum

Why this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.

  • entry_error
  • duplicate_observation
  • source_correction
  • reconciliation_correction
  • other
correction_reason_messagestring

Detail about `correction_reason`.

created_atstringRequired

RFC3339 timestamp.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

external_reference_idstring

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

generated_dispositionsarray of objectRequired

Dispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.

line_itemsarray of objectRequired

The lines recorded.

received_atstringRequired

RFC3339 timestamp.

receiving_location_idstringRequired

ID of the Location that received the goods.

return_idstringRequired

ID of the Return the goods belong to.

return_receipt_idstringRequired

Unique identifier for this return receipt, prefixed `retrc_`.

shipment_idstring

ID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.

source_systemobject or nullRequired

System that recorded the observation. `null` when no source system was recorded.

statusenumRequired

Whether this is the current observation of these units or a correction replaced it.

  • current
  • superseded
superseded_atstring

RFC3339 timestamp.

superseded_by_return_receipt_idstring

ID of the receipt that corrected this one. Absent while it is current.

supersedes_return_receipt_idstring

ID of the receipt this one corrects.

updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "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#

GET/v1/return-receipts

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

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_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

external_reference_idstring

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

idempotency_keystring

Filter 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_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque 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.

querystring

Search by return receipt ID or external reference ID.

received_afterstring

Inclusive lower bound on received_at.

received_beforestring

Exclusive upper bound on received_at.

receiving_location_idstring

Filter by receiving location id.

return_idstring

Filter by return id.

return_line_item_idstring

Filter by return line item id.

shipment_idstring

Filter by shipment id.

source_system_typearray of enum

Filter 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.

  • manual
  • pos
  • wms
  • erp
  • other
  • flint
statusarray of enum

Filter 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.

  • current
  • superseded
updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

verification_statusarray of enum

Filter 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.

  • matched
  • unverified
  • excess

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/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_idstringRequired

Flint return receipt id.

Response · 200

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/return-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verifyIdempotent

Requires 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_idstringRequired

Flint return receipt id.

return_receipt_line_item_idstringRequired

Flint return receipt line item id.

Request body

expected_versioninteger

Optional version of the return receipt. A stale value returns VERSION_CONFLICT with the receipt ID and its current version.

return_line_item_idstringRequired

ID of the Return line the units were matched to. Absent for unverified units.

verification_reasonenumRequired

Why the units were verified against the line.

  • order_match_confirmed
  • sku_match_confirmed
  • inspection_confirmed
  • merchant_review
  • other
verification_reason_messagestring

Detail about `verification_reason`.

Response · 200

Successful response.

Same response as Get return receipt.

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#

POST/v1/returns/{return_id}/receiptsKey required

Requires 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_idstringRequired

Flint return id.

Request body

correction_reasonenum

Why this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.

  • entry_error
  • duplicate_observation
  • source_correction
  • reconciliation_correction
  • other
correction_reason_messagestring

Detail about `correction_reason`.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

external_reference_idstring

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

line_itemsarray of one ofRequired

The lines recorded.

received_atstringRequired

When the event occurred, at most 5 minutes in the future.

receiving_location_idstringRequired

ID of the Location that received the goods.

shipment_idstring

ID of the return shipment the goods arrived in. Absent when the receipt isn't tied to a shipment.

source_systemobject

System that recorded the observation. `null` when no source system was recorded.

supersedes_return_receipt_idstring

ID of the receipt this one corrects.

Response · 201

Successful response.

Same response as Get return receipt.

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?