Create a cart from your storefront payload
/carts/from-apiCreates a cart from a fully computed payload for your custom storefront. All monetary values must be sent as integer minor units (cents for 2-decimal currencies, fils for KWD, BHD, OMR, JOD, and TND). See the Custom store guide for the full field contract.
Authorization
ApiKeyAuth Your API key, issued by PeptidesPayment. Send it in the x-api-key header. Keep it server-side and never expose it in browser code.
In: header
Header Parameters
Your merchant id, supplied by PeptidesPayment at integration time.
Request Body
application/json
Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/carts/from-api" \ -H "x-merchant-id: string" \ -H "Content-Type: application/json" \ -d '{ "external_cart_id": "cart-abc-123", "currency": "AED", "customer_country_code": "AE", "email": "shopper@example.com", "items": [ { "external_product_id": "prod-001", "external_variant_id": "var-001", "sku": "TEST-SKU-001", "title": "Premium Espresso Beans", "quantity": 1, "unit_price": 15000, "weight_grams": 250, "requires_shipping": true } ], "shipping_address": { "first_name": "Jane", "last_name": "Doe", "address_1": "1 Sheikh Zayed Rd", "address_2": "Apt 1203", "city": "Dubai", "province": "Dubai", "postal_code": "00000", "country_code": "AE", "phone": "+971501234567" }, "billing_address": { "first_name": "Jane", "last_name": "Doe", "address_1": "1 Sheikh Zayed Rd", "city": "Dubai", "country_code": "AE", "phone": "+971501234567" } }'{ "success": true, "medusa_cart": { "id": "string" }, "source_platform": "custom_api", "external_cart_id": "string"}payment.container.succeeded Webhook
Fired when a payment_container payment is captured. The merchant should create their order on receipt and call POST /webhooks/payment-container/order-created with the resulting external_order_id.
Report fulfillment for a custom-API order POST
Merchants call this when goods ship, to report tracking for an order. Accepts every order source except Shopify (custom_api, payment_container, WooCommerce, …); Shopify orders return 400 because their fulfillment syncs from Shopify. A `fulfilled` or `partially_fulfilled` status marks the order payout-eligible.