One account · one integration · one question
Stop rebuilding the payment dance.
Taking money in a project means products in a dashboard, a webhook endpoint, a signing secret, a handler for every event and a table of who paid. billingthing does all of that once, and a project asks one question: does this user have access?
Act I
The payment dance.
A shop wants a monthly Pro plan. Here's the integration, before the next project that takes money writes it all again.
01 · Products
Products and prices, in a dashboard.
Name, price, period, save. The price gets an id you'll paste into the project's code, and it's different in test mode.
02 · Webhooks
Then a webhook endpoint.
Pick the events you think you need, point them at the project, and copy a signing secret into its environment.
03 · The handler
Then the handler.
Verify the signature, ignore duplicates, handle events arriving out of order, and decide what a failed payment means. In every project.
04 · The access check
Then "has this user paid?"
A subscriptions table, a migration, and a check sprinkled through the app. Each project has its own idea of what "active" means.
05 · When it misses
And one day it misses a webhook.
The database was busy for a second. The provider retried, then gave up. The customer paid and has no access, and you hear it from them.
That was one project that takes money.
- things set up by hand
- 2
- pieces of code to keep
- 3
- ways to lose money
- 1
- projects that copy it
- all of them
Here's the same plan, with billingthing.
Act II
The billingthing way.
One merchant account, one webhook handler, one idea of what "paid" means. A project implements as little as possible: a link to pay, and a question.
01 · Plans, declared
Plans live in one file.
Price, features and grace period per plan. A project names a plan and a feature, never a provider's price id.
02 · A link to pay
Checkout is one call.
The project says who and which plan, and gets back a link to send the user to. The provider's checkout does the rest.
03 · The question
Then one question, wherever it matters.
Does this user have this feature? billingthing answers from its own record of every payment, so the project keeps no table and handles no webhook.
04 · The webhooks, once
The webhooks land here, once.
Signature checks, duplicates, ordering and retries are billingthing's problem, handled in one place and fixed for every project at once.
Act III
The hard questions.
Taking on everything means answering the questions each project used to fudge. These are the ones billingthing has to get right, and they're open.
-
1
Whose user is it?
Projects pass their own user ids, and billingthing maps them to the provider's customers. One person using two projects shouldn't mean two unrelated accounts, or should it?
-
2
Ask, or be told?
Asking is simplest for a project, but a cancelled plan should end access promptly. Likely both: ask with a short cache, plus an optional signed push when access changes.
-
3
What if it's down?
A paying customer must never be locked out because billingthing blinked. Projects keep the last answer with an expiry, and failures lean toward letting people in.
| Measure | Per project | billingthing |
|---|---|---|
| Products and prices | ids pasted into code | plans in one file |
| Webhooks | a handler per project | none in any project |
| Who has access | a table per project | one question |
| A missed event | a customer locked out | handled once, retried |
Got a project that should take money?
Tell me what you'd charge for. billingthing is how every project here will ask whether someone has paid.