> ## Documentation Index
> Fetch the complete documentation index at: https://808-labs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkout, orders and refunds

> One shopper purchase can produce several merchant orders.

Purchase lifecycle
Approve one quote, submit once and track every store. Successful orders stay; confirmed failures are refunded.

## Quote before submitting

Create a cart and add authorized variant IDs. Set delivery data with `PUT /v1/carts/{cart_id}/address`, [apply merchant coupons](https://808-labs.mintlify.site/discounts.md) when supported and request `POST /v1/carts/{cart_id}/quotes`.

Review the returned quote, totals, shipping, taxes, coupon outcomes, expiry and unavailable lines with the shopper. Never silently accept a changed total or substitute a new quote. Amounts use integer minor units with an explicit currency.

## Submit once

Persist the approved quote ID, total, request body and a stable `Idempotency-Key` **before** calling `POST /v1/carts/{cart_id}/submit`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "quote_id": "replace-with-returned-quote-id",
  "approved_total_minor": 10000,
  "partial_order_policy": "allow_partial"
}
```

The amount above is illustrative: submit the actual approved quote total. Ignyt's product policy is partial fulfillment: preserve successful merchant orders and refund the confirmed failed portion. Use `allow_partial`; do not build a whole-order-cancellation selector from this guide.

A `202` response means the request was accepted, not that payment or every merchant order succeeded. Read the cart's purchase resource and follow the payment handoff. Your application owns the shopper checkout UI; card entry belongs in the payment provider's approved hosted components.

For a hosted payment, `GET /v1/carts/{cart_id}/purchase` may return
`payment.payment_action` with `type: "redirect"` and an HTTPS checkout `url`. Open it for the
shopper, then read the same purchase after they return. New Mamo payments use their returned
hosted handoff. Preserve an embedded `client_secret` flow only when servicing an original historical
payment that supplied it; never convert that payment into a second provider charge. Confirm payment
and each store order through Ignyt's status API. Browser return parameters cannot confirm a payment.

## Uncertain outcomes

A timeout, lost response or 5xx after a write does not prove failure. Reconcile the original cart/purchase/operation; do not create a replacement order or payment. If the API supports an exact idempotent retry, retain the original key and body. See [errors and retries](https://808-labs.mintlify.site/errors-and-retries.md).

## Track child orders and refunds

Use purchase and merchant-order reads plus [signed webhooks](https://808-labs.mintlify.site/webhooks.md). Show each store's status separately, including pending lookup and refund progress. A refund request or an accepted order is not a completed refund or delivery.

`POST /v1/merchant-orders/{child_order_id}/refunds` requires appropriate order-write authority and supports an optional positive `amount_minor`, reason and external reference. Consult the exact contract and current refundable balance; do not infer a completed merchant refund from an email. This existing financial command is distinct from submitting a request for Support review.

A merchant transfer, bank payout and shopper refund are distinct operations. Refund-after-transfer recovery does not authorize your integration to create a bank payout or charge the shopper again.

## Reviewed refund requests from your application

Your tenant server can call `POST /v1/refund-requests` using a server API key with `orders:write`. Never expose this key to a browser. Supply a stable `Idempotency-Key` (1–80 letters/digits/underscore/hyphen), the returned `child_order_id`, a positive integer `amount_minor`, a reason (10–500 characters) and optional unique purchased variant quantities:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "child_order_id": "replace-with-returned-child-order-id",
  "amount_minor": 1000,
  "reason": "Customer reported damaged packaging",
  "items": [{"variant_id": "replace-with-purchased-variant-id", "qty": 1}]
}
```

IDs and amounts above are illustrative. Tenant/app/environment ownership, captured refundable remainder, other request reservations, purchased quantities and selected-item value are checked. Currency comes from the original order. Itemless requests may cover permitted order-level adjustments. A request does not itself execute a refund or create an inventory return.

Read list/detail/history with `orders:read` using `GET /v1/refund-requests`, `GET /v1/refund-requests/{request_id}` and its `/events` resource. Pages default to 25, maximum 100; continue with `next_cursor`. The server-key routes do not accept customer JWTs, cart-session tokens or agent delegations. Existing-order servicing remains available after monthly API allowance exhaustion; revoked keys still lose authority.

The same creation key and body returns the same request ID. Changed details with the same key conflict (`409`); invalid amount/quantities return `422`, wrong-scope resources return `404`, and insufficient scope returns `403`. After a lost response, repeat the exact command or read the same request; do not generate a new key to retry an uncertain write.

## Dashboard review and tenant replies

The existing portal app `/refund-requests` resources remain available. Members can follow status and paginated history. Owners, admins and developers require recent sign-in verification to submit/reply; Viewer is read-only. Tenants cannot approve or execute these reviewed requests.

Ignyt Support may approve, reject or request information. When `status` is `needs_information`, reply using `POST /v1/refund-requests/{request_id}/reply` from your server, or the portal app's matching `/reply` route. Supply the current `expected_revision` and a `note` (10–500 characters). The same request returns to `submitted`; its ID, original items/amount and earlier decisions/history are preserved. Reservations remain held while information is requested. An exact retry of the same committed actor/revision/note appends no duplicate reply; a changed stale reply conflicts. Refetch on `409`.

Finance executes only the approved frozen amount against that request. Request approval is not a completed refund. Pending/unknown outcomes retain their original Money identity and require reconciliation; do not submit another refund. A definitively blocked reservation with no Money intent goes back to Support. Refunds after a merchant transfer continue through existing recovery rules.

## Separate lifecycle and message states

Legacy `status` remains available. The additive `request_status` describes review, `execution_status` describes provider execution (`not_started` before execution), and `bank_credit_status` remains `not_confirmed`. PSP success does not prove that a bank has posted the customer credit.

Follow `order.refund_request.updated` for request/reply/review/execution progress and `money.refund.updated` for financial-provider progress. The `order.refund_request.updated` webhook `data` payload includes source revision, frozen
items/amount/currency and refund identity when known. This differs from the paginated `/events`
history entries, which contain actor, note, status, revision and creation time.

The public OpenAPI `webhooks["order.refund_request.updated"]` declaration references
`RefundRequestUpdatedEvent`, its `RefundRequestUpdatedData` payload and item schema. This is an
outbound callback to your receiver, not an Ignyt HTTP endpoint. The same complete envelope schema
is available as the event's `body_schema` in `GET /v1/webhook-event-types`; validate against it after
verifying the raw-body signature. `refund_id` is explicitly nullable before a refund identity is
known. These schemas describe the current producer; older stored events replay their original
payload and may lack additive fields. Refetch the scoped request if required facts are absent,
accept unknown additive fields and never infer bank credit from provider success.

Deduplicate event IDs, handle reordering and refetch current state. Completed outcomes are preserved if an older response/event arrives later; stale observations do not emit another progress revision.

The purchase's frozen `notification_owner` is independent of notification delivery status. The metadata
read remains scoped to the authenticated key's tenant, app and environment. In non-production only,
Sandbox keys retain compatibility with the other process runtime. Live keys cannot read through a
Sandbox process. Production always requires a matching runtime key.
Read `GET /v1/purchases/{purchase_id}/notifications` for a paginated `items` array: each item has
`owner` (the frozen notification owner), `status`, `sent_at`, `submitted_at`, `delivered_at` and
`created_at`. Queued, submitted, delivered and unknown are distinct outcomes; suppressed, failed
and other declared lifecycle states remain possible. Read `next_cursor` from the response and pass it
as the next request's `cursor` until `next_cursor` is null. `limit` defaults to 50 and accepts
values from 1 to 100. If Ignyt owns customer mail, do not send a duplicate because a progress webhook retries or mail delivery is delayed. If your company owns mail, Ignyt suppresses its customer dispatch and your system must deduplicate by refund identity. Request/review/reply events do not enqueue a second refund-completion email.

## Related guides

> [card] [Payments and settlements](https://808-labs.mintlify.site/payments-and-settlements.md)
>
> Understand allocations, refunds and recipient readiness.

> [card] [Handle unknown outcomes](https://808-labs.mintlify.site/errors-and-retries.md)
>
> Reconcile the original operation before another attempt.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.