Payments & gateways

How customers pay you, and how the money that moves after checkout gets recorded.

Admin → Settings → Payment

What you get without doing anything

Two payment methods are on from the first day and need no account, no keys and no internet connection to a provider:

  • Cash on delivery — the customer pays when the order arrives.
  • Offline payment — you write your own instructions, such as a bank transfer, and they appear at checkout.

A shop that only ever uses these two is a complete installation. Nothing below is required.

Adding a card gateway

Eight online gateways are available and every one is optional: all stay switched off until you save your own keys, and until then the application makes no request to any provider. Stripe and PayPal take the payment on your own checkout page; the six hosted-page gateways below send the customer to the provider and bring them back.

You need your own account with the provider. No keys are supplied with the product, and the keys you save are stored in your own database on your own server.

Creating your Stripe API keys

  1. Create a Stripe account, or sign in.
  2. Turn Test mode on with the toggle at the top right while you are testing.
  3. Open Developers → API keys (test), or API keys (live) when you go live.
  4. Copy the Publishable key (pk_test_…) and reveal and copy the Secret key (sk_test_…).
  1. Turn Stripe on.
  2. Publishable key — starts pk_.
  3. Secret key — starts sk_.
  4. Webhook signing secret — starts whsec_; you get it from the webhook below.

Press Save settings.

The Stripe card with the switch and each key field numbered
The Stripe card. Click to enlarge.

Creating your PayPal API credentials

  1. Sign in to the PayPal Developer Dashboard.
  2. Open Apps & Credentials → Sandbox for testing, or Live for production.
  3. Choose Create App and open it.
  4. Copy the Client ID and Secret.
  1. Turn PayPal on.
  2. Mode — Sandbox or Live; match the tab your keys came from.
  3. Client ID.
  4. Client secret.
  5. Webhook ID — you get it from the webhook below.

Press Save settings.

The PayPal card with the switch, mode and each credential field numbered
The PayPal card. Click to enlarge.

Hosted-page gateways

Six more gateways take the payment on the provider's own page: the customer places the order, is sent to the provider, pays there, and is brought back to your site, where the order is confirmed with the provider before it is marked paid. Nothing is entered on your pages and no provider script is loaded on them.

GatewayWhere it is usedMode switchCurrencies
MollieEurope — cards, iDEAL, Bancontact, SEPA and moreNone; the key decides (test_ / live_)EUR, GBP, USD and 25 others
SquareUS, Canada, UK, Australia, Japan, Ireland — cardsSandbox / LiveUSD, CAD, GBP, AUD, JPY, EUR
PaystackNigeria, Ghana, South Africa, Kenya — cards, bank, mobile moneyNone; the key decides (sk_test_ / sk_live_)NGN, GHS, ZAR, KES, USD and others
FlutterwaveAfrica — cards, bank transfers, mobile moneyNone; the key decides (FLWSECK_TEST- / FLWSECK-)NGN, USD, GBP, EUR, GHS, KES and others
PayUIndia — cards, UPI, net banking, walletsTest / LiveINR only
SSLCommerzBangladesh — cards, mobile banking, internet bankingSandbox / LiveBDT, USD, EUR, GBP and others

Each card lists the currencies the provider takes. A gateway is only offered at checkout while your platform currency (the Currency card at the top of this tab) is one of them; the card says so in a line under the fields when it is not.

Three things are the same for all six, and different from Stripe and PayPal:

  • Refunds work from the order screen, exactly as with a card order — the money goes back through the provider that took it.
  • A subscription plan bought through one is a prepaid term. None of these providers holds a card that could be charged again, so a monthly or yearly plan paid this way runs for one term and the restaurant renews it from their Plans page — see Plans (restaurant). Stripe and PayPal remain the two that set up automatic renewal.
  • They collect into the platform's account only. In the franchise model a restaurant that takes its own payments keeps its own Stripe or PayPal keys; the hosted-page gateways are not offered on that restaurant's storefront, because the money would land in your account instead of theirs — see Business model.

Mollie

  1. Sign in to the Mollie Dashboard and open Developers → API keys.
  2. Copy the Test API key (test_…) while you are testing, or the Live API key (live_…) when you go live. The key decides the mode, so the card has no switch.
  1. Turn Mollie on.
  2. API key — starts test_ or live_.

Press Save settings. Nothing to register at Mollie: each payment carries your site's notification address, and Mollie calls it on its own.

The Mollie card with the switch and the API key field numbered
The Mollie card. Click to enlarge.

Square

  1. Sign in to the Square Developer Dashboard and open your application (create one if you have none).
  2. On Credentials, pick Sandbox or Production at the top and copy the Access token.
  3. On Locations, copy the Location ID of the location that should take the payments.
  4. On Webhooks → Subscriptions, add a subscription with the URL https://your-site.com/webhook/square, tick payment.updated and payment.created, save, and copy its Signature key.
  1. Turn Square on.
  2. Mode — Sandbox or Live; match the tab your token came from.
  3. Access token.
  4. Location ID.
  5. Webhook signature key — from the subscription above.

Press Save settings.

The Square card with the switch, mode and each credential field numbered
The Square card. Click to enlarge.

Paystack

  1. Sign in to the Paystack Dashboard → Settings → API Keys & Webhooks.
  2. Copy the Test secret key (sk_test_…) or the Live secret key (sk_live_…). The key decides the mode. The public key is optional.
  3. On the same page set the Webhook URL (test or live, to match the key) to https://your-site.com/webhook/paystack. Paystack signs each callback with your secret key, so there is nothing else to copy.
  1. Turn Paystack on.
  2. Secret key — starts sk_test_ or sk_live_.
  3. Public key — optional; starts pk_.

Press Save settings.

The Paystack card with the switch and each key field numbered
The Paystack card. Click to enlarge.

Flutterwave

  1. Sign in to the Flutterwave Dashboard → Settings → API Keys.
  2. Copy the Secret key — FLWSECK_TEST-… for testing, FLWSECK-… when live. The key decides the mode. The public key is optional.
  3. Under Settings → Webhooks, set the URL to https://your-site.com/webhook/flutterwave and type a Secret hash of your own choosing. Flutterwave sends that hash with every callback, and the card checks it.
  1. Turn Flutterwave on.
  2. Secret key — starts FLWSECK.
  3. Public key — optional; starts FLWPUBK.
  4. Secret hash — the same value you typed in the Flutterwave dashboard.

Press Save settings.

The Flutterwave card with the switch and each field numbered
The Flutterwave card. Click to enlarge.

PayU (India)

  1. Sign in to the PayU Dashboard and open Developers → Test Mode for the test credentials, or Live Mode once your account is approved.
  2. Copy the Merchant Key and the Merchant Salt (the SHA-512 salt).
  3. Ask PayU to set your webhook (payment notification) URL to https://your-site.com/webhook/payu — it is configured under Developers → Webhooks in the dashboard, or by PayU support on older accounts. The callback is signed with your salt.
  1. Turn PayU on.
  2. Mode — Test or Live; match where the key came from.
  3. Merchant key.
  4. Salt.

Press Save settings. PayU charges in Indian rupees only, so the card is offered at checkout only while the platform currency is INR.

The PayU card with the switch, mode and each credential field numbered
The PayU card. Click to enlarge.

SSLCommerz

  1. For testing, create a sandbox account at the SSLCommerz developer site; the confirmation e-mail carries a Store ID and Store Password.
  2. For live payments, sign in to the merchant panel and read the same two values under My Stores.
  3. Optionally set the IPN URL in the panel to https://your-site.com/webhook/sslcommerz. Each payment already carries it, so this is a backstop rather than a requirement.
  1. Turn SSLCommerz on.
  2. Mode — Sandbox or Live.
  3. Store ID.
  4. Store password.

Press Save settings.

The SSLCommerz card with the switch, mode and each credential field numbered
The SSLCommerz card. Click to enlarge.

Webhooks, and why they are not optional

Checkout settles itself: the customer’s browser comes back to your site and the order is marked paid. A webhook is how you hear about money that moves when nobody is looking at a browser — above all the monthly renewal of a restaurant’s plan.

Without a webhook, a renewal is charged by the provider and never recorded here. The restaurant pays and their term is not extended.

Adding the Stripe webhook

  1. Open Developers → Webhooks and choose Add endpoint.
  2. Set the endpoint URL to https://your-site.com/webhook/stripe.
  3. Subscribe to these five events:
    EventWhat it tells the application
    payment_intent.succeededA customer’s card order was paid.
    invoice.paidA subscription charge — the first one and every renewal.
    invoice.payment_failedA renewal was declined; the term enters its grace period.
    customer.subscription.updatedAn agreement was cancelled or suspended.
    customer.subscription.deletedThe agreement ended; renewal stops.
  4. Save, reveal the signing secret (whsec_…) and paste it into Webhook signing secret in Settings → Payment.

Adding the PayPal webhook

  1. In the same PayPal app, scroll to Webhooks and choose Add Webhook.
  2. Set the URL to https://your-site.com/webhook/paypal.
  3. Subscribe to PAYMENT.CAPTURE.COMPLETED, PAYMENT.SALE.COMPLETED, BILLING.SUBSCRIPTION.ACTIVATED, BILLING.SUBSCRIPTION.CANCELLED, BILLING.SUBSCRIPTION.SUSPENDED, BILLING.SUBSCRIPTION.EXPIRED and BILLING.SUBSCRIPTION.PAYMENT.FAILED.
  4. Save and copy the Webhook ID into Settings → Payment.

PayPal gives you an ID rather than a secret. Each callback is verified by asking PayPal about that ID using your Client ID and Secret, so the webhook must belong to the same app as the credentials you saved.

Hosted-page gateway notifications

The six hosted-page gateways never renew a plan, so their notifications matter less: the customer's return to your site confirms the order, and the hourly reconcile job confirms one whose browser never came back. Register them anyway where the provider asks for a URL — a payment confirmed twice is harmless, and a customer who closes the window on the provider's page is then recorded within seconds instead of within the hour.

GatewayURL to registerHow the callback is checked
MollieNothing to register — sent with every payment.The payment is read back from Mollie by its id.
Squarehttps://your-site.com/webhook/squareHMAC signature with the subscription's signature key.
Paystackhttps://your-site.com/webhook/paystackHMAC signature with your secret key.
Flutterwavehttps://your-site.com/webhook/flutterwaveThe secret hash you chose.
PayUhttps://your-site.com/webhook/payuThe reverse hash, made with your salt.
SSLCommerzhttps://your-site.com/webhook/sslcommerz (optional)The transaction is validated with SSLCommerz by its id.

Whatever the callback says, an order is marked paid only after the provider has confirmed the payment for that order, at that amount, in your currency.

How to tell it is working

Take one test payment. Settings → Payment then shows a badge on the gateway's card, beside the webhook field (or under the last field, for a gateway that signs with its own key):

BadgeWhat it means
Webhook verified, greenA callback arrived and its signature checked out. The event and time are shown underneath.
Rejected, redA callback arrived but the signature did not match — usually the wrong signing secret.
No webhook received yet, greyNothing has arrived. The endpoint is missing, the URL is wrong, or no payment has been made.

The badge always shows the most recent result, not a history. A rejection that you have since fixed disappears as soon as a good callback arrives.

When it doesn’t work

Payments succeed but nothing is recorded, and the provider shows no deliveries

The webhook is almost certainly in a different account from your keys. Stripe has both a legacy Test mode inside your main account and separate Sandbox accounts; an endpoint created in one never receives events produced by keys belonging to the other.

Check which account your keys belong to: the account identifier is inside the key itself, straight after 51 — a key beginning sk_test_51ABCDEFGH… belongs to account acct_1ABCDEFGH…. Every object that account creates repeats the same fragment in its own identifier, so you can confirm at a glance that you are looking in the right place.

The badge says Rejected

The signing secret does not match the endpoint. Each endpoint has its own secret; copying one from a different endpoint, or from a different account, fails every time. Reveal the secret on the endpoint you actually created and paste it again.

Nothing arrives on a local installation

Neither provider can reach localhost or a machine behind a private network. Checkout still works, because the browser return settles it — but renewals cannot record. Test webhooks on a public address. The hosted-page gateways refuse a notification address they cannot reach, so on a local installation they are opened without one and the return leg alone confirms the order.

A hosted-page gateway is on but not offered at checkout

Three gates, all visible on its card: every required field is filled, the platform currency is one the provider takes (the card lists them and warns when it is not), and — in the franchise model — the restaurant is not collecting its own payments. Vendor purchases paid to the platform (plans, placements, royalty invoices) are offered every hosted rail regardless of the last one.

The customer paid on the provider's page but the order still says unpaid

The order is confirmed when the customer comes back to your site, when the provider's notification arrives, or when the hourly reconcile job asks the provider about every open reference — whichever happens first. Check the webhook badge on the card, then that the cron is running. A declined or abandoned payment is reported plainly on the order's tracking page and the order stays payable.

Test before you go live. Use test keys and sandbox mode and place real end-to-end orders first. You supply your own gateway account and are responsible for that provider’s terms and for the payment rules where you trade.
Licence. If you charge your own users — taking customer payments online, or billing restaurants for plans — check the licence attached to your purchase. Envato’s terms decide which one you need.