Skip to main content

Create Order & Initiate UPI S2S Payment

Use the Create Order API to generate a new payment order. Once the order is created successfully, use the returned x_order_id to initiate a UPI S2S payment. The UPI S2S flow allows you to initiate a UPI transaction and receive a UPI intent URL and QR code in the API response.

Payment Flow

  1. Create an order using the Create Order API.
  2. Extract x_order_id from the successful response.
  3. Call the Initiate Payment API with the x_order_id and UPI payment method.
  4. Extract intent_url from the response.
  5. Redirect the customer to the UPI intent URL or display the QR code.
  6. Verify the final transaction status using the Order Status API.

Step 1: Create Order

Endpoint

Create the order using the standard authentication headers and required order details. Refer to:

Example Success Response

Important: Store the returned x_order_id. This ID is required for the next API call.

Step 2: Initiate UPI S2S Payment

After creating the order, extract the x_order_idfrom the Create Order API response and pass it to the Initiate Payment API.

Endpoint

The endpoint above is illustrative. Use the actual Initiate Payment endpoint provided in your API environment.

Request Parameters

Example Request Body

Example cURL Request

Use the authentication and signature-generation process specified in the API documentation.

Step 3: Example Success Response

The Initiate Payment API returns transaction details, the transaction status, and the UPI payment information.
Note: All response values above are illustrative demo values. The intent_url and QR code are examples only and are not guaranteed to initiate a real payment.

Step 4: Redirect Customer to UPI

Extract intent_url from the Initiate Payment API response.
For mobile applications, open the returned UPI intent URL using the platform’s supported deep-link handling mechanism. Alternatively, display the returned qr URL as a QR code so the customer can scan it using a UPI application.

Example UPI Intent URL

The actual intent_url must always be taken from the API response. Do not construct a production payment intent using demo values.

Step 5: Transaction Status Handling

The txn_status returned by the Initiate Payment API indicates the transaction status at that point in time. The statuses listed above are illustrative; confirm the supported status values with the Order Status API documentation. Important: A successful initiation response does not mean the payment has been completed. Always verify the final transaction status using the Order Status API and process webhook notifications according to the integration guidelines.

Important Notes

  • Create the order before initiating the UPI payment.
  • Use the exact x_order_id returned by the Create Order API.
  • Send payment_method.upi.channel as app for this flow.
  • Generate authentication signatures on the server side.
  • Use the actual API endpoint and environment-specific credentials.
  • Treat intent_url, QR code, and transaction identifiers returned by the API as dynamic values.
  • Do not mark an order as paid solely because the initiation API returned status: true.
  • Verify the final payment status server-side before fulfilling the order.