> ## 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 in juspay

> Creates an order in the Juspay system and fetches the corresponding client_auth_token.
To be used for Express Checkout integration.



## OpenAPI

````yaml post /payments/juspay/create-order
openapi: 3.1.0
info:
  version: '1.0'
  title: CE Storefront APIs
  summary: Customer-facing e-commerce API for building exceptional shopping experiences
  description: >-
    Public-facing API for Commerce Engine storefronts, enabling seamless
    shopping experiences with product browsing, cart management, checkout
    processing, user accounts, and order tracking. Perfect for building web,
    mobile, and headless commerce applications.
  contact:
    name: Support
    email: support@commercengine.io
    url: https://www.commercengine.io/contact-us
  license:
    url: https://www.commercengine.io/contact-us
    name: All Rights Reserved
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: []
tags:
  - name: Analytics
    description: Analytics
  - name: Auth
    description: auth
  - name: Campaigns
    description: Campaigns
  - name: Carts
    description: Carts
  - name: Catalog
    description: Catalog
  - name: Common
    description: Common
  - name: Coupons & promotions
    description: Coupons & promotions
  - name: Customers
    description: Customers
  - name: Juspay
    description: Juspay Payments
  - name: KYC
    description: KYC
  - name: Marketplace
    description: Marketplace
  - name: Orders
    description: Orders
  - name: Others
    description: Others
  - name: Payments
    description: Payments
  - name: PayU
    description: PayU Payments
  - name: POS
    description: POS
  - name: Shipping
    description: Shipping
  - name: Store
    description: Store
  - name: Subscriptions
    description: Subscriptions
externalDocs:
  url: https://llm-docs.commercengine.io
  description: Commerce Engine API Reference Documentation
paths:
  /payments/juspay/create-order:
    post:
      tags:
        - Juspay
      summary: Create order in juspay
      description: >-
        Creates an order in the Juspay system and fetches the corresponding
        client_auth_token.

        To be used for Express Checkout integration.
      operationId: create-juspay-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JuspayCreateOrderPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      data:
                        $ref: '#/components/schemas/JuspayOrder'
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/operations/create-juspay-order
        description: API reference for the create-juspay-order operation
components:
  schemas:
    JuspayCreateOrderPayload:
      title: JuspayCreateOrderResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/JuspayCreateOrderPayload
        description: API reference for the JuspayCreateOrderPayload schema
      properties:
        order_number:
          type: string
        return_url:
          type: string
    JuspayOrder:
      title: JuspayOrder
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/JuspayOrder
        description: API reference for the JuspayOrder schema
      properties:
        id:
          type: string
        udf10:
          type: string
        udf9:
          type: string
        udf8:
          type: string
        udf7:
          type: string
        udf6:
          type: string
        udf5:
          type: string
        udf4:
          type: string
        udf3:
          type: string
        udf2:
          type: string
        udf1:
          type: string
        status_id:
          type: string
        status:
          type: string
        return_url:
          type: string
        refunded:
          type: boolean
          default: false
        product_id:
          type: string
        payment_links:
          type: object
          properties:
            web:
              type: string
            mobile:
              type: string
            iframe:
              type: string
        order_id:
          type: string
        merchant_id:
          type: string
        juspay:
          type: object
          properties:
            client_auth_token:
              type: string
            client_auth_token_expiry:
              type: string
        date_created:
          type: string
        customer_phone:
          type: string
        customer_id:
          type: string
        customer_email:
          type: string
        currency:
          type: string
        amount_refunded:
          type: number
          format: double
        amount:
          type: number
          format: double
  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
              error:
                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

````