Selling
Hosted checkout
The hosted checkout is a page we run for you. It shows your product, works out tax from the buyer's country, offers every payment method they can use, and ends with a tax invoice from Hlawula.
How a session works
A checkout session holds one purchase: a plan, the buyer's email and their country. It starts open and becomes paid once a payment succeeds. A paid session can't be paid again.
| Field | Meaning |
|---|---|
id | Session identifier, used in the checkout URL and the pay call. |
status | open or paid. |
subtotalCents | The plan price in cents, before tax. |
taxLines | One line per tax, with rate, authority and amount. |
totalCents | What the buyer pays: subtotal plus tax. |
seller | Hlawula’s legal name, registration and VAT number, shown at checkout. |
Create a session and redirect
curl -X POST $HLAWULA_URL/api/checkout/sessions \
-H "Content-Type: application/json" \
-d '{"planId":"plan_scale","email":"aisha@lagoslabs.ng","country":"NG"}'Send the buyer to /checkout?s=<id>. If they change their billing country on the page, the session is updated and the tax recalculated before they pay.
What the buyer sees
The page is split in two, like most modern checkouts. The left side shows your product name, the price, the tax line and the seller of record. The right side starts with Apple Pay, then Google Pay and Samsung Pay, then card and the South African bank methods. After paying, the buyer sees their tax invoice straight away.
Try it yourself at /checkout.
Change the country before paying
curl -X PUT $HLAWULA_URL/api/checkout/sessions/cs_live_0015a4a0ff9d \
-H "Content-Type: application/json" \
-d '{"country":"GB"}'The response is the updated session with UK VAT at 20%.
Planned