Order

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Create an e-commerce order for the authenticated customer. When a payment source or gateway token is supplied, the order is charged immediately; the response returns the created order under data.order. The customer is taken from the JWT.

Example:

curl --request POST \n  --url 'https://www.pelcro.com/api/v1/sdk/ecommerce/order?site_id=1232' \n  --header 'Authorization: Bearer <JWT>' \n  --header 'Content-Type: application/json' \n  --data '{
    "items": [{ "sku_id": 101, "quantity": 1 }],
    "payment_gateway": "stripe",
    "gateway_token": "tok_xxxxxxxxxxxx",
    "address_id": 55
  }'

Conditional Requirements

  • items is required — each entry needs sku_id and quantity (min 1), and each SKU must be eligible for the customer.
  • Pay with either a new card (payment_gateway + gateway_token) or an existing source_id.
  • address_id is required when the order contains shippable items or when e-commerce taxes are enabled; it must belong to the customer.
  • coupon_code and campaign_key are optional.
  • All SKUs in one order must share the same currency.
  • A declined card or an unknown address/SKU returns 404.
Query Params
int32
required
Body Params
items
array of objects
required
items*
int32
required
int32
string
string
string
enum
Defaults to stripe
Allowed:
string
Headers
string
required
Defaults to Bearer <token>
Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json