Create an order
POST
/orders
orders
Request
Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json
id
string
optional
Example:
your_order_id
app_execution_id
string
optional
Example:
app_exec_1234
type
enum<string>
optional
Allowed values:
physical_goodsdigital_goods
contact
object (Contact)
optional
name
string
optional
Example:
Alfred Hitchcock
email
string
optional
Example:
alfred@example.com
phone_number
string
required
Example:
+19019019191 or +919876543210
items
array[object (LineItem) {4}]
optional
name
string
optional
Example:
Product 1
amount
integer
optional
Example:
12000
quantity
integer
optional
Example:
2
sale_amount
integer
optional
Example:
12000
expiration
object (OrderExpiry)
optional
timestamp
integer
optional
Example:
1711929600
description
string
optional
Example:
Sorry, the event is booked.
currency
enum<string>
optional
Allowed value:
INR
subtotal
integer
optional
Example:
12380
tax
object
optional
value
integer
optional
Example:
1200
description
string
optional
Example:
GST
shipping
object
optional
value
integer
optional
Example:
15000
description
string
optional
Example:
Prime shipping
discount
object
optional
value
integer
optional
Example:
1000
description
string
optional
Example:
10OFF on first purchase
total_amount
integer
optional
Example:
200
Example
{
"id": "your_order_id",
"app_execution_id": "app_exec_1234",
"type": "physical_goods",
"contact": {
"name": "Alfred Hitchcock",
"email": "alfred@example.com",
"phone_number": "+19019019191 or +919876543210"
},
"items": [
{
"name": "Product 1",
"amount": 12000,
"quantity": 2,
"sale_amount": 12000
}
],
"expiration": {
"timestamp": 1711929600,
"description": "Sorry, the event is booked."
},
"currency": "INR",
"subtotal": 12380,
"tax": {
"value": 1200,
"description": "GST"
},
"shipping": {
"value": 15000,
"description": "Prime shipping"
},
"discount": {
"value": 1000,
"description": "10OFF on first purchase"
},
"total_amount": 200
}
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 '/orders' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢201Created
application/json
Body
id
string
optional
Example:
your_order_id
app_execution_id
string
optional
Example:
app_exec_1234
type
enum<string>
optional
Allowed values:
physical_goodsdigital_goods
contact
object (Contact)
optional
name
string
optional
Example:
Alfred Hitchcock
email
string
optional
Example:
alfred@example.com
phone_number
string
required
Example:
+19019019191 or +919876543210
items
array[object (LineItem) {4}]
optional
name
string
optional
Example:
Product 1
amount
integer
optional
Example:
12000
quantity
integer
optional
Example:
2
sale_amount
integer
optional
Example:
12000
expiration
object (OrderExpiry)
optional
timestamp
integer
optional
Example:
1711929600
description
string
optional
Example:
Sorry, the event is booked.
currency
enum<string>
optional
Allowed value:
INR
subtotal
integer
optional
Example:
12380
tax
object
optional
value
integer
optional
Example:
1200
description
string
optional
Example:
GST
shipping
object
optional
value
integer
optional
Example:
15000
description
string
optional
Example:
Prime shipping
discount
object
optional
value
integer
optional
Example:
1000
description
string
optional
Example:
10OFF on first purchase
total_amount
integer
optional
Example:
200
Example
{
"id": "your_order_id",
"app_execution_id": "app_exec_1234",
"type": "physical_goods",
"contact": {
"name": "Alfred Hitchcock",
"email": "alfred@example.com",
"phone_number": "+19019019191 or +919876543210"
},
"items": [
{
"name": "Product 1",
"amount": 12000,
"quantity": 2,
"sale_amount": 12000
}
],
"expiration": {
"timestamp": 1711929600,
"description": "Sorry, the event is booked."
},
"currency": "INR",
"subtotal": 12380,
"tax": {
"value": 1200,
"description": "GST"
},
"shipping": {
"value": 15000,
"description": "Prime shipping"
},
"discount": {
"value": 1000,
"description": "10OFF on first purchase"
},
"total_amount": 200
}
🟠422Parameter Error
Modified at 2025-04-02 04:39:19