Skip to content

Create an order

POST
/api/v1/business/website/order/

Create an order from the logged-in shopper's cart (cart is cleared on success), or from an explicit items array — which is required for guest checkout. Coupons are applied when coupon_code is given; otherwise the best auto-apply offer is used. Plain COD orders get payment_status: NOT_APPLICABLE; anything with a transaction or advance starts as PENDING.

Authorizations

apiKey

Your business API key (sb_live_*) — identifies which store the request is for. Required on every /api/v1/business/website/ request.

Type
API Key (header: X-Periscale-Key)
or
apiKey|shopperToken
apiKey

Your business API key (sb_live_*) — identifies which store the request is for. Required on every /api/v1/business/website/ request.

Type
API Key (header: X-Periscale-Key)
+
shopperToken

The shopper's access token from the shopper authentication endpoints. Required for cart, checkout, orders, and account actions.

Type
HTTP (bearer)

Request Body

application/json
JSON
{
  
"receiver_name": "string",
  
"phone": "string",
  
"address": "string",
  
"delivery_fee": 0,
  
"currency": "string",
  
"payment_method": "COD",
  
"delivery_location": "inside_dhaka",
  
"email": "string",
  
"coupon_code": "string",
  
"items": [
  
  
{
  
  
  
"product_id": 0,
  
  
  
"unit_price": 0,
  
  
  
"quantity": 1,
  
  
  
"variant_id": 0,
  
  
  
"added_via": "string"
  
  
}
  
],
  
"advance_amount": 0,
  
"advance_payment_method": "string",
  
"advance_transaction_id": "string",
  
"payment_transaction_id": "string",
  
"subscribe_items": [
  
  
{
  
  
  
"product_id": 0,
  
  
  
"variant_id": 0,
  
  
  
"quantity": 0
  
  
}
  
],
  
"subscribe_interval": "monthly"
}

Responses

Order created.

application/json
JSON
{
  
"status": true,
  
"status_code": 0,
  
"message": "string",
  
"data": {
  
  
"order": "string"
  
}
}

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI

© Periscale