How TillPayments Online Payments Work
Source: tillpayments_controller.rb
- Online mode uses a different live/test determination than terminal mode — there are TWO separate checks in the code, so a workshop could be live on terminal but test on online (or vice versa)
- The online payment flow caches the redirect URL; if it becomes stale (e.g., after a settings change), the cached URL must be cleared to force regeneration
- Same constraints as terminal apply: invoice must be "processed" with full balance due, and a public link token is required for authentication
- Webhook requests are verified using the X-Signature header for security; invalid signatures are rejected
- Surcharge processing in the webhook has three distinct code paths depending on the surcharge amount and company settings, making behavior inconsistent across configurations
- If a webhook reports failure, the system resets fields for retry — but if the payment actually succeeded at TillPayments and only the webhook delivery failed, the payment is effectively lost (money taken, no record)
- The payment confirmation email is sent to the workshop (not the customer); the email subject line contains the typo "Recieved" instead of "Received"
- Payments are only fully processed when the webhook status is "completed"; any payment stuck in "pending" status will sit in limbo with no automatic resolution
Support scenarios
- "Online payments are going to test mode but terminal works fine in live" → Online and terminal modes use two different live/test checks. Verify both settings independently — one can be live while the other is test.
- "Customer paid online but we have no record of it" → If the webhook failed after the payment succeeded at TillPayments, the money was taken but Workshop has no record. Check the TillPayments dashboard directly for the transaction and manually record the payment.
- "Our online payment link isn't working after we changed settings" → The redirect URL is cached. Clear the cached URL so the system regenerates it with the updated settings.
- "The payment confirmation email says 'Recieved'" → This is a known typo in the code. It is cosmetic only and does not affect payment processing.
- "Customer paid but the payment shows as pending" → Only "completed" status triggers full processing. If the webhook reported "pending," the payment will remain in limbo. Check TillPayments to confirm the actual transaction status, then manually process if it completed.