Create Order
Overview
The Create Order endpoint is the first step in the payment flow. It creates a new order with all the necessary details including buyer information, product details, and payment preferences. After creating an order successfully, you’ll receive asession_id and order_id. Use the session_id to redirect the customer to the payment gateway for completing the transaction.
Payment Collection Modes
EximPe supports multiple payment collection modes:1. Hosted Payment (Default)
The standard hosted payment flow where customers are redirected to EximPe’s secure payment page.2. S2S UPI Intent
Server-to-server UPI intent flow that generates a UPI intent link for direct app-to-app payments.3. S2S UPI Collection
Server-to-server UPI collection flow that sends a payment request directly to the customer’s VPA (Virtual Payment Address).Request Parameters
Required Parameters
amount: Payment amount in decimal formatcurrency: 3-letter ISO currency code (e.g., INR)reference_id: Unique identifier for the orderbuyer: Buyer details objectproduct: Product details object
Optional Parameters
collection_mode: Payment collection mode (hosted_paymentors2s)mop_type: Method of payment (UPI,CREDIT_CARD,DEBIT_CARD,NET_BANKING,QR)upi_flow_type: UPI flow type (intentorcollection) - required when using S2S with UPIvpa: Virtual Payment Address - required whenupi_flow_typeiscollectionupi_app_name: Preferred UPI app - optional, defaults toothersreturn_url: URL to redirect after payment completioninvoice: Invoice details object
Response
Hosted Payment Response
For hosted payment mode, the response includes:session_id: Use this to redirect customers to the payment pageorder_id: Unique order identifier
S2S UPI Intent Response
For S2S UPI Intent mode, the response includes:order_id: Unique order identifierintent_uri: UPI intent link that can be used to open UPI apps directly
S2S UPI Collection Response
For S2S UPI Collection mode, the response includes:order_id: Unique order identifiermessage: Confirmation message about the collection request sent to the VPA
Examples
Response Examples
Notes
- For S2S UPI Intent: The response will include a UPI intent link that can be used to open UPI apps directly
- For S2S UPI Collection: A payment request will be sent to the provided VPA, and the customer will receive a notification
- The
upi_app_nameparameter helps optimize the intent link for specific UPI applications - VPA format must follow the pattern:
username@bank(e.g.,user@paytm,9876543210@ybl)
Authorizations
Client app ID. You can find your app id in the merchant dashboard.
Client secret key. You can find your secret in the merchant dashboard.
Merchant ID. You can find your merchant ID in the merchant section of the merchant dashboard.
Body
Order creation request
Amount in decimal format (e.g., "100.00")
^\d+\.\d{2}$3-letter ISO currency code (e.g., INR, USD)
^[A-Z]{3}$Unique identifier for the order
URL to redirect after payment
Payment collection mode
hosted_payment, s2s Method of payment type (e.g., UPI)
UPI, CREDIT_CARD, NETBANKING, DEBIT_CARD, QR UPI flow type (required when collection_mode is s2s and mop_type is UPI)
intent, collection Virtual Payment Address (required when upi_flow_type is collection)
^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+$UPI app name (optional, defaults to 'others')
bhim, paytm, google_pay, phonepe, cred, amazon_pay, whatsapp, others