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

# Read the payment status of an order

> Returns the current payment state of an order — for example whether it is awaiting payment, authorized, paid, or failed — so a storefront or portal can poll for the outcome after the patient completes payment in the browser. The state reflects confirmations received from the payment provider. An order that belongs to a different brand returns 404, the same as an order that does not exist, so no order's existence is revealed across brands. The payment token is never returned here.



## OpenAPI

````yaml /openapi/public-openapi.json get /v1/payments/{order_ref}/status
openapi: 3.1.0
info:
  title: Purple API
  version: 0.0.0
servers:
  - url: https://api.dev.purplelabelmd.com
security: []
tags:
  - description: Sign a patient in and out and manage the browser session.
    name: Sessions & authentication
  - description: Run the server-driven intake questionnaire question by question.
    name: Intake
  - description: Address autocomplete for the intake flow.
    name: Addresses
  - description: Read the public status of a patient's enrollment.
    name: Enrollment
  - description: Track a client's onboarding progress.
    name: Onboarding
  - description: Read back the platform configuration stored for your brand.
    name: Brand configuration
  - description: Enable offerings for your brand and set their display copy.
    name: Offering configuration
  - description: Start and track payments for an order.
    name: Payments
  - description: Subscribe to platform events and manage delivery endpoints.
    name: Webhooks
paths:
  /v1/payments/{order_ref}/status:
    get:
      tags:
        - Payments
      summary: Read the payment status of an order
      description: >-
        Returns the current payment state of an order — for example whether it
        is awaiting payment, authorized, paid, or failed — so a storefront or
        portal can poll for the outcome after the patient completes payment in
        the browser. The state reflects confirmations received from the payment
        provider. An order that belongs to a different brand returns 404, the
        same as an order that does not exist, so no order's existence is
        revealed across brands. The payment token is never returned here.
      operationId: getCommercePaymentStatus
      parameters:
        - $ref: '#/components/parameters/CommerceOrderRef'
        - $ref: '#/components/parameters/CommerceBrandHeader'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommercePaymentStatus'
          description: the current payment state of the order
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/CommerceProblem'
          description: no such order for this brand
      security:
        - apiKey: []
components:
  parameters:
    CommerceOrderRef:
      in: path
      name: order_ref
      required: true
      schema:
        pattern: ^ord_[A-Za-z0-9][A-Za-z0-9_-]*$
        type: string
    CommerceBrandHeader:
      description: >-
        The brand this request is scoped to. It is validated against your
        authenticated account; an unknown or unauthorized brand is rejected. The
        brand is never taken from the request body.
      in: header
      name: X-Brand-Id
      required: true
      schema:
        pattern: ^brd_[A-Za-z0-9][A-Za-z0-9_-]*$
        type: string
  schemas:
    CommercePaymentStatus:
      description: >-
        The current payment state of an order. It reflects confirmations
        received from the payment provider after the patient completes payment.
        Intended for polling; it does not include the payment token or a fee
        breakdown.
      properties:
        currency:
          pattern: ^[A-Z]{3}$
          type: string
        order_ref:
          type: string
        payment_state:
          enum:
            - created
            - payment_authorized
            - paid
            - payment_failed
            - partially_refunded
            - refunded
            - disputed
            - cancelled
          type: string
        total_minor:
          type: integer
      required:
        - order_ref
        - payment_state
        - total_minor
        - currency
      type: object
    CommerceProblem:
      description: RFC 7807 problem document (api-style-guide)
      properties:
        detail:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
      required:
        - type
        - title
        - status
      type: object
  securitySchemes:
    apiKey:
      description: 'Per-client API key (M2M). Presented as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http

````