Skip to main content

Create Order

Basic Info

Base Url
End point/v2/order
Request methodPOST

Try request

You can play around with create order API through our postman collection.

Go to payment-gateway > order > V2 - Order - Create to test the request.

Please remember to switch the environment to zoksh-testnet

Postman Interface

Request Body

Example order post body
"prefill": {
"name": "Demo User",
"phone": "9901010101",
"email": ""
"amount": ".05",
"fiat": "USD",
"label": "Pay now",
"merchant": {
"desc": "Description for the product",
"extra": "Any meta information you would like to attach with order",
"orderId": "your_order_id_here"

Request body options

  1. prefill - prefill the payment form with information if available, allowed fields are

    a. name

    b. phone

    c. email

  2. fiat - Currently only fiat value supported is USD, if you specify amount in token, then this parameter is not required.

  3. amount - Amount to be paid by end user, if fiat is specified, end user pays equivalent tokens available for the merchants, else in the token specified.

  4. token - e.g. BNB all available chains where BNB or BNB contracts are available for merchant becomes available as payment options.

  5. preferredCurrency - specify token which should be first option for payment for user. Other tokens if possible'll still be available for payment.

  6. mandatoryCurrency - Ask user to make payment only in the mandatory currency, no other currency options are available.

  7. preferredChain - Preferred chain becomes default selected chain for payment

  8. mandatoryChain - Chain Id, Mandatory chain is the only chain available during payment.

  9. label - Label to show on the payment button, defaults to Pay now

  10. merchant - Merchant fields, specified fields are returned during the webhook calls, You may use it to cross reference payment with your local order

    a. desc - Description you want to show for the order

    b. extra - String values, could be anything, generally a JSON encoded string that you can use later with webhook call

    c. orderId - Mandatory field, order id mapped to your system.

  11. product - If you have created any product on Zoksh merchant dashboard, that you can use that here to fill in product details. Please note, if amount is specified, it ll override price for the product, else the product price ll be used.

  12. disableFiat - Boolean value, Disable payment with credit card, defaults to false

  13. disabledChains - String array of chain ids, Disable payment on particular chains, defaults to empty array

  14. disabledTokens - String array of tokens, Disable payment on particular token, defaults to empty array

  15. rampConfig - Configuration for fiat payment methods. a. preferredPaymentMethods - Array of preferred payment methods, that you would like to be prioritized, e.g. ['upi', 'ideal']. These payment methods will be selected on the UI automatically, if and when possible.

Response Sample

"orderId": "6239b4e6dee99a8812d203c9",
"createdAt": 1647949030637,
"url": ""

Use the orderId returned from API call in the UI to initiate Payment workflow.