Card payments through your own gateway
Customers can pay an invoice by card from its pay link, as well as by PromptPay. The payment goes through a payment gateway account that your business opens in its own name (Opn Payments or Beam), and the gateway pays the money into your bank. Somdul records the receipt for you, and later the payout and the gateway’s fee.
Somdul never holds the money and never sees the card. The customer types the card on the gateway’s own secure form.
Open in Somdul: Settings → Company · Sales → Slips to check → Card payments
Before you start
Section titled “Before you start”- Open a merchant account with a gateway, in your business’s name: Opn Payments or Beam. The gateway checks your business and agrees its fees with you. ChillPay isn’t offered yet.
- Get your keys from the gateway’s dashboard. Opn Payments: the public key (pkey_…) and secret key (skey_…). Beam: the merchant ID and an API key. Both give test keys too, for trying it first.
- Who can do it: only admins can connect or change the gateway. Admins and accountants can test the connection, check card payments and record payouts.
- Paying online must be on (Settings → Features, Pay online by PromptPay). A PromptPay ID is no longer required: a company with only a gateway can send pay links too.
How do I let customers pay by card?
Section titled “How do I let customers pay by card?”-
Go to Settings → Company, to Card payments through your own gateway. Choose the Payment gateway.
-
Paste the keys. For Opn Payments: Public key and Secret key. For Beam: Merchant ID and API key. To try it first, tick Test mode and use the gateway’s test keys.
-
Leave Card payments land in on Card payments awaiting payout (Somdul makes this account for you), or choose your own cash-and-bank style account.
-
Click Save and test. Somdul checks the keys with the gateway first; only keys that work are saved. The secret key is stored encrypted on Somdul’s server and is never shown again (you see only its last 4 characters).
-
Beam only: copy the Payment notices address shown under the keys and add it as a webhook for payment link events in Beam’s dashboard. Opn Payments needs nothing: each payment tells Opn where to send its notices.
From then on, every pay link shows Pay by card under the PromptPay QR. A company without a PromptPay ID that uses Opn Payments also gets Pay by PromptPay QR through the gateway.
What the customer sees
Section titled “What the customer sees”-
On the pay link, they tap Pay ฿… by card. The amount is what the invoice still owes, the same figure as the PromptPay QR.
-
With Opn Payments, Opn’s own card form opens on the page (it comes from Opn, not Somdul). With Beam, they go to Beam’s own payment page.
-
Their bank may ask them to confirm (3-D Secure). Then they come back to the pay page, which shows Paid and the receipt number.
A customer with an email address also gets a confirmation email with the receipt number and a link to the receipt, where they can download it as a PDF, as for PromptPay.
How Somdul knows a payment is real
Section titled “How Somdul knows a payment is real”When a payment finishes, the gateway sends a notice to Somdul, and the customer’s page asks too when they come back. Somdul believes neither on its own: it always asks the gateway’s own system about the payment, using your secret key, and records what the gateway says. The same payment can’t be recorded twice. If a notice is missed, Somdul asks the gateway again later.
When a payment is receipted automatically
Section titled “When a payment is receipted automatically”The receipt is recorded and posted (in the name of the admin who connected the gateway) when the payment is:
| Check | Passes when | Otherwise it waits as |
|---|---|---|
| Live | It was made with live keys. | Test payment (never receipted: close it) |
| Amount | It equals what the invoice still owes, in baht. | Paid less than owed or Paid more than owed |
| Still owing | The invoice wasn’t already paid. | Invoice already paid (probably paid twice) |
| Retention | The invoice holds no retention. | Invoice holds retention |
Anything that waits appears in Sales → Slips to check → Card payments. There you can Record receipt (for what the card paid) or Close without receipt with a reason (for example a test payment, or one you refunded in the gateway).
Recording the gateway’s payout
Section titled “Recording the gateway’s payout”The gateway pays out to your bank a few days later, less its fee. Card receipts wait in Card payments awaiting payout until then.
-
Open Sales → Slips to check → Card payments. Under Record a payout from the gateway, tick the payments the payout covers.
-
Check the Payout date, choose the bank account it was Paid into, and check the Gateway fee (before VAT) and VAT on the fee. For Opn Payments, Somdul fills these in from what Opn reported for each payment; for Beam, take them from Beam’s settlement report.
-
Click Record payout. Somdul shows Arrives in the bank: it should match your bank statement.
A payout recorded by mistake can be cancelled from the Payouts list; its payments go back to waiting.
Refunds and disputes
Section titled “Refunds and disputes”Refunds are made in the gateway’s own dashboard, not in Somdul. When the gateway reports a refund, or that a cardholder disputed a payment, the payment is flagged on its invoice and in Card payments. Deal with it in your books (a credit note, or cancel the receipt), then click Mark handled. Nothing is reversed for you.
What happens in the accounts
Section titled “What happens in the accounts”Example: invoice INV2026-00031 for ฿10,700 (฿10,000 plus 7% VAT). The customer pays by card.
When the payment is receipted:
| Account | Debit | Credit |
|---|---|---|
| 1125 Card payments awaiting payout | 10,700.00 | |
| Trade receivables | 10,700.00 |
When the gateway pays out, keeping a fee of ฿390.55 plus ฿27.34 VAT:
| Account | Debit | Credit |
|---|---|---|
| 1121 Bank - current account | 10,282.11 | |
| 5270 Bank charges (the gateway’s fee) | 390.55 | |
| Input VAT | 27.34 | |
| 1125 Card payments awaiting payout | 10,700.00 |
For a company that isn’t VAT registered, the VAT goes onto the fee.
Thai tax and legal notes
Section titled “Thai tax and legal notes”- The money is yours. The gateway account is in your business’s name and pays into your bank. Somdul doesn’t collect or hold money for you; collecting payments on someone else’s behalf generally needs a licence under the Payment Systems Act B.E. 2560.
- Don’t add the fee to the customer’s bill. Visa’s rules don’t allow card surcharges in Thailand (Visa Core Rules, “Surcharges”), and Opn’s Thai merchant agreement says the merchant must not pass its service fee on to the customer. The fee is a cost of your business.
- Input VAT on the fee (the VAT the gateway charged you) can generally be claimed only with the gateway’s tax invoice. Check its monthly tax invoice before claiming.
- The receipt is your receipt (ใบเสร็จรับเงิน), issued under your name. A receipt that is also the tax invoice (VAT due on payment) works the same way.
Privacy and security
Section titled “Privacy and security”- Card numbers never reach Somdul. With Opn Payments, Opn’s form turns the card into a one-time token in the customer’s browser; with Beam, the card is typed on Beam’s page.
- Somdul keeps the card’s brand and last 4 digits, the gateway’s reference, the amount and the fee. The customer’s internet address is cleared after 90 days.
- Your secret key is encrypted on Somdul’s server. Nobody can read it back, including you: to change it, paste a new one.
Common mistakes
Section titled “Common mistakes”- Test keys with Test mode off (or the other way round) → Somdul refuses them. Opn’s test keys start with pkey_test_ and skey_test_.
- Testing with real cards in test mode → test payments never become receipts. Close them in Card payments.
- Beam: payments arriving late → check the Payment notices address is added in Beam’s dashboard. Without it, a payment is still recorded when the customer comes back to the pay page, or when Somdul asks Beam again later, but not straight away.
- Recording the payout for the full card amount → the bank receives less than the card payments; enter the fee so the bank side matches your statement.
Questions
Section titled “Questions”Which gateways can I connect?
Section titled “Which gateways can I connect?”Opn Payments (formerly Omise) and Beam Checkout. ChillPay is planned but not offered yet.
Does Somdul charge for card payments?
Section titled “Does Somdul charge for card payments?”Somdul takes nothing from the payment. The gateway charges its own fee, under your agreement with it.
Can the customer pay part of an invoice by card?
Section titled “Can the customer pay part of an invoice by card?”No. The card pays what the invoice still owes. If the invoice changes while they pay and the amounts no longer match, the payment waits in Card payments for you.
What if I disconnect the gateway?
Section titled “What if I disconnect the gateway?”Customers can no longer pay by card. Payments already made, their receipts and payouts stay.
Does it work in the demo?
Section titled “Does it work in the demo?”The demo shows example card payments, one waiting and one refund flagged, and a payout. It has no gateway keys, so no demo page takes real payments.