Developers
Checkout, digital delivery and store APIs.
External carts
API v1
POST
/api/v1/stores/<store_slug>/checkout/external-cart/
Creates a real order from an external store/cart payload and returns a hosted payment URL. Use this when the cart system sends full line data rather than Creativemark SKUs.
Request Headers
Authorization: Bearer <your_store_api_key> Content-Type: application/json X-Idempotency-Key: WC-10023
Request Body
{
"external_reference": "WC-10023",
"presentation": "embedded",
"currency": "GBP",
"customer": {
"email": "buyer@example.com",
"name": "Jane Buyer"
},
"billing": {
"country": "GB",
"postal_code": "SW1A 1AA"
},
"items": [
{
"sku": "EXT-WIN11-PRO",
"name": "Windows 11 Professional",
"quantity": 1,
"unit_price_minor": 2499
}
],
"return_url_success": "https://your-store.example/success",
"return_url_cancel": "https://your-store.example/cart",
"consents": {
"terms": true,
"privacy": true,
"digital_delivery": true
}
}
Response (201 Created)
{
"ok": true,
"order_id": "00000000-0000-0000-0000-000000000000",
"public_id": "ORD-ABC123",
"status": "requires_payment",
"checkout_url": "https://creativemark.co/s/your-store/checkout/pay/00000000-0000-0000-0000-000000000000/",
"embed_url": "https://creativemark.co/s/your-store/embed/checkout/pay/00000000-0000-0000-0000-000000000000/",
"payment_url": "https://creativemark.co/s/your-store/embed/checkout/pay/00000000-0000-0000-0000-000000000000/",
"embedded": true,
"external_reference": "WC-10023"
}
cURL
curl -X POST \
https://creativemark.co/api/v1/stores/your-store/checkout/external-cart/ \
-H "Authorization: Bearer $CREATIVEMARK_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: WC-10023" \
-d '{"external_reference":"WC-10023","presentation":"embedded","currency":"GBP","customer":{"email":"buyer@example.com","name":"Jane Buyer"},"items":[{"sku":"EXT-WIN11-PRO","name":"Windows 11 Professional","quantity":1,"unit_price_minor":2499}]}'
What gets created
- A real pending order linked to the selected store.
- Order items from the posted line data.
- Hidden passthrough products for unknown SKUs, so reporting still works.
- A hosted checkout URL, plus a brandless iframe URL when embedded checkout is enabled.