Enkash Developer Portal
Home
Home
Login
  1. Order
  • Back to home
  • Payment Gateway APIs
  • Authorisation
    • Get Authorization Token
  • Order
    • Create Order
      POST
    • Get Order Status
      GET
    • Get Order By Merchant Order Id
      GET
    • Get BNPL Payment Methods
      GET
    • Get Dynamic UPI QR
      GET
    • UPI Intent Links
      GET
  • Payment
    • Submit Payment Request
    • Get Transaction Status
    • Validate OTP
    • Resend OTP
    • Payment Notify Request
    • Get UPI Transaction Status
    • Verify UPI VPA
  • Refund
    • Refund
  • Settlement
    • Get Settlement Payout By ID
    • Search Settlement Payouts
  • Split Settlement
    • Create Split Settlement Account
    • Update Split Settlement Account
    • Get All Split Settlement Account
    • Deactivate Split Settlement Account
    • Activate Split Settlement Account
    • Submit Payment with Split Details
    • Edit Or Deferred Split Settlement
  • E-Commerce Plugins
  • UPI QR
    • Create UPI QR
    • Get UPI QR
    • Search UPI QR
    • Create Customer
    • Search Customer
    • Cancel UPI QR
  • UPI Autopay
    • Create UPI Mandate
    • Update UPI Mandate
    • Revoke UPI Mandate
    • Get UPI Mandate
    • UPI Mandate Callback
    • Mandate Pre-debit Notification
    • Execute Mandate Debit
    • Mandate Debit Callback
  • Payment Links
    • Payment Link APIs
    • Create Payment Link
    • Get Payment Link Details
    • Delete Payment Link
    • Webhook Request
  1. Order

Create Order

POST
/api/v0/orders
order-controller
📌
Use this API to create an order. The generated order acts as a prerequisite for initiating a transaction and collecting payments, enabling a seamless and secure payment flow within your application.

Request

Header Params
merchantAccessKey
string 
required
Authorization
string 
required
Body Params application/json
orderId
string 
required
A unique identifier for the order in your system. Accepts alphanumeric characters only.
amount
object (Amount) 
required
This specifies the amount for the order, allowing up to two decimal places. For example, 20.15 would represent Rs 20 and 15 paisa.
value
number 
required
>= 0.01
currency
enum<string> 
required
Allowed value:
INR
returnUrl
string 
optional
The URL to which the customer will be redirected after completing the payment. returnUrl is required if not configured at merchant level
notifyUrl
string 
optional
The URL where notifications regarding the order will be sent. notifyUrl is required if not configured at merchant level
customerInfo
object (CustomerDetail) 
optional
Information about the customer associated with the order. It typically includes details such as first name, last name, address, email, and phone number.
firstName
string 
optional
The first name of the customer. Accepts alphabetic characters.
lastName
string 
optional
The last name of the customer. Accepts alphabetic characters.
address
object (Address) 
optional
The address of the customer. Accepts alphanumeric characters and special symbols.
email
string 
optional
The email address of the customer. Must be in a valid email format.
phoneNumber
string 
optional
The phone number of the customer. Please exclude +91 ISD code.
customParameters
object 
optional
Additional custom parameters or metadata associated with the order, if any. These will be key value pairs.
Additional properties
string 
optional
description
string 
optional
paymentDetail
object (OrderPaymentDetail) 
optional
Payment related information for UPI TPV flow
accountNumber
string 
optional
Required for UPI TPV flow for non seamless integration
>= 9 characters<= 36 characters
ifsc
string 
optional
Required for UPI TPV flow for non seamless integration
>= 11 characters<= 11 characters
Example:
KKBK0000432
Match pattern:
^[A-Z]{4}0[A-Z0-9]{6}$
restrictedPaymentOptions
object 
optional

restrictedPaymentOptions is to restrict payment options on check for this order, this field a map containg paymentMode as key and List as value.
NETBANKING: List of Netbanking codes
CREDIT_CARD: List of card scheme, ex: ["MASTERCARD","VISA","RUPAY","DINERS","AMEX"]
DEBIT_CARD: List of card scheme, ex: ["MASTERCARD","VISA","RUPAY","DINERS","AMEX"]
PREPAID_CARD: List of card scheme, ex: ["MASTERCARD","VISA","RUPAY","DINERS","AMEX"]
CORPORATE_CARD: List of card scheme, ex: ["MASTERCARD","VISA","RUPAY","DINERS","AMEX"]
UPI: null
WALLET: List of wallet codes

Example
{
    "orderId": "RANDOMID123",
    "amount": {
        "value": 100.00,
        "currency": "INR"
    },
    "returnUrl": "https://glaring-version.net/",
    "notifyUrl": "https://inconsequential-annual.biz/",
    "customerInfo": {
        "firstName": "Merlin",
        "lastName": "Collins",
        "address": {
            "streetName": "Jill Zemlak",
            "city": "Darioside",
            "state": "Minnesota",
            "country": "Angola",
            "zipcode": "06422"
        },
        "email": "Emmitt37@yahoo.com",
        "phoneNumber": "9889890909"
    },
    "customParameters": {
        "customParam1": "value",
        "customParam2": "value2"
    },
    "description": "Order description",
    "restrictedPaymentOptions": {
        "UPI": null,
        "NET_BANKING" : ["NB001"],
        "CREDIT_CARD" : ["MASTERCARD"]
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v0/orders' \
--header 'merchantAccessKey;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "orderId": "RANDOMID123",
    "amount": {
        "value": 100.00,
        "currency": "INR"
    },
    "returnUrl": "https://glaring-version.net/",
    "notifyUrl": "https://inconsequential-annual.biz/",
    "customerInfo": {
        "firstName": "Merlin",
        "lastName": "Collins",
        "address": {
            "streetName": "Jill Zemlak",
            "city": "Darioside",
            "state": "Minnesota",
            "country": "Angola",
            "zipcode": "06422"
        },
        "email": "Emmitt37@yahoo.com",
        "phoneNumber": "9889890909"
    },
    "customParameters": {
        "customParam1": "value",
        "customParam2": "value2"
    },
    "description": "Order description",
    "restrictedPaymentOptions": {
        "UPI": null,
        "NET_BANKING" : ["NB001"],
        "CREDIT_CARD" : ["MASTERCARD"]
    }
}'

Responses

🟢200OK
application/json
Body
response_code
integer <int32>
optional
response_message
string 
optional
payload
object (OrderCreateResponse) 
optional
redirectionUrl
string 
optional
orderId
string 
optional
Example
{
    "response_code": 0,
    "response_message": "string",
    "payload": {
        "redirectionUrl": "string",
        "orderId": "string"
    }
}
Modified at 2025-06-26 13:37:10
Previous
Order
Next
Get Order Status
Built with