🚀 New: Theme Control Plane API — build, customize, and deploy themes programmatically. Learn more →
curl --request POST \
--url https://api.shoppex.io/dev/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"coupon_code": "SPRING10",
"gateway": "STRIPE",
"title": "Starter Pack checkout",
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"items": [
{
"product_id": "prod_starter",
"variant_id": "var_standard",
"quantity": 1,
"delivery_instructions": "Discord: shoppex"
}
]
}
'{
"data": {
"id": "ord_123",
"uniqid": "11111111-1111-4111-8111-111111111111",
"shop_id": "shop_1",
"customer_id": "cus_1",
"affiliate_link_id": "link_1",
"affiliate_customer_id": "cus_aff_1",
"affiliate_code": "creator123",
"affiliate_discount_amount": 3,
"customer_email": "[email protected]",
"currency": "USD",
"status": "PENDING",
"status_details": null,
"payment_status": "PENDING",
"gateway": "STRIPE",
"flow_type": "CHECKOUT",
"provider_reference": null,
"provider_reference_type": null,
"subtotal": 29.99,
"discount": 3,
"discount_display": 3,
"tax": 0,
"tax_percentage": 0,
"total": 26.99,
"total_display": 26.99,
"balance_paid_amount": 0,
"coupon_id": "coupon_spring10",
"subscription_id": null,
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"is_developer_invoice": false,
"developer_title": null,
"checkout_url": "https://checkout.shoppex.io/invoice/11111111-1111-4111-8111-111111111111",
"items": [
{
"product_id": "prod_starter",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Standard",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivery_instructions": "Discord: shoppex",
"delivery_instructions_label": "Discord username",
"delivered_items": {
"access_url": "https://downloads.example.com/starter-pack"
}
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}Creates a server-side Shoppex order from product or variant line items. Use gateway to preselect a valid active gateway for the resulting pending order.
curl --request POST \
--url https://api.shoppex.io/dev/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"coupon_code": "SPRING10",
"gateway": "STRIPE",
"title": "Starter Pack checkout",
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"items": [
{
"product_id": "prod_starter",
"variant_id": "var_standard",
"quantity": 1,
"delivery_instructions": "Discord: shoppex"
}
]
}
'{
"data": {
"id": "ord_123",
"uniqid": "11111111-1111-4111-8111-111111111111",
"shop_id": "shop_1",
"customer_id": "cus_1",
"affiliate_link_id": "link_1",
"affiliate_customer_id": "cus_aff_1",
"affiliate_code": "creator123",
"affiliate_discount_amount": 3,
"customer_email": "[email protected]",
"currency": "USD",
"status": "PENDING",
"status_details": null,
"payment_status": "PENDING",
"gateway": "STRIPE",
"flow_type": "CHECKOUT",
"provider_reference": null,
"provider_reference_type": null,
"subtotal": 29.99,
"discount": 3,
"discount_display": 3,
"tax": 0,
"tax_percentage": 0,
"total": 26.99,
"total_display": 26.99,
"balance_paid_amount": 0,
"coupon_id": "coupon_spring10",
"subscription_id": null,
"custom_fields": {
"source": "affiliate",
"campaign": "spring_launch"
},
"is_developer_invoice": false,
"developer_title": null,
"checkout_url": "https://checkout.shoppex.io/invoice/11111111-1111-4111-8111-111111111111",
"items": [
{
"product_id": "prod_starter",
"product_title": "Starter Pack",
"product_type": "DIGITAL",
"variant_title": "Standard",
"quantity": 1,
"unit_price": 29.99,
"total": 29.99,
"delivery_instructions": "Discord: shoppex",
"delivery_instructions_label": "Discord username",
"delivered_items": {
"access_url": "https://downloads.example.com/starter-pack"
}
}
],
"created_at": 1711510800,
"updated_at": 1711510860
}
}Use your Shoppex API key in the Authorization header.
Show child attributes
Successful response
Show child attributes