Create an Order
Create an Order using Razorpay Orders API.
Request Parameters
29900 in this field. In the case of three decimal currencies, such as KWD, BHD and OMR, to accept a payment of 295.991, pass the value as 295990. And in the case of zero decimal currencies such as JPY, to accept a payment of 295, pass the value as 295."note_key": "Beam me up Scotty”.Response Parameters
29500.order.created: When you create an order it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.
"note_key": "Beam me up Scotty”.Errors
Authentication failed.
Authentication failed.
400The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:- Different keys for test mode and live modes.
- Expired API key.
The amount must be at least INR 1.00.
The amount must be at least INR 1.00.
400The amount specified is less than the minimum amount. Currency subunits, such as paise (in the case of INR), should always be greater than 100.Solution: Enter an amount equal to or greater than the minimum amount, that is 100.The field name is required.
The field name is required.
400A mandatory field is missing.Solution: Ensure all mandatory fields and values are present.amount: must be no less than 0.
amount: must be no less than 0.
400A negative amount was sent in the request body.Solution: amount must be a non-negative integer.The amount must be an integer.
The amount must be an integer.
400amount was sent as a string, float or other non-integer type.Solution: Pass amount as a JSON integer (for example, 100, not "100" or 100.0).Amount exceeds maximum amount allowed.
Amount exceeds maximum amount allowed.
400amount exceeds the per-order maximum configured for the account or currency.Solution: Check your account-level transaction limit. For large orders, split into multiple smaller orders or contact Razorpay support to raise the limit.currency: validation_failure: BAD_REQUEST_INVALID_CURRENCY.
currency: validation_failure: BAD_REQUEST_INVALID_CURRENCY.
400An unsupported currency value was sent (for example, XYZ) or a currency that is not enabled for your account.Solution: Use a supported ISO-4217 currency code. To accept currencies other than your default, enable International payments under Account & Settings on the Razorpay Dashboard.receipt: the length must be no more than 40.
receipt: the length must be no more than 40.
400receipt value exceeds 40 characters.Solution: Keep receipt to 40 characters or fewer. Use an internal short id or hash if your reference is longer.The receipt: validation_failure: BAD_REQUEST_ENCODING_VALIDATION_FAILED.
The receipt: validation_failure: BAD_REQUEST_ENCODING_VALIDATION_FAILED.
400receipt contains characters outside the supported encoding (for example, emoji or non-ASCII characters).Solution: Use only ASCII characters in receipt. Restrict to alphanumerics, underscores and hyphens for maximum compatibility.first_payment_min_amount should be greater than or equal to 0.
first_payment_min_amount should be greater than or equal to 0.
400first_payment_min_amount was set to a negative value while partial_payment: true.Solution: Use a first_payment_min_amount that is greater than or equal to 0 and less than or equal to amount.EOF.
EOF.
400The request body is malformed JSON. It may be truncated, missing a closing brace or otherwise unparseable.Solution: Ensure the request body is valid JSON. Validate locally with jq . or a JSON linter before sending.Duplicate request. This request has already been processed.
Duplicate request. This request has already been processed.
400An order with the same receipt value has already been created on this account. receipt is treated as an idempotency key, so a second create call with the same value is rejected.Solution: Use a unique value for receipt on every order, or fetch the existing order created with the same receipt and reuse it.Request failed because another order operation is in progress.
Request failed because another order operation is in progress.
400A concurrent create or update is already running against this order. Razorpay locks the order to prevent state corruption.Solution: Wait a few seconds and retry. If the issue persists, fetch the order to confirm its current state before retrying.Bank code provided is invalid.
Bank code provided is invalid.
400For TPV (third-party validation) orders, the bank value passed is not a recognised IFSC bank code.Solution: Pass a valid 4-letter bank code (for example, HDFC, ICIC). See the supported bank codes in the Razorpay Dashboard.The requested bank is not enabled for the merchant.
The requested bank is not enabled for the merchant.
400For TPV orders, the bank passed is valid but not enabled on your account.Solution: Contact Razorpay support to enable the requested bank for your account, or pass a bank that is already enabled.Bank code should be provided in input if account number is sent.
Bank code should be provided in input if account number is sent.
400For TPV orders, an account_number was passed without the accompanying bank field.Solution: Always pass bank alongside account_number for TPV orders.Account number is mandatory for this merchant.
Account number is mandatory for this merchant.
400Your account is configured to require an account_number on every order (TPV-enforced merchants), but the field is missing from the request.Solution: Include account_number in the order create request.