Online payments
Let customers pay invoices by FPX, card or e-wallet into the brand's own Billplz, CHIP, toyyibPay or Stripe account, and have each payment recorded in the books by itself.
Who can use this: Admins and the Owner connect the payment app (
integrations:manage) and turn online payments on (books:admin). Customers pay from the invoice link without an account.
How it works
- The money goes straight into the brand's own account with the provider. Antero never holds it.
- Once online payments are on, the invoice's page (
/i/{token}) shows Pay online, and the invoice email's button reads View and pay online. - The customer pays on the provider's checkout page. Antero then asks the provider how it went and, once it is paid, records the payment against the invoice in the account you chose.
- Issued invoices and debit notes with money due can be paid online. Drafts, paid and void invoices and credit notes cannot.
Providers
| Provider | Takes | Fields to connect | Minimum per payment | Refunds through Antero |
|---|---|---|---|---|
| Billplz | FPX and card | Environment, API secret key, Collection ID, Fee per payment (RM) | RM1 | No |
| CHIP | FPX, card and e-wallet | Brand ID, Secret key | RM1 | Yes |
| toyyibPay | FPX and card | Environment, User secret key, Category code, Fee per payment (RM) | RM1 | No |
| Stripe | Card, in any currency | Secret key (sk_ or rk_, test or live) |
RM2 | Yes |
- Billplz and toyyibPay have a sandbox, which is a separate account with its own keys. A CHIP or Stripe test key takes test payments only.
- There is nothing to paste into the provider: each payment carries its own callback and return addresses.
Set up online payments
- Go to Workspace → Integrations and connect Billplz, CHIP, toyyibPay or Stripe. A connection can be for all brands or for one brand; a brand uses its own first. Press Test to check the keys. See Integrations.
- Go to Accounting → Settings → Online payments.
- Collect with: choose the connection. A connection that is failing is marked "(failing)".
- Record payments in: choose the bank or cash account the money lands in, usually the bank account the provider pays out to.
- Tick Let customers pay part of an invoice if you want them to choose how much to pay.
- Press Save. "Customers can now pay invoices online."
To turn it off, set Collect with to Off and save.
What the customer sees
On the invoice's page the customer sees "(amount) to pay" and Pay online.
- When a deposit is asked for, or part payments are on, they choose: Deposit (amount), All of it, or (with part payments) type an amount.
- "Pay securely by FPX or card." is shown under the amount. An amount below the provider's minimum or above what is due shows "Pay between (minimum) and (amount due)."
- Pay online opens the provider's checkout. A checkout opened in the last hour for the same amount is used again, so pressing twice does not make two.
- When they come back, the page says "Thank you. Your payment was received.", "We are waiting for your bank to confirm the payment. This page shows it once it does." or "The payment did not go through. You can try again."
How a payment is confirmed
A payment counts only once Antero has asked the provider itself. It asks:
- when the provider calls back (
/pay/{payment}/callback), - when the customer comes back from paying (
/pay/{payment}/return), - and every ten minutes, with
payments:check, for payments still pending (in case a callback was lost). Payments still pending after three days are given up as cancelled.
When the provider says it is paid:
- It is recorded once, even if the callback and the return arrive together, as a payment into the account you chose, dated the day it was paid in the workspace's time zone.
- The method comes from the provider (FPX and DuitNow QR as bank transfer, cards as card, GrabPay, Touch 'n Go eWallet, ShopeePay and Boost as e-wallet), and the reference is the provider's name and reference, such as "Billplz abc123".
- When it pays the invoice in full, the Invoices paid Telegram alert and An invoice is paid in full automations follow, as for any payment.
- The invoice's page lists each attempt under Paid online: Waiting for payment, Paid ("Recorded as a payment."), Failed (with the provider's reason) or Cancelled.
Note: The queue worker and the scheduler must run (
php artisan queue:work,php artisan schedule:work) forpayments:check.
When a payment cannot be recorded
Sometimes the provider takes the money but the books cannot record it, for example when the invoice was voided, its date is on or before the lock date, or the account for online payments was removed.
- The payment shows as Paid under Paid online, with the reason in red: "Paid online, but not recorded: (reason) Record it by hand."
- Fix the cause and use Record payment on the invoice with the provider's reference.
- If the provider refuses the brand's keys, the connection is marked failing on Workspace → Integrations and in the settings.
Part payments and deposits
- With Let customers pay part of an invoice on, customers pay any amount from the provider's minimum up to what is due. Each part is recorded as it comes in, and the invoice becomes Partly paid.
- An invoice made from a quotation with a deposit offers the deposit first, until that much has been paid. A deposit smaller than the provider's minimum is paid with the rest.
- Without part payments, the customer pays everything due (or the deposit).
Gateway fees
What the provider keeps is booked as an expense, so the bank account shows what actually arrived.
- Stripe and CHIP say what they kept on each payment. (Stripe's fee is used when your Stripe balance is in ringgit.)
- For Billplz and toyyibPay, type Fee per payment (RM) on the connection. Leave it empty to deal with fees during bank reconciliation instead.
- The payment is recorded in full against the invoice: the bank or cash account gets the amount less the fee, and the fee goes to 6015 Payment gateway fees.
Invoices in other currencies
- Only Stripe takes currencies other than ringgit. With another provider, invoices in another currency show no Pay online.
- The minimum is one whole unit of the currency.
- The ringgit Stripe settled is recorded as what reached the bank, and the difference from the invoice's rate is booked as an exchange gain or loss. If Stripe does not say, BNM's rate for the day is used.
Refunds
- Stripe and CHIP: send money back through the provider from a refund note (Back to the card or bank they paid with online) or from a credit note's Refund (Back through Stripe or CHIP). One online payment on the invoice must have enough left to cover the refund. The refund is recorded in the books once the provider accepts it, and it cannot be deleted afterwards.
- Billplz and toyyibPay cannot refund through their API. Refund in their dashboard, then record it in Antero with a refund note paid back from your bank account.
- See Invoices.
Troubleshooting
- No Pay online on the invoice page. Check that Collect with and Record payments in are set, the invoice is issued with money due, and (for another currency) that you collect with Stripe.
- "This invoice cannot be paid online." The invoice was paid, voided or the payment app was disconnected after the page was opened.
- "Pay between (minimum) and (amount due)." The amount is below the provider's minimum or above what is due.
- A payment stays Waiting for payment. The customer has not finished paying, or the bank has not confirmed.
payments:checkasks again every ten minutes for up to three days.