> ## 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.

# Create order payment

> Requests a payment of `amount` toward what is left to pay on an order, with another payment method: to pay after a failed or abandoned payment, or to split the payment across methods. Returns the order's `OrderPayment`s, the `pending_amount` left to request and, for a gateway, the `payment_info` to start its payment flow. A shopper's token reaches only their own orders; a POS token, the orders rung up at its location. 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. A manual method the store marks as paid is recorded as paid at once. E-collection, NACH and credit-line methods can't be added, and a cancelled order takes no payment (the `order-cancelled` error code).



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json post /pos/orders/{order_number}/payments
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}/payments:
    post:
      tags:
        - Order payments
      summary: Create order payment
      description: >-
        Requests a payment of `amount` toward what is left to pay on an order,
        with another payment method: to pay after a failed or abandoned payment,
        or to split the payment across methods. Returns the order's
        `OrderPayment`s, the `pending_amount` left to request and, for a
        gateway, the `payment_info` to start its payment flow. A shopper's token
        reaches only their own orders; a POS token, the orders rung up at its
        location. 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. A manual method the store marks as paid is recorded
        as paid at once. E-collection, NACH and credit-line methods can't be
        added, and a cancelled order takes no payment (the `order-cancelled`
        error code).
      operationId: pos-create-order-payment-request
      parameters:
        - name: order_number
          in: path
          description: The unique identifier of the Order.
          required: true
          schema:
            type: string
            maxLength: 128
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,128}$
      requestBody:
        description: Request body
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - payment_method
              properties:
                amount:
                  description: >-
                    Amount to request for this payment method. The total
                    requested amount cannot exceed the order's `to_be_paid`.
                  type: number
                  format: double
                  maximum: 9999999999999.99
                  minimum: 0.01
                  multipleOf: 0.01
                payment_method:
                  $ref: '#/components/schemas/OrderPaymentMethodPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                    readOnly: true
                  success:
                    type: boolean
                    readOnly: true
                  content:
                    properties:
                      payments:
                        description: >-
                          All payment records for the order after creating this
                          request.
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderPaymentRecord'
                      payment_required:
                        description: '`true` if the order has a payable amount.'
                        type: boolean
                      pending_amount:
                        description: >-
                          Remaining amount that can still be requested for this
                          order: what is left of its `to_be_paid` after the
                          payments requested so far, never below `0`. Payments
                          that failed or were refunded don't count against it,
                          nor do loyalty points or the credit balance the order
                          uses.
                        type: number
                        format: double
                      payment_info:
                        description: >-
                          Gateway initiation details when an auto payment method
                          is used; otherwise `null`.
                        anyOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - type: 'null'
                          - $ref: '#/components/schemas/PayuPaymentInfo'
                    required:
                      - payments
                      - payment_required
                      - pending_amount
                      - payment_info
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Invalid payment request. `payment-method-already-exists` means this
            provider already has an active payment;
            `payment-amount-exceeds-pending` means the amount exceeds what
            remains payable.
        '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-create-order-payment-request
components:
  schemas:
    OrderPaymentMethodPayload:
      title: OrderPaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/OrderPaymentMethodPayload
      anyOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/ManualPaymentMethodCheckout'
    OrderPaymentRecord:
      title: OrderPaymentRecord
      description: A payment record returned by the order payment endpoints.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderPaymentRecord
      required:
        - payment_date
        - payment_provider_slug
        - payment_mode
        - icon_url
        - created_at
        - modified_at
      allOf:
        - $ref: '#/components/schemas/OrderPayment'
    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'
    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
    OrderPayment:
      title: OrderPayment
      description: >-
        A payment of the order, or a refund of one (`transaction_type`). Every
        payment has the common fields; the method's own fields depend on
        `payment_method`: a card's `card_number` and `card_type`, netbanking's
        `bank_name`, UPI's `upi_id`, a wallet's `wallet_name`, a bank transfer's
        (`IMPS`, `NEFT`, `RTGS`) `bank_account_number` and `bank_name`. A
        payment whose method isn't known yet (`payment_method` empty or `null`)
        or has no fields of its own (e.g. `NACH`, cash, loyalty points) has only
        the common fields.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/OrderPayment
      required:
        - transaction_type
        - request_number
        - amount
        - payment_status
        - payment_method
        - payment_reference_number
      allOf:
        - $ref: '#/components/schemas/CardPayment'
        - $ref: '#/components/schemas/NetbankingPayment'
        - $ref: '#/components/schemas/UpiPayment'
        - $ref: '#/components/schemas/WalletPayment'
        - $ref: '#/components/schemas/BankTransfer'
        - $ref: '#/components/schemas/NachPayment'
    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
    CardPayment:
      title: CardPayment
      description: Payments using credit card, debit card
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/CardPayment
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            card_number:
              description: "masked card number\r\ne.g. ************1111"
              type:
                - string
                - 'null'
            card_type:
              description: >-
                The card's type, as the store's payment methods name it, e.g.
                `Visa`, `Rupay`.
              type:
                - string
                - 'null'
    NetbankingPayment:
      title: NetbankingPayment
      description: Payments using payment gateway netbanking option.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/NetbankingPayment
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            bank_name:
              type:
                - string
                - 'null'
    UpiPayment:
      title: UpiPayment
      description: UPI Payment
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/UpiPayment
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            upi_id:
              description: The payer's UPI ID, when the payment provider reports it.
              type:
                - string
                - 'null'
    WalletPayment:
      title: WalletPayment
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/WalletPayment
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            wallet_name:
              type:
                - string
                - 'null'
    BankTransfer:
      title: BankTransfer
      description: Bank transfer payment - IMPS, NEFT, RTGS
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/BankTransfer
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            bank_account_number:
              description: "masked account number\r\ne.g. ************1234"
              type:
                - string
                - 'null'
            bank_name:
              type:
                - string
                - 'null'
    NachPayment:
      title: NachPayment
      description: NACH mandate payment via LotusPay.
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/NachPayment
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
    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
    PaymentInfo:
      title: PaymentInfo
      description: Common fields in all types of payments.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/PaymentInfo
      properties:
        transaction_type:
          type: string
          enum:
            - payment
            - refund
        request_number:
          type: string
        amount:
          type: number
          format: double
        payment_status:
          type: string
          enum:
            - pending
            - success
            - failed
            - partially_paid
            - refund_initiated
            - refunded
            - unsettled
            - settled
            - partially_settled
            - manual_review
            - debit_scheduled
            - collection_due
            - initiated
            - forfeited
        payment_date:
          type: string
          format: date-time
        payment_reference_number:
          type:
            - string
            - 'null'
        payment_method:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
        payment_provider_slug:
          description: >-
            The payment provider's slug. Not sent on refund entries or order
            payment events.
          type:
            - string
            - 'null'
        payment_mode:
          type:
            - string
            - 'null'
        shipment_number:
          description: >-
            The shipment associated with the refund. Not sent on payment
            entries.
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
  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.