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

# Pay an order

> Returns a payment link for an order with an outstanding balance.



## OpenAPI

````yaml openapi-customer.json POST /orders/{orderId}/pay
openapi: 3.1.0
info:
  version: 8.15.0
  title: '@fastify/swagger'
servers:
  - url: https://api.juo.io/customer/v1
security:
  - DelegatedToken: []
  - AccessToken: []
paths:
  /orders/{orderId}/pay:
    post:
      tags:
        - api.customer.v1
      description: >-
        Pay an outstanding postpaid invoice. If a Shopify Checkout or the Juo
        pay page is already payable, returns that link with no changes.
        Otherwise (Juo is between auto-charge attempts, or no payment method is
        on file) switches the invoice onto the Manual (Shopify Checkout)
        instrument and returns the invoice's stable pay link. Refuses (409)
        while a charge is already in flight, or once the invoice is settled.
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orderId
          required: true
          description: The order (invoice) identifier
        - $ref: '#/components/parameters/TenantHeader'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    description: The invoice's stable customer-facing pay link.
                    type: string
                required:
                  - url
components:
  parameters:
    TenantHeader:
      name: X-Tenant-ID
      x-speakeasy-name-override: tenant
      x-speakeasy-globals-hidden: true
      in: header
      schema:
        type: string
      required: true
      description: >-
        Unique identifier of the tenant in the system (usually a store
        identifier)
  securitySchemes:
    DelegatedToken:
      type: apiKey
      name: X-Delegated-Token
      in: header
    AccessToken:
      type: http
      scheme: bearer

````

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