Payment gateways
A gateway takes the money. BadgerPanel ships two: Stripe for cards, and PayPal. A third card on the same page connects the panel to WHMCS.
Go to Admin > Billing > Settings, then click the Gateways tab. The sidebar does not list this page.
Stripe
Stripe takes card payments. The customer types their card details on the checkout page of your panel. Stripe processes the payment behind the scenes.
Set Stripe up
- Go to Admin > Billing > Settings > Gateways.
- Tick Enabled on the Stripe card.
- Leave Mode on Test Mode for now.
- Enter your Publishable Key. A test key starts with
pk_test_. - Enter your Secret Key. A test key starts with
sk_test_. Click the eye to read back what you typed. - Enter a Statement Descriptor. This text appears on the card statement of the customer. The limit is 22 characters.
- Click Save Configuration.
- Click Test Connection. The result appears next to the button.
The panel hides the secret key after you save it. The help text then reads Secret key is set. Enter a new one to replace it. To change the key, type the new one over it and save again.
Go live
This charges real cards
When you switch Mode to Live Mode and save, the panel asks:
Put Stripe into live mode? Checkout starts charging real cards straight away. Test cards stop working. Switch back to test mode if you are still trying things out.
Click Go live to continue, or Cancel to stay in test mode.
A toast confirms the save and names the mode, for example Stripe saved in live mode.
The webhook indicator
The Stripe card shows a line that reads Webhook configured or Webhook not configured. It reads Webhook configured when the panel holds a webhook signing secret for Stripe.
A webhook lets Stripe tell the panel that a payment cleared. Set one up:
- Log in to the Stripe Dashboard.
- Go to Developers > Webhooks and add an endpoint.
- For the endpoint address, enter the address of your panel, then
/api/webhooks/stripe. - Copy the signing secret that Stripe gives you.
- In the panel, go to Admin > Settings > General and click the Webhooks tab.
- Open the Integrations tab and find the Stripe card.
- Paste the secret into Webhook Secret, then click Save Changes.
The indicator on the gateway card then reads Webhook configured.
The panel also confirms the payment with Stripe on the checkout page, while the customer is still on it. The webhook covers a payment that clears after the customer leaves the page. Read Orders and Invoices for the full order flow.
PayPal
PayPal takes the customer away to the PayPal site. The customer approves the payment there and comes back to your panel.
Set PayPal up
- Go to Admin > Billing > Settings > Gateways.
- Tick Enabled on the PayPal card.
- Leave Mode on Sandbox for now.
- Enter a Brand Name. PayPal shows this name on its own checkout page.
- Enter your Client ID and your Client Secret.
- Click Save Configuration.
- Click Test Connection.
Get PayPal credentials
- Log in to the PayPal Developer Dashboard at developer.paypal.com.
- Go to Apps & Credentials.
- Create an app, or open an app that exists.
- Copy the Client ID and the Client Secret.
- For real payments, take the credentials from the Live tab, not the Sandbox tab.
Go live
This takes real money
When you switch Mode to Live and save, the panel asks:
Put PayPal into live mode? Checkout starts taking real payments straight away. Sandbox accounts stop working.
Click Go live to continue, or Cancel to stay in sandbox mode.
What the customer sees
The checkout page shows three payment tiles: Card (Stripe), PayPal, and Credits.
If a customer picks a gateway that you did not set up, the payment stops with a message. For Stripe the message reads Card payments are not set up on this panel.
WARNING
Turn on at least one gateway before you open your store. A customer who reaches checkout with no gateway configured cannot pay.
Test before you go live
- Set the gateway to test or sandbox mode with test credentials.
- Create a cheap product and make it visible.
- Log in as a customer and place an order.
- Pay with a test card, or with a PayPal sandbox account.
- Make sure that the order reaches Paid in Admin > Billing > Orders.
- If Auto-activate paid orders is on, make sure that the panel builds the server.
- Go back to the gateway card, switch the mode, and enter your live credentials.
- Save, then approve the go-live dialog.
Stripe publishes test card numbers for different results, such as a success and a decline. Read the Stripe testing guide.
WHMCS
The third card on the Gateways tab connects the panel to a WHMCS installation. WHMCS is a separate billing platform that the panel can keep in step with.
The card takes an API URL, an API Identifier, and an API Secret. Sync Direction has three choices: WHMCS to Panel (Import only), Panel to WHMCS (Export only), and Bidirectional. Tick which records to sync: Products, Orders, Invoices, and Clients.
Click Sync Now to run a sync at once. The panel asks first:
Run a WHMCS sync now? Records on the receiving side are overwritten where they differ.
For the full page, with sync history and record counts, read WHMCS Integration.
Next steps
- Orders and Invoices - process orders, and issue refunds
- Credits - account balances
- Billing Overview - currency and tax
