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).4. S2S Card Payment
Server-to-server card payment flow with 3D Secure authentication. For new cards, the system initiates 3D Secure verification and returns an ACS template that must be rendered on the client side to complete authentication. Card details are securely processed and can be tokenized using the Save Card API after successful payment.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_payment
ors2s
)mop_type
: Method of payment (UPI
,CREDIT_CARD
,DEBIT_CARD
,NET_BANKING
,QR
)upi_flow_type
: UPI flow type (intent
orcollection
) - required when using S2S with UPIvpa
: Virtual Payment Address - required whenupi_flow_type
iscollection
upi_app_name
: Preferred UPI app - optional, defaults toothers
return_url
: URL to redirect after payment completioninvoice
: Invoice details objectcard_details
: Card information object - required whenmop_type
isCREDIT_CARD
orDEBIT_CARD
Card Payment Specific Parameters
When using card payments (mop_type
is CREDIT_CARD
or DEBIT_CARD
), additional buyer information is required:
buyer.ip_address
: Customer’s IP address (required for fraud prevention)buyer.user_agent
: Customer’s browser user agent (required for fraud prevention)
Card Details Options
You can provide card information in two ways:-
New Card Details (for first-time payments):
- Include full card information:
number
,cardholder_name
,expiry_month
,expiry_year
,cvv
,network
- Required for new cards not previously saved
- Use the Save Card API after successful payment to tokenize for future use
- Include full card information:
-
Saved Card Token (for repeat payments):
- Use
token
: Previously saved card token from the Save Card API - Include
identifier
: Customer identifier used when saving the card - Include
network
: Card network (VISA, MASTERCARD, etc.) - No sensitive card data required - token handles authentication
- Use
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
S2S Card Payment Response
For S2S Card Payment mode, the response includes:order_id
: Unique order identifieracs_template
: Base64-encoded HTML template for 3D Secure authentication
acs_template
must be decoded from Base64 and rendered in the customer’s browser to complete the 3D Secure authentication process.
Examples
Response Examples
Implementation Notes
UPI Payments
- S2S UPI Intent: The response includes a UPI intent link that can be used to open UPI apps directly
- S2S UPI Collection: A payment request is sent to the provided VPA, and the customer receives a notification
- UPI App Optimization: The
upi_app_name
parameter helps optimize the intent link for specific UPI applications - VPA Format: Must follow the pattern
username@bank
(e.g.,user@paytm
,9876543210@ybl
)
Card Payments
- 3D Secure Flow: For new cards, the system initiates 3D Secure verification
- ACS Template Processing:
- Decode the Base64
acs_template
from the response - Render the decoded HTML in the customer’s browser
- The form will auto-submit to complete 3D Secure authentication
- Customer will be redirected back to your
return_url
after authentication
- Decode the Base64
- Card Tokenization: Use the Save Card API after successful payment to securely tokenize cards for future use
- Saved Card Usage: Use previously saved card tokens for faster, more secure repeat payments
- Fraud Prevention:
ip_address
anduser_agent
are required for fraud detection and prevention
New vs Saved Cards
- New Cards: Require full card details and may trigger 3D Secure authentication
- Saved Cards: Use tokens for faster processing, reduced 3D Secure requirements, and enhanced security
- Token Benefits: No sensitive data exposure, faster checkout, improved conversion rates
Security Considerations
- Card Data: Never log or store card details in your application
- 3D Secure: Always implement proper 3D Secure handling for card payments
- Token Management: Use the Card Token APIs for managing saved cards
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
application/json
Order creation request
Amount in decimal format (e.g., "100.00")
3-letter ISO currency code (e.g., INR, USD)
Unique identifier for the order
URL to redirect after payment
Payment collection mode
Available options:
hosted_payment
, s2s
Method of payment type (e.g., UPI)
Available options:
UPI
, CREDIT_CARD
, NETBANKING
, DEBIT_CARD
, QR
UPI flow type (required when collection_mode is s2s and mop_type is UPI)
Available options:
intent
, collection
Virtual Payment Address (required when upi_flow_type is collection)
UPI app name (optional, defaults to 'others')
Available options:
bhim
, paytm
, google_pay
, phonepe
, cred
, amazon_pay
, whatsapp
, others