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

# Pay a frozen quote with a shared payment token

>  All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported.



## OpenAPI

````yaml https://api.batchrelay.com/openapi.json post /v1/consumer/purchases
openapi: 3.1.0
info:
  description: >-
    Provider-neutral print catalog and prepared-media validation. This document
    covers only routes owned by the Go service; it deliberately excludes
    migration-proxied order lifecycle routes and all provider payloads.
  license:
    name: Proprietary
    url: https://github.com/SENTINELITE/Batch-Relay-Go/blob/main/README.md
  title: Batch Relay API
  version: 1.0.1
servers:
  - url: https://api.batchrelay.com
security: []
tags:
  - description: >-
      Explicitly authorized purchaser context for studio order events. Event
      payloads remain free of contact details.
    name: Event context
  - description: Service health and the public API description.
    name: System
  - description: Test Mode session creation and API credential entry points.
    name: Authentication
  - description: >-
      Provider-neutral canonical catalog resources and platform-owned semantic
      definitions.
    name: Catalog
  - description: Studio-scoped guest checkout-link management.
    name: Checkout links
  - description: >-
      One-way operational event messages. Alert emails contain no message body
      and recipients read messages after Batch Relay authentication.
    name: Studio messages
  - description: >-
      Explicit, reviewable sandbox-to-Live promotion plans for forms, catalog,
      and storefront configuration.
    name: Sandbox promotions
  - description: Provider-neutral validation, quoting, and order lifecycle operations.
    name: Print orders
  - description: Managed fulfillment asset ingestion and metadata.
    name: Managed assets
  - description: Studio-scoped original asset upload sessions and objects.
    name: Studio assets
  - description: Prepared and confirmed event roster team changes.
    name: Event team changes
  - description: Authenticated studio, event, and form-management operations.
    name: Studio management
  - description: >-
      Authenticated studio retail catalog management. Draft and publication
      lifecycles are explicit per product or package.
    name: Studio catalog
  - description: >-
      Authenticated singular storefront assortment management. PATCH atomically
      publishes a new immutable assortment revision; no storefront draft
      lifecycle exists yet.
    name: Storefront
  - description: Managed media used by the studio retail catalog.
    name: Studio catalog assets
  - description: Template rendering job creation and retrieval.
    name: Template renders
  - description: >-
      Published browser-side template packages and short-lived server proof
      renders. Preview artifacts are never fulfillment artwork.
    name: Browser previews
  - description: API account and credential administration.
    name: API accounts
  - description: >-
      Standalone guest commerce with published listing prices, admission
      controls, hosted checkout and shared payment tokens.
    name: Consumer printing
paths:
  /v1/consumer/purchases:
    parameters:
      - $ref: '#/components/parameters/ClientSurface'
      - $ref: '#/components/parameters/ClientVersion'
      - $ref: '#/components/parameters/InvocationMode'
    post:
      tags:
        - Consumer printing
      summary: Pay a frozen quote with a shared payment token
      description: ' All responses are no-store and no-referrer. Shipping supports all 50 U.S. states and DC; Alaska and Hawaii require Expedited. Territories are unsupported.'
      operationId: purchaseConsumerPrintQuote
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 200
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerPurchaseRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerPurchasePaid'
          description: Success
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerPurchaseProcessing'
          description: Success
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Invalid request
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Session capability unavailable
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Payment declined or requires buyer action
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Quote, price, reservation or session conflict
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Handoff invalid, expired or consumed
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Unsupported destination, artwork, shipping or payment token
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Subject budget exhausted
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
            Retry-After:
              description: >-
                Seconds until retry, when day-scoped; admission_closed uses
                3600. Lifetime budgets require a new session.
              schema:
                minimum: 1
                type: integer
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerError'
          description: Admission closed or dependency unavailable
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Referrer-Policy:
              schema:
                const: no-referrer
                type: string
            Retry-After:
              description: >-
                Seconds until retry, when day-scoped; admission_closed uses
                3600. Lifetime budgets require a new session.
              schema:
                minimum: 1
                type: integer
      security:
        - consumerCapability: []
        - consumerCallerCredential: []
components:
  parameters:
    ClientSurface:
      description: >-
        Untrusted optional analytics hint naming the calling client surface. It
        never affects authorization, routing, pricing, or behavior.
      in: header
      name: X-BatchRelay-Client-Surface
      required: false
      schema:
        maxLength: 100
        minLength: 1
        type: string
    ClientVersion:
      description: >-
        Untrusted optional analytics hint naming the calling client version. It
        never affects authorization, routing, pricing, or behavior.
      in: header
      name: X-BatchRelay-Client-Version
      required: false
      schema:
        maxLength: 100
        minLength: 1
        type: string
    InvocationMode:
      description: >-
        Untrusted optional analytics hint naming the invocation mode. It never
        affects authorization, routing, pricing, or behavior.
      in: header
      name: X-BatchRelay-Invocation-Mode
      required: false
      schema:
        maxLength: 100
        minLength: 1
        type: string
  schemas:
    ConsumerPurchaseRequest:
      additionalProperties: false
      properties:
        expected_total_cents:
          maximum: 1000000
          minimum: 1
          type: integer
        quote_id:
          pattern: ^brcq_[a-f0-9]{32}$
          type: string
        shared_payment_token:
          pattern: ^spt_[A-Za-z0-9_]{6,255}$
          type: string
          writeOnly: true
      required:
        - quote_id
        - expected_total_cents
        - shared_payment_token
      type: object
    ConsumerPurchasePaid:
      additionalProperties: false
      properties:
        components:
          items:
            $ref: '#/components/schemas/ConsumerPriceComponent'
          type: array
        currency:
          type: string
        order_id:
          type: string
        paid_at:
          format: date-time
          type: string
        payment_route:
          type: string
        quote_id:
          type: string
        seller:
          additionalProperties: false
          properties:
            merchant_of_record:
              type: string
            name:
              type: string
          required:
            - name
            - merchant_of_record
          type: object
        status:
          type: string
        total_cents:
          maximum: 1000000
          minimum: 0
          type: integer
      required:
        - status
        - order_id
        - quote_id
        - payment_route
        - currency
        - total_cents
        - components
        - seller
        - paid_at
      type: object
    ConsumerPurchaseProcessing:
      additionalProperties: false
      properties:
        components:
          items:
            $ref: '#/components/schemas/ConsumerPriceComponent'
          type: array
        currency:
          type: string
        order_id:
          type: string
        payment_route:
          type: string
        quote_id:
          type: string
        seller:
          additionalProperties: false
          properties:
            merchant_of_record:
              type: string
            name:
              type: string
          required:
            - name
            - merchant_of_record
          type: object
        status:
          type: string
        total_cents:
          maximum: 1000000
          minimum: 0
          type: integer
      required:
        - status
        - order_id
        - quote_id
        - payment_route
        - currency
        - total_cents
        - components
        - seller
      type: object
    ConsumerError:
      additionalProperties: false
      properties:
        code:
          enum:
            - price_changed
            - quote_expired
            - listing_unavailable
            - destination_unsupported
            - artwork_incompatible
            - admission_closed
            - shipping_unavailable
            - total_mismatch
            - quote_already_used
            - handoff_invalid
            - handoff_completed
            - payment_declined
            - payment_requires_action
            - payment_token_invalid
            - rate_limited
            - consumer_session_unavailable
            - consumer_conflict
            - session_upload_limit
            - checkout_recovery_required
            - invalid_request
            - idempotency_key_required
            - consumer_print_unavailable
            - invalid_arguments
            - consumer_mode_required
          type: string
        details:
          additionalProperties: true
          type: object
        docs_url:
          format: uri
          type: string
        error:
          type: string
        message:
          type: string
        next_action:
          enum:
            - refresh_catalog
            - requote
            - change_destination
            - replace_artwork
            - choose_shipping_option
            - confirm_total
            - retry_later
            - start_new_session
            - refresh_session
            - use_browser_checkout
            - issue_new_payment_token
            - check_order_status
            - fix_request
          type: string
        request_id:
          type: string
        retryable:
          type: boolean
      required:
        - error
        - code
        - message
        - next_action
        - retryable
        - docs_url
        - request_id
      type: object
    ConsumerPriceComponent:
      additionalProperties: false
      properties:
        amount_cents:
          maximum: 1000000
          minimum: 0
          type: integer
        service:
          enum:
            - economy_untracked
            - economy
            - expedited
          type: string
        type:
          enum:
            - merchandise
            - shipping
            - tax
          type: string
      required:
        - type
        - amount_cents
      type: object
  securitySchemes:
    consumerCapability:
      bearerFormat: br_consumer_<256-bit random capability>
      description: >-
        Dedicated expiring guest-session capability. Never a developer API key.
        No Batch Relay account or Studio membership required.
      scheme: bearer
      type: http
    consumerCallerCredential:
      description: >-
        Server-held MCP or web caller credential. Verified MCP credentials may
        purchase only eligible verified MCP quotes. Never expose to a browser.
      in: header
      name: X-BatchRelay-Consumer-Caller-Credential
      type: apiKey

````

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