Stripe
Collect payments with Stripe
STRIPE sends the payer to a Stripe-hosted Checkout page to pay by card.
Apple Pay and Google Pay can appear there too, because Stripe treats them as
cards. Centipid Billing
creates the Checkout Session, sends the payer to it, and confirms the result on
a signed webhook that is re-checked against Stripe before anything is credited.
The money goes into your own Stripe account. Centipid Billing never holds it, and this is not Stripe Connect: you open the account with Stripe yourself and paste its keys here.
Offered in the country catalog for the 44 countries where Stripe opens accounts online: Australia, Austria, Belgium, Brazil, Bulgaria, Canada, Croatia, Cyprus, the Czech Republic, Denmark, Estonia, Finland, France, Germany, Gibraltar, Greece, Hong Kong, Hungary, Ireland, Italy, Japan, Latvia, Liechtenstein, Lithuania, Luxembourg, Malaysia, Malta, Mexico, the Netherlands, New Zealand, Norway, Poland, Portugal, Romania, Singapore, Slovakia, Slovenia, Spain, Sweden, Switzerland, Thailand, the United Arab Emirates, the United Kingdom and the United States.
Before you start
- Open a Stripe account owned by the ISP and finish activation, so it can take live payments.
- Make sure Cards is turned on in Settings → Payment methods. Centipid Billing asks Stripe for card payments only. Bank debits and voucher methods (SEPA, Bacs, ACH, OXXO, Konbini, Boleto) are left out on purpose: the money arrives hours or days later, so the payer could not go online at once.
- Plan the walled garden: the payer’s browser must reach Stripe’s Checkout page, so a Hotspot subscriber who is not yet online cannot pay unless Stripe is reachable before login. Centipid Billing adds Stripe’s hosts to your routers’ walled garden when Stripe is your connected gateway.
Configure the gateway
Open Settings → Payments → Stripe
Select Stripe from the payment marketplace.
Enter the secret key
In Stripe, open Developers → API keys and copy the Secret key. It starts with
sk_live_on a live account andsk_test_in test mode. A restricted key (rk_live_…) also works if it has write access to Checkout Sessions. The publishable key (pk_…) is not needed and is refused.Add the webhook in Stripe
Copy the Webhook URL shown under Callback URLs on the Stripe settings page. In Stripe, open Developers → Webhooks → Add endpoint, paste the URL, and select exactly these two events:
checkout.session.completedcheckout.session.async_payment_succeeded
Enter the webhook signing secret
On the endpoint you just created, reveal the Signing secret. It starts with
whsec_. Paste it into Webhook signing secret.Run a controlled test payment
Pay a small amount from the captive portal on a device that is not logged in, and confirm the payment reaches the ledger and the subscriber connects.
Credentials
| Field | Required | Notes |
|---|---|---|
| Secret key | Yes | Secret. sk_live_…, sk_test_…, or a restricted rk_… key. |
| Webhook signing secret | Yes | Secret. whsec_…, from the webhook endpoint in Stripe. |
Both fields gate the switch. Each webhook endpoint has its own signing secret, so if you delete and re-create the endpoint, paste the new secret too.
Callback URLs
| Name | Path |
|---|---|
| Webhook URL | https://<your-host>/api/stripe/callback |
The payer’s browser returns to https://<your-host>/api/stripe/return after
Checkout. Centipid Billing sends that address with every payment, so there is
nothing to register for it.
What the payer must provide
An email address and card details, or an Apple Pay or Google Pay approval where the payer’s device offers one. Stripe may also ask the card’s bank for a 3-D Secure check, which opens a page on the bank’s own website.
The currency is your account’s billing currency, defaulting to USD. Stripe
must support that currency for your country.
Minimum charge
Stripe refuses a payment below its minimum for the currency, so a very cheap package cannot be paid through Stripe. Among the currencies its countries use:
| Currency | Minimum |
|---|---|
| USD | 0.50 |
| GBP | 0.30 |
| EUR | 0.50 |
| JPY | 50 |
| THB | 10 |
| MXN | 10 |
The full list, and how it works when Stripe converts to another payout currency, is in Stripe’s minimum and maximum charge amounts. Price packages sold through Stripe at or above the minimum.
How a payment completes
Create the Checkout Session
Centipid Billing creates a Checkout Session for the amount, tagged with our own reference, and writes a pending row against that reference.
Payment
The payer pays on Stripe’s Checkout page and is sent back to the return page.
Confirmation
Stripe posts the signed webhook. The signature and its timestamp are checked, the session is then read back from the Stripe API, and only a session whose
payment_statusispaidrecords a payment and applies the package. The return page runs the same check. A repeated webhook updates the same payment rather than crediting it twice.
Events for sessions that other software, or another Centipid Billing account, created on the same Stripe account are acknowledged and ignored. Sharing the Stripe account is safe.
If Stripe’s API cannot be reached when a webhook arrives, Centipid Billing answers with HTTP 503 so Stripe sends the webhook again later.
Troubleshooting
| Symptom | What it means | What to do |
|---|---|---|
| “Unable to process payment. Please try again later.” | The secret key is missing or Stripe refused the session. | Check the secret key, and that the account is activated for live payments. |
| “Unable to process payment” only on cheap packages | The package price is below Stripe’s minimum charge for your currency. | Raise the price to at least the minimum, or sell that package another way, such as vouchers. |
| A Hotspot payer’s card fails at the bank check | The card needs 3-D Secure, and the bank’s page is not reachable before login. | Ask the payer to try another card, or to buy a voucher instead. |
| Test payments work, live does not | The key is still sk_test_…. |
Replace it with the live secret key, and re-create the webhook in live mode: test-mode and live-mode webhooks have different signing secrets. |
| The Checkout page never loads on a Hotspot device | The walled garden does not allow Stripe. | Confirm Stripe is the connected gateway so the routers are synced, then see Captive device cannot reach checkout. |
| Payments succeed in Stripe, ledger stays empty | Webhooks are being rejected or not sent. | In Stripe, open the endpoint’s event log. A 400 means the signing secret is wrong: re-copy it. No attempts means the two events are not selected. |
For every gateway’s fields in one place, see the credential reference.
