> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ignyt.si/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit a cart for purchase

> Accepts the shopper-approved quote and starts the purchase; returns `202` with `purchase_id`. Follow progress with `GET /v1/carts/{cart_id}/purchase` (also accepts a cart session token), `GET /v1/purchases/{purchase_id}` (needs `orders:read`) or webhooks. Requires `checkout:write` (API key or cart session token) and an `Idempotency-Key`: retrying with the same key and body returns the original `purchase_id` with `duplicate: true`. Fails with `409 approval_mismatch` unless `approved_total_minor` equals the quote total, and with `409 quote_expired`, `quote_stale`, `quote_not_active` or `merchant_unavailable` when a new quote is needed. A `coupon_rejected` or `coupon_unverifiable` refusal durably invalidates the unaccepted quote before returning. A competing accepted submission is replayed for the same key and payload; another key gets an ordinary conflict and must reconcile the cart's purchase. After acceptance, the cart and receipt stay immutable. A terminal `payment failed: coupon_validation_failed` purchase with explicit `payment: null` proves Money fenced first payment and permits a fresh cart. For coupon failures without a payment, an omitted payment property remains unknown.



## OpenAPI

````yaml /api-reference.json post /v1/carts/{cart_id}/submit
openapi: 3.1.0
info:
  description: >-
    Multi-merchant checkout infrastructure (808labs). UAE/AED first on Stripe;
    Saudi/SAR follows separate certification. OpenAPI is canonical; customers
    can integrate without an SDK. Customer dashboard authentication uses
    verified OIDC; workspace access requires an invitation or explicitly enabled
    Sandbox self-registration; machine integrations use scoped API keys. Plans
    and usage are defined in the developer guide. Internal operator and provider
    callback contracts are excluded.
  title: Ignyt Platform API
  version: 0.1.0
servers:
  - url: https://sandbox.ignite-checkout.ai
    description: 'Planned Sandbox host: use assigned deployment URL until activated'
  - url: https://api.ignite-checkout.ai
    description: 'Planned Production host: separate approval and Live credentials required'
security: []
tags:
  - name: Integration
    description: Identity, usage and the public schema for the calling integration.
  - name: Merchants
    description: Discover merchants, manage enrollments and invite stores.
  - name: Catalog
    description: Products, variants, categories and synchronization.
  - name: Carts and checkout
    description: >-
      Build carts, freeze quotes, submit purchases and manage optional Sandbox
      buyer sharing.
  - name: Webhooks and events
    description: Endpoints, deliveries, retries and the event feed.
  - name: Refunds
    description: Request and follow refunds on merchant orders.
  - name: Purchases and orders
    description: Purchases, merchant orders, cancellations and returns.
  - name: Payments and finance
    description: Payment breakdowns, statements and disputes.
  - name: Custom fields
    description: Approved custom field schemas and order extensions.
paths:
  /v1/carts/{cart_id}/submit:
    post:
      tags:
        - Carts and checkout
      summary: Submit a cart for purchase
      description: >-
        Accepts the shopper-approved quote and starts the purchase; returns
        `202` with `purchase_id`. Follow progress with `GET
        /v1/carts/{cart_id}/purchase` (also accepts a cart session token), `GET
        /v1/purchases/{purchase_id}` (needs `orders:read`) or webhooks. Requires
        `checkout:write` (API key or cart session token) and an
        `Idempotency-Key`: retrying with the same key and body returns the
        original `purchase_id` with `duplicate: true`. Fails with `409
        approval_mismatch` unless `approved_total_minor` equals the quote total,
        and with `409 quote_expired`, `quote_stale`, `quote_not_active` or
        `merchant_unavailable` when a new quote is needed. A `coupon_rejected`
        or `coupon_unverifiable` refusal durably invalidates the unaccepted
        quote before returning. A competing accepted submission is replayed for
        the same key and payload; another key gets an ordinary conflict and must
        reconcile the cart's purchase. After acceptance, the cart and receipt
        stay immutable. A terminal `payment failed: coupon_validation_failed`
        purchase with explicit `payment: null` proves Money fenced first payment
        and permits a fresh cart. For coupon failures without a payment, an
        omitted payment property remains unknown.
      operationId: submit_v1_carts__cart_id__submit_post
      parameters:
        - in: path
          name: cart_id
          required: true
          schema:
            title: Cart Id
            type: string
        - description: >-
            Required. A client-generated key that identifies this operation so
            it can be retried safely. Repeating the request with the same key
            and the same body returns the original result instead of performing
            the action again; reusing a key with a different body is rejected
            with `409`. After a timeout or network error, retry with the same
            key, never a new one.
          in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Required. A client-generated key that identifies this operation so
              it can be retried safely. Repeating the request with the same key
              and the same body returns the original result instead of
              performing the action again; reusing a key with a different body
              is rejected with `409`. After a timeout or network error, retry
              with the same key, never a new one.
            title: Idempotency-Key
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ignite-cart-token
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ignite-Cart-Token
        - in: header
          name: x-ignite-app-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ignite-App-Id
        - in: header
          name: origin
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Origin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitIn'
        required: true
      responses:
        '202':
          content:
            application/json:
              example:
                duplicate: false
                note: >-
                  The purchase executes durably; poll
                  /v1/carts/{cart_id}/purchase with this cart's token, or
                  /v1/purchases/{purchase_id} with orders:read, or consume
                  webhooks.
                purchase_id: pur_01JDX3R2E6K9N3Q6T9W3Z6C9EJ
                status: accepted
                submission_id: sub_01JDX3R2E5G8J1M4P7S1V4Y7AH
              schema:
                $ref: '#/components/schemas/CartSubmissionReceipt'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: Missing, expired or invalid credentials (`unauthorized`).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The credential is valid but lacks the required scope, role,
            environment or ownership for this resource (`forbidden` or a more
            specific code).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The resource does not exist or is not visible to this credential
            (`not_found`).
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The request conflicts with the resource's current state, repeats an
            idempotency key with a different body, or is not available here
            (`conflict`, `unsupported_operation` or a more specific code). Read
            the resource again before deciding how to proceed.
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      details:
                        anyOf:
                          - items:
                              properties:
                                loc:
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: integer
                                  type: array
                                msg:
                                  type: string
                                type:
                                  type: string
                              required:
                                - type
                                - loc
                                - msg
                              type: object
                            type: array
                          - type: object
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - details
                      - request_id
                    type: object
                required:
                  - error
                type: object
          description: Validation Error
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            A plan allowance, rate limit or resource limit was reached. For
            `rate_limited` (a per-second ceiling) or the monthly API allowance
            (`plan_quota_exceeded`), wait for the `Retry-After` interval before
            retrying. A specific `*_rate_limited` code, such as
            `invitation_email_rate_limited`, is an hourly limit sent without
            `Retry-After`: retry later with bounded backoff. A resource limit
            described by the operation, such as active merchant requests or
            uploads, does not clear by waiting: complete or withdraw existing
            items first. Monthly allowance and cost limits never block servicing
            of accepted orders; per-second ceilings still apply to servicing
            routes.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, sent only when the monthly API
                allowance is exhausted (`plan_quota_exceeded`) or a per-second
                rate limit (`rate_limited`) is reached; specific
                `*_rate_limited` codes omit it.
              schema:
                type: integer
      security:
        - MachineKey: []
        - CustomerOIDC: []
        - CartSession: []
components:
  schemas:
    SubmitIn:
      properties:
        approved_total_minor:
          description: >-
            The exact quote `total_minor` the shopper approved, in integer minor
            units of the quote currency (for AED, 10050 = AED 100.50). Any other
            value is rejected with `409 approval_mismatch`.
          examples:
            - 10050
          title: Approved Total Minor
          type: integer
        partial_order_policy:
          default: allow_partial
          description: >-
            What happens if some merchants fail to accept their part of the
            order. Allowed values: `allow_partial` (keep the accepted merchant
            orders and refund the rest). New purchases accept only
            `allow_partial`; `all_or_cancel` appears only on historical
            purchases.
          examples:
            - allow_partial
          title: Partial Order Policy
          type: string
        quote_id:
          description: The active quote the shopper approved.
          examples:
            - quo_01J8ZK
          title: Quote Id
          type: string
        shopper_contact:
          additionalProperties: true
          default: {}
          description: >-
            Contact details passed to merchants for fulfilment and order
            notifications, for example `email` and `phone`.
          examples:
            - email: shopper@example.com
              phone: '+971500000000'
          title: Shopper Contact
          type: object
      required:
        - quote_id
        - approved_total_minor
      title: SubmitIn
      type: object
    CartSubmissionReceipt:
      properties:
        duplicate:
          description: >-
            `true` when this repeats an earlier submission with the same
            identity.
          title: Duplicate
          type: boolean
        note:
          description: Human-readable guidance on following the purchase.
          title: Note
          type: string
        purchase_id:
          description: >-
            Purchase to follow with `GET /v1/carts/{cart_id}/purchase`, which
            also accepts a cart session token, or with `GET
            /v1/purchases/{purchase_id}` and the `orders:read` scope.
          title: Purchase Id
          type: string
        status:
          const: accepted
          description: 'Always `accepted`: the purchase has been admitted.'
          title: Status
          type: string
        submission_id:
          description: Submission identifier.
          title: Submission Id
          type: string
      required:
        - submission_id
        - purchase_id
        - status
        - duplicate
        - note
      title: CartSubmissionReceipt
      type: object
    IgniteErrorEnvelope:
      description: Document the existing error handler without changing its serialization.
      properties:
        error:
          $ref: '#/components/schemas/IgniteErrorDetail'
      required:
        - error
      title: IgniteErrorEnvelope
      type: object
    IgniteErrorDetail:
      description: Stable error fields; details remain open to each domain's JSON evidence.
      properties:
        code:
          title: Code
          type: string
        details:
          title: Details
        message:
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      required:
        - code
        - message
        - details
        - request_id
      title: IgniteErrorDetail
      type: object
  securitySchemes:
    MachineKey:
      description: Server-side scoped Ignyt API key.
      scheme: bearer
      type: http
    CustomerOIDC:
      bearerFormat: JWT
      description: >-
        Customer access token; current membership, role and app selection are
        enforced. Protected actions use recent email-code verification in the
        configured Sandbox or recent authenticator verification in legacy
        password mode. Available when customer authentication is enabled.
      scheme: bearer
      type: http
    CartSession:
      description: Short-lived browser token bound to one cart and its allowed origin.
      in: header
      name: X-Ignite-Cart-Token
      type: apiKey

````

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