> ## 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 POS order payment

> Creates a payment request for a POS order. Use this when the order was created without `payment_method` or when collecting the remaining `to_be_paid` amount with another method.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json post /pos/orders/{order_number}/payments
openapi: 3.1.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; operations tagged POSAdmin are proxied to the admin
    service by the POS backend.
  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: POS
    description: Operations backed by the storefront service
  - name: POSAdmin
    description: Operations proxied to the admin service
paths:
  /pos/orders/{order_number}/payments:
    post:
      tags:
        - POS
      summary: Create POS order payment
      description: >-
        Creates a payment request for a POS order. Use this when the order was
        created without `payment_method` or when collecting the remaining
        `to_be_paid` amount with another method.
      operationId: pos-create-order-payment-request
      parameters:
        - name: order_number
          in: path
          description: The unique identifier of the Order.
          required: true
          schema:
            type: string
      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
                  exclusiveMinimum: 0
                payment_method:
                  $ref: '#/components/schemas/PosPaymentMethodPayload'
      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/OrderPayment'
                      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.
                        type: number
                        format: double
                      payment_info:
                        description: >-
                          Gateway initiation details when an auto payment method
                          is used; otherwise `null`.
                        oneOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - type: 'null'
                    required:
                      - payments
                      - payment_required
                      - pending_amount
                      - payment_info
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - Authorization: []
components:
  schemas:
    PosPaymentMethodPayload:
      title: POSPaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/POSPaymentMethodPayload
        description: API reference for the POSPaymentMethodPayload schema
      oneOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/PosManualPaymentMethodCheckout'
    OrderPayment:
      title: OrderPayment
      description: Order Payment
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/OrderPayment
        description: API reference for the OrderPayment schema
      oneOf:
        - $ref: '#/components/schemas/CardPayment'
        - $ref: '#/components/schemas/NetbankingPayment'
        - $ref: '#/components/schemas/UpiPayment'
        - $ref: '#/components/schemas/WalletPayment'
        - $ref: '#/components/schemas/BankTransfer'
        - $ref: '#/components/schemas/NachPayment'
    JusPayHyperCheckoutResponse:
      title: JusPayHyperCheckoutResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckoutResponse
        description: API reference for the JusPayHyperCheckoutResponse schema
      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/storefront/schemas/JusPayExpressCheckoutResponse
        description: API reference for the JusPayExpressCheckoutResponse schema
      required:
        - txn_id
        - txn_uuid
        - status
        - order_id
        - juspay
        - offer_details
        - 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
    JusPayHyperCheckout:
      title: JusPayHyperCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckout
        description: API reference for the JusPayHyperCheckout schema
      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
        return_url:
          description: >-
            The URL to which the customer will be redirected after the payment
            is complete.
          type: string
        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/storefront/schemas/JusPayExpressCheckout
        description: API reference for the JusPayExpressCheckout schema
      oneOf:
        - $ref: '#/components/schemas/JusPayNewCard'
        - $ref: '#/components/schemas/JusPaySavedCardToken'
        - $ref: '#/components/schemas/JuspayNetBanking'
        - $ref: '#/components/schemas/JuspayUpiCollect'
        - $ref: '#/components/schemas/JuspayUpiIntent'
    PosManualPaymentMethodCheckout:
      title: POSManualPaymentMethodCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/POSManualPaymentMethodCheckout
        description: API reference for the POSManualPaymentMethodCheckout schema
      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
    CardPayment:
      title: CardPayment
      description: Payments using credit card, debit card
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/CardPayment
        description: API reference for the CardPayment schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            card_number:
              description: "masked card number\r\ne.g. ************1111"
              type: string
            card_type:
              type: string
              enum:
                - Visa
                - Master Card
                - Rupay
                - American Express
    NetbankingPayment:
      title: NetbankingPayment
      description: Payments using payment gateway netbanking option.
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/NetbankingPayment
        description: API reference for the NetbankingPayment schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            bank_name:
              type: string
    UpiPayment:
      title: UpiPayment
      description: UPI Payment
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/UpiPayment
        description: API reference for the UpiPayment schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            upi_id:
              type: string
    WalletPayment:
      title: WalletPayment
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/WalletPayment
        description: API reference for the WalletPayment schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            wallet_name:
              type: string
    BankTransfer:
      title: BankTransfer
      description: Bank transfer payment - IMPS, NEFT, RTGS
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/BankTransfer
        description: API reference for the BankTransfer schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
        - type: object
          properties:
            bank_account_number:
              description: "masked account number\r\ne.g. ************1234"
              type: string
            bank_name:
              type: string
    NachPayment:
      title: NachPayment
      description: NACH mandate payment via LotusPay.
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/NachPayment
        description: API reference for the NachPayment schema
      allOf:
        - $ref: '#/components/schemas/PaymentInfo'
    JusPayNewCard:
      title: JusPayNewCard
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JusPayNewCard
        description: API reference for the JusPayNewCard schema
      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
            card_exp_month:
              type: string
            card_exp_year:
              type: string
            name_on_card:
              type: string
            card_security_code:
              type: string
          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/storefront/schemas/JusPaySavedCardToken
        description: API reference for the JusPaySavedCardToken schema
      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: >-
                Payment method of the card. Please check which payment method is
                supported by the gateway.
              type: string
              enum:
                - VISA
                - MASTER
                - RUPAY
                - AMEX
                - DINERS
                - DISCOVER
                - JCB
                - MAESTRO
            card_token:
              description: >-
                Token of the card. This is the token that is used to identify
                the card in the gateway.
              type: string
            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
          required:
            - save_to_locker
            - payment_method_type
            - payment_method
            - card_token
            - card_security_code
    JuspayNetBanking:
      title: JuspayNetBanking
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayNetBanking
        description: API reference for the JuspayNetBanking schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: NB
            payment_method:
              type: string
          required:
            - payment_method_type
            - payment_method
    JuspayUpiCollect:
      title: JuspayUpiCollect
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayUpiCollect
        description: API reference for the JuspayUpiCollect schema
      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
          required:
            - payment_method_type
            - payment_method
            - upi_vpa
    JuspayUpiIntent:
      title: JuspayUpiIntent
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayUpiIntent
        description: API reference for the JuspayUpiIntent schema
      allOf:
        - $ref: '#/components/schemas/JusPayExpressCheckoutCommonField'
        - type: object
          properties:
            payment_method_type:
              type: string
              const: UPI
            payment_method:
              type: string
              const: UPI_PAY
          required:
            - payment_method_type
            - payment_method
    PaymentInfo:
      title: PaymentInfo
      description: Common fields in all types of payments.
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/PaymentInfo
        description: API reference for the PaymentInfo schema
      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
        payment_date:
          type: string
          format: date-time
        payment_reference_number:
          type:
            - string
            - 'null'
        payment_method:
          type:
            - string
            - 'null'
        icon_url:
          type:
            - string
            - 'null'
    JusPayExpressCheckoutCommonField:
      title: JusPayExpressCheckoutCommonField
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckoutCommonField
        description: API reference for the JusPayExpressCheckoutCommonField schema
      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
        return_url:
          description: >-
            The URL to which the customer will be redirected after the payment
            is complete.
          type: string
  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
    Unauthorized:
      description: Not authorized for given operation on the Resource
      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
    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
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````