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 returnedx_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
- Create an order using the Create Order API.
- Extract
x_order_idfrom the successful response. - Call the Initiate Payment API with the
x_order_idand UPI payment method. - Extract
intent_urlfrom the response. - Redirect the customer to the UPI intent URL or display the QR code.
- Verify the final transaction status using the Order Status API.
Step 1: Create Order
Endpoint
Example Success Response
x_order_id. This ID is required for the next API call.
Step 2: Initiate UPI S2S Payment
After creating the order, extract thex_order_idfrom the Create Order API response and pass it to the Initiate Payment API.
Endpoint
Request Parameters
Example Request Body
Example cURL Request
Step 3: Example Success Response
The Initiate Payment API returns transaction details, the transaction status, and the UPI payment information.intent_url and QR code are examples only and are not guaranteed to initiate a real payment.
Step 4: Redirect Customer to UPI
Extractintent_url from the Initiate Payment API response.
qr URL as a QR code so the customer can scan it using a UPI application.
Example UPI Intent URL
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
Thetxn_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_idreturned by the Create Order API. - Send
payment_method.upi.channelasappfor 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.
