Create checkout session
Create a hosted checkout session for an order. Returns a `url` to redirect the shopper to. For multivendor stores, include a `splits` object describing each vendor's payout and the marketplace commission. For Multisite, identify the site via `metadata.site_url` / `metadata.blog_id`.
Parameters
Order total in minor units (cents).
ISO-4217 currency code.
Your order number (e.g. the WooCommerce order id).
Where to send the shopper after payment.
Where to send the shopper if they cancel.
Override the API key's default webhook endpoint.
Shopper email for the receipt.
{ items: [{ name, qty, amount }] } shown on the pay page. A bare array is accepted and stored as { items: [...] }.
Multivendor payout: { platform, commission, vendors: [{ vendor_id, name, amount, currency }] }. A bare array is stored as { items: [...] }.
Arbitrary key/values echoed back on webhooks (order_id, site_url, blog_id).
curl https://malaleem.com/api/v1/checkout \
-H "Authorization: Bearer {key_id}:{secret}" \
-H "Content-Type: application/json" \
-d '{"amount":4999,"currency":"USD","reference":"1042",
"return_url":"https://store.example/thank-you",
"line_items":{"items":[{"name":"T-shirt","qty":2,"amount":4999}]}}'