Checkout sessions · Create a session
Create a session
Starts a hosted checkout: Inkress prices the cart, runs the fraud check and returns the page to show. The order is made only when the payment succeeds.
Body
Amount in the major unit. Leave out when products set it.
Who is paying. Matched to an existing customer by email.
Receipts go here.
First name.
Last name.
With country code.
JMD or USD.
Your own ID. Made for you if you leave it out.
Shown on the payment page.
Items with id and quantity.
Checked when the session is made; an invalid code refuses the session.
Headers
m-<merchant username>: whose checkout this is. Enough on its own, so a storefront can call this from the browser.
Optional. Bearer with the merchant's secret or publishable key, instead of or as well as Client-Id.
Returns
The session: session_id, status pending, totals (sub_total, customer_total, fees, shipping, tax, discount), frame_url for the payment page and expires.
| status | Meaning |
|---|---|
pending | Created. |
awaiting_payment | The customer is paying. |
payment_pending | The bank hasn't answered yet. |
completed | Paid; order_id is set. |
payment_failed | Declined. |
payment_cancelled | The customer backed out. |
cancelled | You cancelled it. |
expired | Timed out. |
Errors
402 | payment_declined: the fraud check declined it (data.outcome says why), or merchant_unavailable: the merchant can't take payments. |
422 | A customer field is missing (Customer email is required), a product is unknown or out of stock, or the discount code doesn't apply. |