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

> To generate new payment request if first payment request is failed or expired. Retry payment request can be made after 15 mins of last request or immediately after last payment request is marked as failed.



## OpenAPI

````yaml post /orders/{order_number}/retry-payment
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:
  /orders/{order_number}/retry-payment:
    post:
      tags:
        - Orders
      summary: Retry payment
      description: >-
        To generate new payment request if first payment request is failed or
        expired. Retry payment request can be made after 15 mins of last request
        or immediately after last payment request is marked as failed.
      operationId: retry-order-payment
      parameters:
        - name: order_number
          in: path
          description: order number
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                payment_method:
                  $ref: '#/components/schemas/PaymentMethodPayload'
      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:
                        oneOf:
                          - $ref: '#/components/schemas/JusPayHyperCheckoutResponse'
                          - $ref: '#/components/schemas/JusPayExpressCheckoutResponse'
                          - $ref: '#/components/schemas/PayuPaymentInfo'
                    required:
                      - payment_info
                    type: object
          links:
            PollRetryPaymentStatus:
              operationId: 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'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/operations/retry-order-payment
        description: API reference for the retry-order-payment operation
components:
  schemas:
    PaymentMethodPayload:
      title: PaymentMethodPayload
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/PaymentMethodPayload
        description: API reference for the PaymentMethodPayload schema
      oneOf:
        - $ref: '#/components/schemas/JusPayHyperCheckout'
        - $ref: '#/components/schemas/JusPayExpressCheckout'
        - $ref: '#/components/schemas/BankTransferCheckout'
        - $ref: '#/components/schemas/LotusPayCheckout'
    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
    PayuPaymentInfo:
      title: PayuPaymentInfo
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/PayuPaymentInfo
        description: API reference for the PayuPaymentInfo schema
      properties:
        key:
          type: string
        txnid:
          type: string
        amount:
          type: number
          format: double
        productinfo:
          type: string
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
        phone:
          type: string
        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: Send this json object for creating subscription consent.
          type: object
          properties:
            billingAmount:
              description: Maximum amount that can be charged in recurring payment.
              type: number
              format: double
            billingCurrency:
              type: string
              const: INR
            billingCycle:
              description: Subscription frequency.
              type: string
              const: MONTHLY
            billingInterval:
              description: >-
                Billing Interval is closely coupled with the billingCycle field
                and denotes at what frequency, the subscription plan needs to be
                executed. For monthly subscriptions, parameter values need to be
                sent in the request are:

                billingCycle = MONTHLY

                billingInterval = 1

                Similarly, by keeping the following values, customer will be
                charged once in every 3 days:

                billingCycle = DAILY

                billingInterval = 3
              type: integer
            paymentStartDate:
              description: subscription start date
              type: string
              format: date
            paymentEndDate:
              description: subscription end date
              type: string
              format: date
        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/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'
    BankTransferCheckout:
      title: BankTransferCheckout
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/BankTransferCheckout
        description: API reference for the BankTransferCheckout schema
      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
    LotusPayCheckout:
      title: LotusPayCheckout
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/LotusPayCheckout
        description: API reference for the LotusPayCheckout schema
      required:
        - payment_provider_slug
        - payment_method_type
        - mandate_id
      properties:
        payment_provider_slug:
          description: The slug of the payment provider in Commerce Engine.
          type: string
          const: juspay
        payment_method_type:
          type: string
          const: NACH
        mandate_id:
          description: The ID of the active mandate.
          type: string
    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
    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
              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

````