Charge a Customer
There are two ways to charge someone: once, for an amount you choose, or on a plan, every billing period. Either way, the customer gets an invoice and a payment link, and the invoice is marked paid as soon as the payment is confirmed.
In the dashboard
Use Charge a customer on the Overview or the Invoices page, or Charge in a customer's menu on the Customers page:
- Choose the customer.
- Choose One-time amount (what it's for, the amount and the currency) or A plan (the plan, a currency it's priced in, and optional trial days).
- Choose how they pay:
- Send a payment link: you get a link to copy into WhatsApp, SMS or email, or Email it to the customer from PimaBill.
- Already paid: for cash, a bank transfer or a payment taken elsewhere. The invoice is recorded as paid, with the method.
With the API
Once
Create an invoice with checkout to get the payment link in the same call:
curl -X POST https://api.pimabill.com/api/invoices \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"customerId": "cus_123",
"currency": "UGX",
"items": [{ "description": "Installation", "quantity": 1, "unitAmount": 150000 }],
"dueDate": "2026-11-02",
"checkout": { "callbackUrl": "https://shop.example.com/paid" }
}'
The response is the invoice, plus checkout.checkoutUrl to send the customer. Pass checkout.providerName to use a specific provider; otherwise the highest-priority active one that can take the payment is used. The invoice.paid webhook tells you when it's paid.
Already paid? Create the invoice without checkout, then POST /api/invoices/{id}/mark-paid with { "paymentMethod": "cash" }.
Selling a product from your catalogue, or taking a deposit and the rest later? See One-time products & partial payments.
On a plan
Subscribe the customer:
curl -X POST https://api.pimabill.com/api/subscriptions \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "customerId": "cus_123", "planId": "plan_home_20", "currency": "UGX" }'
The first invoice is created within a few seconds (unless there's a trial). Find it with GET /api/invoices?subscriptionId={id}, and get its payment link with POST /api/invoices/{id}/checkout. Renewals are invoiced and emailed automatically every period, and failed payments are retried. See Subscriptions.
Without an invoice
To take a payment that isn't a bill, such as a deposit or a top-up, use a collection: a mobile money PIN prompt or a hosted checkout, recorded in the ledger.
Currencies and Exchange Rates
Bill in any ISO currency or one of your own, keep every balance in its own currency, and report in one currency at the rate of each payment's day.
One-time Products & Partial Payments
Sell bundles and courses that are paid once and never renew, and let customers pay with a deposit or in instalments.