Online payments
Take card payments through Stripe and PayPal payments on every invoice, recorded against the invoice automatically.
For business owners and administrators. Once online payments are set up, every unpaid invoice has a secure payment page. Customers pay by card (Stripe) or PayPal, and the payment is recorded against the invoice without anyone typing it in.
The amount recorded is always what the provider actually took. If a customer pays an invoice that was already paid another way (or pays twice), the payment is still recorded in full and the invoice shows a negative outstanding amount, so you can see the overpayment and refund it.
What you need
- A Stripe account (for card payments), a PayPal business account, or both.
- Access to Company Settings.
- Payments are taken in the currency set in Company settings → Regional (pounds sterling unless you change it). Make sure your Stripe or PayPal account accepts that currency.
Set up Stripe (card payments)
- Sign in to the Stripe Dashboard at dashboard.stripe.com.
- Open Developers → API keys. Copy the Publishable key and the Secret key. Stripe has separate test and live keys; switch the dashboard to test mode to see the test ones.
- Open Developers → Webhooks and click Add endpoint:
- Endpoint URL:
https://yourcompany.job-manager.co.uk/webhooks/stripe - Event:
payment_intent.succeeded
- Endpoint URL:
- After saving, reveal and copy the endpoint's Signing secret (it starts with
whsec_).
Treat the secret key and signing secret like passwords and do not share them by email.
Set up PayPal
- Sign in to the PayPal Developer Dashboard at developer.paypal.com with your business account.
- Under Apps & Credentials, choose Sandbox (for testing) or Live, and create an app (or open your existing one).
- Copy the app's Client ID and Secret.
- In the app's Webhooks section, click Add Webhook:
- Webhook URL:
https://yourcompany.job-manager.co.uk/webhooks/paypal - Event type:
Payment capture completed(PAYMENT.CAPTURE.COMPLETED)
- Webhook URL:
- Copy the Webhook ID shown for the new webhook.
Turn it on in Company Settings
- Go to Company Settings and open the Payments tab.
- Switch on Enable Online Payments.
- Choose the Payment Gateway: Card Payment (Stripe) Only, PayPal Only, or Card Payment & PayPal.
- For Stripe:
- Choose Test Mode or Live Mode.
- Enter the Test Publishable Key and Test Secret Key, or the Live Publishable Key and Live Secret Key, to match the mode.
- Enter the Webhook Secret (the signing secret from Stripe).
- For PayPal:
- Choose sandbox (test) or live.
- Enter the Client ID, Client Secret and Webhook ID.
- Save. Saved secrets are not shown again; the box says (saved — enter new value to change). The Webhook URL shown under each provider is the address to give it.
A gateway is only offered to customers once its mode is chosen and both of its keys are filled in.
Test before going live
- Keep Stripe in Test Mode and PayPal in sandbox.
- Open an approved invoice, click Copy Payment Link and open the link in a private browser window.
- Pay with a Stripe test card (for example
4242 4242 4242 4242, any future expiry date and any CVC) or a PayPal sandbox buyer account. - Check the payment appears on the invoice and the status changes.
- Switch to Live Mode with your live keys and webhook secret. Test payments made in test mode are not real money.
What the customer sees
Customers reach the payment page from Copy Payment Link (send it however you like) or Pay Now in the Customer portal. The page shows the invoice, the amount due and the due date. The customer enters:
- Your Name and Email Address (the receipt is sent here).
- Company Name (optional).
- Payment Amount: the full balance by default. They can pay less, but never more than is outstanding.
They then click Continue to Payment and pay by card or PayPal. An invoice that is already paid shows that instead of a payment form.
What happens after a payment
- The payment is recorded against the invoice with the method Card Payment or PayPal and the provider's reference. The invoice becomes Paid or Partially Paid (see Invoices).
- The customer is emailed a receipt.
- Your accounts email address (in Company settings) is emailed that a payment arrived, and users with the mobile app get a push notification.
- If Xero or QuickBooks is connected, the payment is sent there too.
The payment is recorded when the provider confirms it, either straight from the payment page or from the provider's webhook a moment later. Each provider payment is recorded only once, however many times it is confirmed, and the amount always comes from the provider, never from the customer's browser.
Troubleshooting
| Problem | What to check |
|---|---|
| Customers don't see a card or PayPal option | Enable Online Payments must be on, the gateway chosen, and both keys for the current mode filled in. |
| "Failed to initialise payment" | The keys are wrong or are for the other mode (test keys in live mode, or the reverse). Re-enter them and save. |
| A payment shows in Stripe or PayPal but not on the invoice | Check the webhook address is exactly the one shown in Company Settings, the event is payment_intent.succeeded (Stripe) or PAYMENT.CAPTURE.COMPLETED (PayPal), and the webhook secret or webhook ID matches. The provider's webhook log shows whether delivery failed; it retries failed deliveries. |
| "PayPal encountered an error" | The PayPal client ID and secret are wrong, or are sandbox credentials while set to live (or the reverse). |
| The customer paid but got no receipt | The receipt goes to the email address the customer typed on the payment page. Check that the email settings in Company settings work. |
| Refunds | Refund in Stripe or PayPal, then update the invoice here (for example set its status to Refunded). Refunds are not recorded automatically. |