Getting started
Quickstart
Create a checkout session for a plan, send your buyer to it, and pay with Apple Pay. You'll get back a tax invoice issued by Hlawula as seller of record.
The API
Every request goes to Hlawula's API over HTTPS. The examples use this base URL:
export HLAWULA_URL=https://hlawula.co.zaCheck it's reachable:
curl $HLAWULA_URL/api/healthTake your first payment
Pick a plan
Plans are the products your customers subscribe to. Prices are in cents, excluding tax.
bashcurl $HLAWULA_URL/api/plansCreate a checkout session
Tell us the plan, the buyer's email and their country. The country decides the tax line.
bashcurl -X POST $HLAWULA_URL/api/checkout/sessions \ -H "Content-Type: application/json" \ -d '{"planId":"plan_pro","email":"thandi@example.co.za","country":"ZA"}'The response has an
idlikecs_live_0015a4a0ff9d, the subtotal, a VAT line of R 149.85 and a total of R 1,148.85.Send the buyer to the hosted checkout
Open
/checkout?s=<session id>. The buyer sees your product, the tax and the eight payment methods. You can also try it with no session at /checkout.Or pay from your own UI
Pass the device token you get from Apple Pay to the pay endpoint:
bashcurl -X POST $HLAWULA_URL/api/checkout/sessions/cs_live_0015a4a0ff9d/pay \ -H "Content-Type: application/json" \ -d '{"method":"apple_pay","walletToken":"<token from the device>"}'You get back
outcome: "paid", the transaction, and the tax invoice numberedINV-2026-….See it in the dashboard
The payment appears in recent transactions on the dashboard and counts towards your next payout.
No authentication yet