Skip to main content
PATCH
Available in🇮🇳 India🇺🇸 United States
Use this endpoint to update an Order.
  • You can modify an existing order to update the Notes field only.
  • Notes can be used to record additional information about the order.
  • A key-value store, the notes field can have a maximum of 15 key-value pairs, each of 256 characters (maximum).

Path Parameters

string
required
Unique identifier of the order in which the Notes field must be updated.

Request Parameters

json object
required
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Response Parameters

string
The unique identifier of the order.
integer
The amount for which the order was created, in currency subunits. For example, for an amount of , enter 29500.
string
Name of the entity. Here, it is order.
integer
The amount paid against the order.
integer
The amount pending against the order.
string
required
ISO code for the currency in which you want to accept the payment. The default length is 3 characters.
string
Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
string
The status of the order. Possible values:
  • created: When you create an order it is in the created state. It stays in this state till a payment is attempted on it.
  • attempted: An order moves from created to attempted state when a payment is first attempted on it. It remains in the attempted state till one payment associated with that order is captured.
  • paid: After the successful capture of the payment, the order moves to the paid state. No further payment requests are permitted once the order moves to the paid state. The order stays in the paid state even if the payment associated with the order is refunded.
integer
The number of payment attempts, successful and failed, that have been made against this order.
json object
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
integer
Indicates the Unix timestamp when this order was created.
object
Checkout configuration applied to this order, when the order was created with checkout-time options (theme, prefill, partial-payment settings).
string
A brief description of the order, used for display purposes.
string
Unique identifier of the offer associated with this order.

Errors

Code: 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.
Solution: The API keys must be active and entered correctly with no whitespace before or after the keys.
Code: 400The order_id passed is invalid.Solution: Use a valid order_id.
Code: 400The order_id does not exist or does not belong to the requestor.Solution: Ensure that you use a valid order_id that belongs to the requestor.
Code: 400PATCH /v1/orders/:id only allows updating the notes field. Sending amount, currency, receipt or any other immutable field is rejected.Solution: Include only the notes field in the PATCH request body. To change other order properties, create a new order.
Code: 400The notes object contains more than 15 key-value pairs.Solution: Limit notes to at most 15 key-value pairs.
Code: 400One of the keys inside the notes object exceeds the 255-character limit.Solution: Keep each notes key under 256 characters.
Code: 400One of the values inside the notes object exceeds the 512-character limit per value.Solution: Keep each notes value under 512 characters.
Code: 400A value inside notes was passed as a JSON array. Only scalar values (string, number, boolean) are accepted as values.Solution: Convert array values into strings (for example, a comma-separated list) before sending.