A payment-slip verification flow for LINE OA shop orders (pattern + lessons)

We run customer support for small Thai online shops that take orders through LINE Official Accounts. The most time-consuming part was never the chat — it was verifying bank-transfer slips: customers paste a transfer screenshot or reference number into the chat, and someone had to open a banking app and match the amount before shipping.

We wired the whole check into Node-RED and it cut verification from minutes to seconds per order. Sharing the pattern in case it helps anyone automating order ops:

Flow outline

  1. http in receives the LINE webhook (or email in / IMAP for bank notification mails on a dedicated inbox).
  2. A function node normalizes the payload and extracts amount, transfer reference and timestamp (regex per bank message format — every Thai bank has a slightly different one, so keep one regex map per bank).
  3. Matching: keep expected payments in context (order id → expected amount, valid time window). A switch node routes: exact match / amount mismatch / duplicate / no reference found.
  4. Only mismatch cases go to a human queue — that was the big win: roughly 90% of slips never need a person.
  5. Replies go through the LINE Messaging API push endpoint via http request, with per-customer rate limiting so retry storms never spam customers.

Lessons

  • Store matched slips with a file node (JSONL) instead of memory, so restarts don't wipe the audit trail.
  • Duplicate detection matters more than OCR: impatient customers re-send the same slip 3-4 times.
  • Answer the webhook fast and push heavy work downstream — LINE times out quickly.

Happy to go deeper on any step. We also wrote up the slip-verification checklist we hand to shop admins here: แผนภูมิตัดสินใจก่อนอนุมัติสลิปโอน (ฉบับร้าน 1–5 คน)

1 Like