post
https://www.pelcro.com/api/v1/sdk/ecommerce/order
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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
itemsis required — each entry needssku_idandquantity(min 1), and each SKU must be eligible for the customer.- Pay with either a new card (
payment_gateway+gateway_token) or an existingsource_id. address_idis required when the order contains shippable items or when e-commerce taxes are enabled; it must belong to the customer.coupon_codeandcampaign_keyare optional.- All SKUs in one order must share the same currency.
- A declined card or an unknown address/SKU returns
404.
