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

# Retry payment

> Retries payment with an eligible payment method while an amount remains payable. A pending or failed gateway payment can be retried without a waiting period, subject to the order's payment state and retry limit. An order not on the customer's credit line that its loyalty points, credit balance or discounts pay in full has nothing to retry: the request fails with the `payment-retry-not-allowed` error code, or `payment-already-successful` once the order is paid. The payment method must be one the store offers on the token's sales channel (`GET /payments/payment-methods` lists them); any other is refused with a 400.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json post /pos/orders/{order_number}/retry-payment
openapi: 3.2.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; the POS backend proxies some of them to the admin
    service.
  version: '1.0'
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security:
  - Authorization: []
tags:
  - name: section-identity
    summary: Identity
    kind: nav
  - name: Devices
    description: >-
      Set up the till: pair a device with the store using its pairing code, list
      the store's `PosLocation`s and `PosDevice`s, and claim a device for the
      signed-in user or release it.
    summary: Devices
    kind: nav
    parent: section-identity
  - name: Authentication
    description: >-
      Sign a staff member in on a paired device with a one-time password over
      SMS, WhatsApp or email, then refresh the access token or log out.
    summary: Authentication
    kind: nav
    parent: section-identity
  - name: Users
    description: >-
      The staff member signed in on the till, as a `PosUser` with their
      location, device and roles.
    summary: Users
    kind: nav
    parent: section-identity
  - name: section-customers
    summary: Customers
    kind: nav
  - name: Customers
    description: >-
      Look up the shopper at the till: list customers (`CustomerListItem`) and
      read one's full `CustomerDetail`.
    summary: Customers
    kind: nav
    parent: section-customers
  - name: Addresses
    description: >-
      A customer's saved addresses, as `Address` objects: list, add, update and
      remove them.
    summary: Addresses
    kind: nav
    parent: section-customers
  - name: section-catalog
    summary: Catalog
    kind: nav
  - name: Products
    description: >-
      Browse and search the catalog at the till: list `Product`s and SKUs, read
      a product and its variants, and show similar, up-sell and cross-sell
      items.
    summary: Products
    kind: nav
    parent: section-catalog
  - name: Reviews
    description: Read product reviews at the till.
    summary: Reviews
    kind: nav
    parent: section-catalog
  - name: Categories
    description: >-
      The store's categories, as `ProductCategory` objects with their child
      categories.
    summary: Categories
    kind: nav
    parent: section-catalog
  - name: Inventory
    description: >-
      Stock at the store's locations: list it by item, read an item's
      `InventoryDetail`, and follow the `InventoryActivity` that moved it.
    summary: Inventory
    kind: nav
    parent: section-catalog
  - name: section-shopping
    summary: Shopping
    kind: nav
  - name: Carts
    description: >-
      The till's `Cart`: create it, add, update or remove items, link the
      customer, set the address, and apply loyalty points or credit balance.
      Each update returns the full, updated `Cart`.
    summary: Carts
    kind: nav
    parent: section-shopping
  - name: Coupons & promotions
    description: >-
      The coupons and promotions a cart can use: list what the store offers, see
      which apply to a cart and why the rest don't, and apply or remove a
      coupon.
    summary: Coupons & promotions
    kind: nav
    parent: section-shopping
  - name: Fulfillment
    description: >-
      List the delivery and collect-in-store options for a cart, and save the
      cart's choice.
    summary: Fulfillment
    kind: nav
    parent: section-shopping
  - name: section-orders
    summary: Orders
    kind: nav
  - name: Orders
    description: >-
      Place an order from the till's cart and follow it: list orders, read an
      `OrderDetail` and its activity, check stock before it ships, and get its
      invoice, receipt and shipments.
    summary: Orders
    kind: nav
    parent: section-orders
  - name: Order payments
    description: >-
      Collect payment for an order: add payments toward what is left to pay,
      across one or more methods, poll the payment status, and retry a failed or
      expired payment.
    summary: Order payments
    kind: nav
    parent: section-orders
  - name: Shipments
    description: >-
      The shipments that fulfill orders: list them, read a `ShipmentDetail` with
      its activity and invoice, approve, reject or update one, send a
      replacement, and refund a shortfall.
    summary: Shipments
    kind: nav
    parent: section-orders
  - name: section-payments
    summary: Payments
    kind: nav
  - name: Payments
    description: >-
      The payment methods the till accepts and the checks around paying with
      them: card BIN details, VPA verification, and authenticating a payment
      with a direct OTP.
    summary: Payments
    kind: nav
    parent: section-payments
  - name: section-store
    summary: Store
    kind: nav
  - name: Locations
    description: States and pincodes for address forms.
    summary: Locations
    kind: nav
    parent: section-store
paths:
  /pos/orders/{order_number}/retry-payment:
    post:
      tags:
        - Order payments
      summary: Retry payment
      description: >-
        Retries payment with an eligible payment method while an amount remains
        payable. A pending or failed gateway payment can be retried without a
        waiting period, subject to the order's payment state and retry limit. An
        order not on the customer's credit line that its loyalty points, credit
        balance or discounts pay in full has nothing to retry: the request fails
        with the `payment-retry-not-allowed` error code, or
        `payment-already-successful` once the order is paid. The payment method
        must be one the store offers on the token's sales channel (`GET
        /payments/payment-methods` lists them); any other is refused with a 400.
      operationId: pos-retry-order-payment
      parameters:
        - name: order_number
          in: path
          description: order number
          required: true
          schema:
            type: string
            maxLength: 128
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,128}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: >-
                Provide exactly one of payment_method or the deprecated
                payment_gateway_params.
              type: object
              properties:
                payment_method:
                  $ref: '#/components/schemas/RetryPaymentMethodPayload'
                payment_gateway_params:
                  $ref: '#/components/schemas/LegacyRetryPaymentParams'
                  description: Deprecated. Prefer payment_method; do not send both forms.
              anyOf:
                - required:
                    - payment_method
                  not:
                    required:
                      - payment_gateway_params
                - required:
                    - payment_gateway_params
                  not:
                    required:
                      - payment_method
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      payment_info:
                        description: >-
                          Gateway initiation details for the new payment
                          attempt. `null` when the retry starts no gateway
                          payment: a manual payment method (such as cash on
                          delivery) or a bank transfer.
                        anyOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - $ref: '#/components/schemas/PayuPaymentInfo'
                          - type: 'null'
                    required:
                      - payment_info
                    type: object
          links:
            PollRetryPaymentStatus:
              operationId: pos-get-payment-status
              parameters:
                order_number: $request.path.order_number
              description: Poll the payment status after retrying payment.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/pos-retry-order-payment
components:
  schemas:
    RetryPaymentMethodPayload:
      title: RetryPaymentMethodPayload
      description: >-
        Payment methods accepted for a retry. LotusPay (`lotuspay`), NACH and
        credit-line methods are refused.
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/RetryPaymentMethodPayload
      anyOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/BankTransferCheckout'
        - $ref: '#/components/schemas/ManualPaymentMethodCheckout'
    LegacyRetryPaymentParams:
      title: LegacyRetryPaymentParams
      description: Deprecated payment gateway parameters. Prefer payment_method.
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/LegacyRetryPaymentParams
      oneOf:
        - type: object
          properties:
            payment_gateway:
              type: string
              const: PAYU
            furl:
              description: >-
                Return URL using http, https, ftp or ftps. App-specific URI
                schemes are not accepted.
              type: string
              format: uri
              pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
            surl:
              description: >-
                Return URL using http, https, ftp or ftps. App-specific URI
                schemes are not accepted.
              type: string
              format: uri
              pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
          required:
            - payment_gateway
            - furl
            - surl
        - type: object
          properties:
            payment_gateway:
              type: string
              const: JUSPAY
            action:
              type: string
              enum:
                - paymentPage
                - paymentManagement
            integration_type:
              type: string
              enum:
                - hyper-checkout
                - express-checkout
            gateway_reference_id:
              type: string
              minLength: 1
              pattern: \S
            return_url:
              description: >-
                Return URL using http, https, ftp or ftps. App-specific URI
                schemes are not accepted.
              type: string
              format: uri
              pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
          required:
            - payment_gateway
            - action
            - integration_type
            - gateway_reference_id
            - return_url
    JusPayHyperCheckoutResponse:
      title: JusPayHyperCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayHyperCheckoutResponse
      properties:
        id:
          type: string
        status:
          type: string
        order_id:
          type: string
        payment_links:
          type: object
          properties:
            web:
              type: string
            expiry:
              type:
                - string
                - 'null'
        sdk_payload:
          type: object
          properties:
            requestId:
              type: string
            service:
              type: string
            payload:
              type: object
              properties:
                clientId:
                  type: string
                merchantId:
                  type: string
                clientAuthToken:
                  type: string
                clientAuthTokenExpiry:
                  type: string
                environment:
                  type: string
                orderId:
                  type: string
                amount:
                  type: string
                action:
                  type: string
                customerId:
                  type: string
                firstName:
                  type: string
                lastName:
                  type: string
                returnUrl:
                  type: string
                customerPhone:
                  type: string
                customerEmail:
                  type: string
                currency:
                  type: string
                description:
                  type: string
                options.createMandate:
                  description: >
                    Use for taking consent of subscription payments. If this key
                    is used it will ask user to give consent for subscription
                    payment.
                  const: REQUIRED
                mandate.maxAmount:
                  description: Maximum amount that can be charged in recurring payment.
                  type: string
                'mandate.start_date ':
                  description: subscription start time
                  type: string
                'mandate.end_date ':
                  description: subscription end time
                  type: string
                mandate.frequency:
                  description: subscription frequency
                  const: MONTHLY
                'mandate.rule_value ':
                  description: >-
                    When frequency is passed as WEEKLY, FORTNIGHTLY, MONTHLY,
                    BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY then is it
                    required that the exact day of the period should be passed.


                    1-7 when frequency is WEEKLY. In weekly, serial numbers
                    start from Monday. Monday represents 1 and Sunday represents
                    7.


                    1-16 when frequency is FORTNIGHTLY. This mandate is executed
                    twice a month. First day of the month is represented by
                    value '1' and ends with '15' on 15th day of the month. Then
                    again starts with '1' for 16th of the month and ends with
                    the last day of the month.


                    1-31 when frequency is MONTHLY, BIMONTHLY, QUARTERLY,
                    HALFYEARLY, or YEARLY.
                  type: string
                  enum:
                    - 1-7
                    - 1-16
                    - 1-31
        order_expiry:
          type: string
          format: date-time
    JusPayExpressCheckoutResponse:
      title: JusPayExpressCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayExpressCheckoutResponse
      required:
        - txn_id
        - txn_uuid
        - status
        - order_id
        - payment
      properties:
        txn_id:
          description: The transaction ID of the payment.
          type: string
        txn_uuid:
          description: The transaction UUID of the payment.
          type: string
        status:
          description: The status of the payment.
          type: string
        order_id:
          description: The order ID of the payment.
          type: string
        juspay:
          type: object
          properties:
            client_auth_token:
              type: string
            client_auth_token_expiry:
              type: string
        offer_details:
          type: object
          properties:
            offers:
              type: array
              items:
                type: object
          required:
            - offers
        payment:
          type: object
          properties:
            sdk_params:
              type: object
              properties:
                tr:
                  type: string
                merchant_vpa:
                  type: string
                customer_last_name:
                  type: string
                merchant_name:
                  type: string
                pg_intent_url:
                  description: >-
                    The UPI intent URL of the payment. This URL is used to
                    redirect the customer to the UPI app for payment.
                  type: string
                amount:
                  type: string
                tid:
                  type: string
                customer_first_name:
                  type: string
            authentication:
              type: object
              properties:
                method:
                  type: string
                  const: GET
                url:
                  type: string
                  format: uri
                params:
                  description: >-
                    Available only when Direct OTP is enabled for the card;
                    otherwise this object is absent.
                  type: object
                  properties:
                    card_issuer_bank_name:
                      type: string
                    id:
                      description: >-
                        This field is used as txn_id in Verify Direct OTP and
                        Resend Direct OTP endpoints payload.
                      type: string
                    fallback_url:
                      type: string
                    challenge_id:
                      description: >-
                        This field is required in Verify Direct OTP and Resend
                        Direct OTP endpoints.
                      type: string
                    resend_otp_allowed:
                      description: >-
                        This field is used to decide whether API request can be
                        sent to Resend OTP API or not.
                      type: boolean
                    auth_type:
                      type: string
                    submit_otp_allowed:
                      description: >-
                        This field is used to decide whether OTP can be verified
                        using Authenticate Direct OTP API or not.
                      type: boolean
                    card_isin:
                      type: string
              required:
                - method
                - url
    PayuPaymentInfo:
      title: PayuPaymentInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/PayuPaymentInfo
      required:
        - key
        - txnid
        - amount
        - productinfo
        - firstname
        - email
        - phone
        - furl
        - surl
        - hash
      properties:
        key:
          type: string
        txnid:
          type: string
        amount:
          description: Payment amount as a decimal string with two fractional digits.
          type: string
        productinfo:
          type: string
        firstname:
          description: >-
            The billing first name, or null when the order has no billing
            address (a till sale without one).
          type:
            - string
            - 'null'
        lastname:
          type: string
        email:
          description: >-
            The billing email, or null when the order has no billing address (a
            till sale without one).
          type:
            - string
            - 'null'
        phone:
          description: >-
            The billing phone, or null when the order has no billing address (a
            till sale without one).
          type:
            - string
            - 'null'
        si:
          description: >-
            To be used in case we want to take consent for subscription payment.

            To create consent for subscription, value of this parameter must be
            1.
          type: integer
          const: 1
        si_details:
          description: >-
            JSON-encoded subscription consent. Contains `billingAmount` as a
            decimal string, `billingCurrency` `INR`, `billingCycle` `ADHOC`, and
            `paymentStartDate` and `paymentEndDate` as dates. Pass this string
            unchanged with the payment.
          type: string
          contentMediaType: application/json
        furl:
          description: return url in case of payment failure.
          type: string
        surl:
          description: return url in case of payment success.
          type: string
        hash:
          type: string
    JusPayHyperCheckout:
      title: JusPayHyperCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayHyperCheckout
      required:
        - payment_provider_slug
        - integration_type
        - return_url
        - action
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
        integration_type:
          type: string
          const: hyper-checkout
        gateway_reference_id:
          description: >-
            The reference ID of the payment gateway. When provided, payments
            will always be routed through this gateway.
          type: string
          minLength: 1
          pattern: \S
        return_url:
          description: >-
            Return URL using http, https, ftp or ftps. App-specific URI schemes
            are not accepted.
          type: string
          format: uri
          pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
        action:
          description: >-
            The action to be performed. `paymentPage` is the default option that
            you should select when using hyper-checkout.
          type: string
          enum:
            - paymentPage
    JusPayExpressCheckout:
      title: JusPayExpressCheckout
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayExpressCheckout
      oneOf:
        - anyOf:
            - $ref: '#/components/schemas/JusPayNewCard'
            - $ref: '#/components/schemas/JusPaySavedCardToken'
        - $ref: '#/components/schemas/JuspayNetBanking'
        - $ref: '#/components/schemas/JuspayUpiCollect'
        - $ref: '#/components/schemas/JuspayUpiIntent'
    BankTransferCheckout:
      title: BankTransferCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/BankTransferCheckout
      required:
        - payment_provider_slug
        - payment_method_type
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
          const: icici-ecollection
        payment_method_type:
          type: string
          const: bank-transfer
    ManualPaymentMethodCheckout:
      title: ManualPaymentMethodCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/ManualPaymentMethodCheckout
      required:
        - payment_provider_slug
      properties:
        payment_provider_slug:
          description: >-
            The slug of an active manual payment method configured for the
            store.
          type: string
        payment_method_type:
          description: Optional label stored on the created payment request.
          type: string
      not:
        anyOf:
          - required:
              - integration_type
          - required:
              - mandate_id
          - properties:
              payment_method_type:
                const: NACH
            required:
              - payment_method_type
          - properties:
              payment_provider_slug:
                const: icici-ecollection
            required:
              - payment_provider_slug
    JusPayNewCard:
      title: JusPayNewCard
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JusPayNewCard
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            save_to_locker:
              description: >-
                Whether to save the card to the locker. If true, the card will
                be saved to the locker and can be used for future payments as
                per RBI regulations.
              type: boolean
            payment_method_type:
              type: string
              const: CARD
            card_number:
              type: string
              minLength: 1
              pattern: \S
            card_exp_month:
              type: string
              minLength: 1
              pattern: \S
            card_exp_year:
              type: string
              minLength: 1
              pattern: \S
            name_on_card:
              type: string
              minLength: 1
              pattern: \S
            card_security_code:
              type: string
              minLength: 1
              pattern: \S
            auth_type:
              type: string
              default: OTP
              minLength: 1
              pattern: \S
          required:
            - save_to_locker
            - payment_method_type
            - card_number
            - card_exp_month
            - card_exp_year
            - name_on_card
            - card_security_code
    JusPaySavedCardToken:
      title: JusPaySavedCardToken
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPaySavedCardToken
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            save_to_locker:
              description: >-
                Whether to save the card to the locker. If true, the card will
                be saved to the locker and can be used for future payments as
                per RBI regulations.
              type: boolean
            payment_method_type:
              type: string
              const: CARD
            payment_method:
              description: Optional card payment method supported by the payment provider.
              type: string
              minLength: 1
              pattern: \S
            card_token:
              description: >-
                Token of the card. This is the token that is used to identify
                the card in the gateway.
              type: string
              minLength: 1
              pattern: \S
            card_security_code:
              description: >-
                Security code of the card. This is the security code that is
                used to identify the card in the gateway.
              type: string
              minLength: 1
              pattern: \S
            auth_type:
              type: string
              default: OTP
              minLength: 1
              pattern: \S
          required:
            - save_to_locker
            - payment_method_type
            - card_token
            - card_security_code
    JuspayNetBanking:
      title: JuspayNetBanking
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayNetBanking
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: NB
            payment_method:
              type: string
              minLength: 1
              pattern: \S
          required:
            - payment_method_type
            - payment_method
    JuspayUpiCollect:
      title: JuspayUpiCollect
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayUpiCollect
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_COLLECT
            upi_vpa:
              type: string
              minLength: 1
              pattern: \S
          required:
            - payment_method_type
            - payment_method
            - upi_vpa
    JuspayUpiIntent:
      title: JuspayUpiIntent
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/JuspayUpiIntent
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_PAY
            sdk_params:
              description: Must be true for UPI intent.
              type: boolean
              default: true
              const: true
          required:
            - payment_method_type
            - payment_method
    JusPayExpressCheckoutCommonField:
      title: JusPayExpressCheckoutCommonField
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/JusPayExpressCheckoutCommonField
      required:
        - payment_provider_slug
        - integration_type
        - return_url
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
        integration_type:
          type: string
          const: express-checkout
        gateway_reference_id:
          description: >-
            The reference ID of the payment gateway. When provided, payments
            will always be routed through this gateway.
          type: string
          minLength: 1
          pattern: \S
        return_url:
          description: >-
            Return URL using http, https, ftp or ftps. App-specific URI schemes
            are not accepted.
          type: string
          format: uri
          pattern: ^(?:[hH][tT][tT][pP][sS]?|[fF][tT][pP][sS]?)://
        get_client_auth_token:
          type: boolean
          default: false
        redirect_after_payment:
          type: boolean
          default: true
        sdk_params:
          type: boolean
          default: true
        auth_type:
          type: string
          default: OTP
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              errors:
                type: object
              details:
                type: string
    Unauthorized:
      description: >-
        Authentication failed. Codes include `token-required`, `token-expired`
        and `token_not_valid` for an invalid or expired token.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                examples:
                  - Not authorized for given operation on the Resource.
                x-speakeasy-error-message: true
              success:
                type: boolean
                default: false
              code:
                type: string
                examples:
                  - unauthorized
              details:
                type: string
    Forbidden:
      description: >-
        Access denied. `token-required` requires an authenticated session;
        `permission-denied` means the caller cannot access this resource. On
        POS, `session-expired` requires signing in again.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    NotFound:
      description: Requested resource not found
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
    InternalServerError:
      description: The request failed because of an unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    GatewayTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````

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