Chatbot payment creation, status verification এবং automation node setup-এর জন্য TikiPay n8n workflow guide. এই guide basic install-এর পাশাপাশি requirements, secure configuration, payment flow, backend verification, testing, troubleshooting এবং production checklist cover করে.
TikiPay Chatbot n8n Workflow overview
This is a n8n / chatbot workflow for connecting an existing platform with TikiPay. The integration should create or initiate a payment, return the customer to the right experience, and—most importantly—verify the payment on the backend before changing the local invoice/order/service state.
Best for
- Existing website owners
- Developers who want faster deployment
- Businesses using backend verification
Requirements
- n8n workspace or compatible automation engine
- Webhook URL
- Secure TikiPay credential storage
- Connected chatbot/channel
Before you install
Production website-এ payment module install করার আগে backup, platform version, PHP/runtime compatibility, cache layer এবং callback URL check করুন. Existing gateway file replace করলে old configuration export/screenshot রাখুন. Test credentials এবং live credentials mix করবেন না.
Important: Package install সফল হলেই payment integration complete নয়. Create/redirect কাজ করলেও backend verification, status mapping এবং duplicate-callback handling test না করা পর্যন্ত production traffic চালাবেন না.
Installation steps
- Download the TikiPay workflow JSON.
- Import the JSON into n8n.
- Inspect every node before activating it.
- Create or select the TikiPay HTTP credential/secret in n8n.
- Connect the incoming chatbot trigger to the payment-create nodes.
- Connect success/failure branches to customer messaging.
- Add backend verification before service delivery or access unlock.
- Test with a sample chat from start to verified completion.
Configuration checklist
- Set the customer-facing gateway title to TikiPay.
- Configure success, cancel and webhook/return URLs where supported.
- Keep API keys server-side; never expose them in browser JavaScript.
- Map COMPLETED, PENDING and failed/error states to safe local order states.
- Store your own order reference so each TikiPay invoice maps to exactly one local order.
- Make fulfillment idempotent so repeated callbacks cannot deliver twice.
Credential
API secret protected server/admin setting-এ রাখুন.
Return URLs
Success/cancel customer experience-এর জন্য; paid decision-এর একমাত্র source নয়.
Webhook / Verify
Authoritative backend payment state confirm করতে ব্যবহার করুন.
How the payment flow works
- Customer selects TikiPay at checkout.
- The integration creates a TikiPay invoice/payment session.
- Customer completes the selected payment method.
- Return or webhook provides an event signal.
- Your server performs authoritative verification.
- Only a verified COMPLETED result updates the local order, balance, membership or service.
Verification and status mapping
| Remote state | Local action | Do not do |
|---|---|---|
| COMPLETED | Validate order/amount/reference, then fulfill once | Do not fulfill twice on repeated callback |
| PENDING | Keep invoice/order open and re-check later | Do not mark paid prematurely |
| FAILED / ERROR | Keep unpaid/failed; allow safe retry | Do not deliver service |
| Unknown / timeout | Log and query verification again | Do not assume success |
Testing checklist
Troubleshooting
- Payment option missing: confirm the extension is enabled and assigned to the active store/currency.
- Redirect fails: check base URL, route configuration and HTTPS.
- Order remains pending: check callback/webhook reachability and backend verification logs.
- Duplicate fulfillment: add an idempotency guard keyed by local order + TikiPay invoice/transaction.
- Invalid credentials: regenerate or re-copy the Brand API key and remove accidental spaces.
- Works in test but not live: confirm the production endpoint and production credentials are selected together.
Production security
- Use HTTPS everywhere.
- Store API keys in server-side configuration or protected admin settings.
- Never trust browser return parameters as final payment proof.
- Map remote invoice/reference to one local order.
- Validate expected amount before fulfillment.
- Use database/idempotency guard to prevent duplicate credit.
- Keep a safe audit trail of payment status changes.
- Rotate credentials if they are accidentally exposed.
FAQ about TikiPay Chatbot n8n Workflow
Live TikiPay account লাগবে?
Production payment-এর জন্য valid live plan/credentials প্রয়োজন. Test/sandbox values production-এর সাথে mix করবেন না.
Customer success page দেখলেই invoice paid?
না. Backend verification সফল হওয়ার পরে local invoice/order paid mark করুন.
Module update করলে settings হারাবে?
Platform অনুযায়ী ভিন্ন. Update-এর আগে backup/export রাখুন এবং package instructions follow করুন.
Callback দুইবার এলে?
Idempotent fulfillment ব্যবহার করুন যাতে একই payment একবারের বেশি credit/deliver না হয়.
Integration support কোথায়?
TikiPay Developer Docs, Apps & Modules page এবং Contact support ব্যবহার করুন.
TikiPay Chatbot n8n Workflow Guide is documented here as a complete production-oriented n8n / chatbot workflow. The sections below go beyond the short install steps and cover preparation, backup, credentials, callbacks, verification, testing, offline/online behaviour where relevant, security, troubleshooting, upgrade and rollback planning.
Version, backup, HTTPS, account and credentials.
Upload or register the TikiPay package correctly.
Keys, return routes, webhook and local status mapping.
Backend verification before paid status or delivery.
Logs, retries, updates, monitoring and rollback.
1. Understand the integration boundary
A payment extension should not own your entire business workflow. TikiPay should create or identify a payment session, return a customer-facing payment experience, and give your backend enough information to verify the final payment state. Your platform should remain responsible for the local order, invoice, subscription, balance, course, hosting service or digital-delivery record.
Treat the browser return as a user-experience event and the backend verification response as the authoritative payment decision. This separation prevents a customer from forcing a paid screen by opening a success URL manually and makes the integration easier to audit when something goes wrong.
- Keep local order IDs and remote payment/session IDs mapped one-to-one.
- Never expose private API credentials in JavaScript, HTML, APK resources or public logs.
- Design fulfillment so the same verified payment cannot credit or deliver twice.
2. Production readiness before upload
Before installing TikiPay Chatbot n8n Workflow Guide, record the current platform version, PHP/runtime version, database version, active theme or template, caching plugins, reverse proxy or CDN behaviour and any existing payment customizations. A module can install successfully but still fail because a callback route is blocked, a cache serves stale configuration, or a security plugin rejects the request.
Create a recoverable backup before replacing files. For a production store, the safest process is to test the same package in staging or a cloned site first. Keep the old gateway files and configuration values available so you can roll back without interrupting checkout for long.
- Confirm HTTPS works without redirect loops.
- Confirm the application can make outbound HTTPS requests.
- Confirm the callback or webhook route is publicly reachable.
- Use test credentials during setup and live credentials only after the full test matrix passes.
3. Credentials and environment separation
Use separate configuration for test and live environments. A common failure is combining a production base URL with a sandbox key or a test URL with a live key. Store Brand API credentials in the protected setting provided by the platform, a server environment file, or a secret manager.
Do not paste credentials into screenshots, support tickets, public repositories or frontend source. If a credential is accidentally exposed, rotate it and update the integration immediately. Configuration should also include a clear gateway display name, success/cancel destinations and the server-side verification or webhook route.
- Trim accidental spaces when pasting keys.
- Do not hard-code a domain if the TikiPay integration supports environment-aware URLs.
- Document which brand/account owns each production key.
- Limit admin access to users who actually need gateway settings.
4. Installation sequence in a safe order
Install the package using the native extension flow of the target platform whenever possible. If the package requires manual upload, preserve its folder structure exactly. File names, namespaces, route locations and callback paths are often case-sensitive on Linux servers.
After activation, open the payment settings once before testing checkout. Save the configuration, clear application and browser cache, then verify that the TikiPay method appears only on the intended store, currency, product or invoice context.
- Download the TikiPay workflow JSON.
- Import the JSON into n8n.
- Inspect every node before activating it.
- Create or select the TikiPay HTTP credential/secret in n8n.
- Connect the incoming chatbot trigger to the payment-create nodes.
- Connect success/failure branches to customer messaging.
- Add backend verification before service delivery or access unlock.
- Test with a sample chat from start to verified completion.
5. Configuration field-by-field review
Do not treat the configuration screen as a copy-paste form. Each field affects a part of the payment lifecycle. The API credential authenticates server requests; the return URL controls where the customer goes; the webhook or callback allows asynchronous events; local status mapping determines whether an order stays pending, moves to processing or becomes completed.
If the platform has debug mode, use it only while testing and avoid logging secrets. If the integration offers a payment description, write a short customer-friendly message that explains the supported payment method and what the customer should do after paying.
- Set the customer-facing gateway title to TikiPay.
- Configure success, cancel and webhook/return URLs where supported.
- Keep API keys server-side; never expose them in browser JavaScript.
- Map COMPLETED, PENDING and failed/error states to safe local order states.
- Store your own order reference so each TikiPay invoice maps to exactly one local order.
- Make fulfillment idempotent so repeated callbacks cannot deliver twice.
6. Create-payment request design
When checkout starts, create the local order first and freeze the amount that is expected for that payment attempt. Send the customer identity fields required by the API, the exact amount, success/cancel URLs and an internal order reference or metadata value. This gives your server a stable record even if the customer closes the browser after payment.
Validate the API response before redirecting. A successful HTTP connection is not automatically a successful invoice creation. Check the response status, required payment URL and remote invoice/session identifier. Store that identifier with the local order so later verification can find the correct record.
- Never calculate the final payable amount only in the browser.
- Use server-side totals after discounts, taxes or wallet adjustments.
- Reject invalid or negative amounts before calling the API.
- Store the remote session or invoice reference before redirecting the customer.
7. Customer return flow
The success page should tell the customer that payment information is being verified, not blindly declare the order paid. The cancel page should keep the local order unpaid and offer a safe retry path. If the customer leaves without returning, webhook or later verification should still be able to reconcile the payment.
A good return page is fast and simple. It can poll your own backend for a short period or show a pending state while the server performs verification. The browser should never receive the private API key.
- Success redirect = customer experience signal.
- Server verification = payment decision.
- Cancel redirect must not delete the order immediately.
- Timeout should remain recoverable.
8. Backend verification and status mapping
After payment, the server should verify the invoice or transaction and compare it with the local order. Check the remote status, amount, invoice/session identifier, payment provider or reference where available, and whether the same transaction has already been consumed by another order.
Map COMPLETED to a one-time fulfillment action, PENDING to a waiting/recheck state, FAILED or ERROR to an unpaid state, and unknown/timeout to a recoverable review state. Keep this mapping centralized rather than scattering payment rules across controllers and templates.
- COMPLETED: verify amount/reference then fulfill once.
- PENDING: keep open and retry verification safely.
- FAILED/ERROR: do not deliver; allow customer retry if appropriate.
- Unknown/timeout: log, keep pending and re-query.
9. Webhook and callback handling
Webhook delivery can be delayed or repeated, so the handler must be idempotent. Load the local order by the stored remote reference, verify the current remote status, then apply the transition only if the local order has not already been fulfilled.
Return a quick HTTP response after safe processing. Expensive fulfilment such as generating a file, provisioning hosting or calling another API can be queued. Record only the information needed for audit and troubleshooting; do not dump secrets into logs.
- Verify before fulfillment even when a callback says success.
- Allow repeated callback delivery without repeated credit.
- Log timestamp, local order, remote reference and final state.
- Use HTTPS and protect internal callback routes from unrelated requests.
10. Testing matrix before live traffic
One successful test order is not enough. Run normal success, wrong amount, customer cancel, pending payment, duplicate callback, repeated browser refresh, delayed return, expired session, API timeout and invalid-credential scenarios. The goal is to prove that failure states stay safe, not only that the happy path works.
For billing, membership, SMM or wallet top-up integrations, verify that credit is applied exactly once. For ecommerce, confirm stock, email and fulfilment jobs are triggered only after the final paid state. For digital products, confirm a failed or pending customer cannot obtain the protected file.
- Test success with the smallest practical amount.
- Test wrong/partial amount if the payment method supports it.
- Test duplicate verification and duplicate callback.
- Test customer closing the browser after payment.
- Test network timeout between your server and TikiPay.
- Test rollback after temporarily disabling the extension.
11. Logs and observability
Payment support becomes much easier when the application records a small structured audit trail. Log the local order ID, remote invoice/session ID, verification timestamp, normalized status, provider/reference when available and the action taken by the application.
Avoid storing full secrets or unnecessary personal data. Build a simple operational view where support can distinguish pending, completed, failed and needs-review records. This reduces the temptation to approve payments manually from screenshots.
- Keep timestamps in a consistent timezone.
- Mask tokens and sensitive identifiers in logs.
- Make logs searchable by order and remote reference.
- Retain only what your operational and legal policy requires.
12. Security hardening
Use server-side validation for every amount and order state. Apply CSRF protection to admin forms, protect configuration pages with appropriate roles, and restrict file permissions for environment or configuration files. Disable directory listing and do not keep backup ZIP files inside a public web directory.
When using webhooks or callbacks, verify the payment again server-to-server before fulfillment. Rotate leaked credentials, use HTTPS, keep dependencies updated and review access logs if you see unusual create or verify traffic.
- No secret in source code repository.
- No secret in frontend JavaScript.
- No paid status based only on query-string values.
- No duplicate delivery without an idempotency guard.
- No automatic approval when expected amount does not match.
13. Performance and customer experience
The checkout button should disable after the first click while the server creates a payment session. This avoids accidental duplicate invoices. Use reasonable HTTP timeouts and show a useful retry message rather than leaving the customer on an endless spinner.
Do not run slow fulfilment jobs inside the browser request when they can be queued. The customer should receive a clear status quickly while the backend completes safe post-payment work.
- Prevent repeated create clicks.
- Use a short pending message while verification runs.
- Cache static assets, not payment status responses.
- Keep API calls server-side and time-bounded.
14. Upgrade, rollback and maintenance
Before updating TikiPay Chatbot n8n Workflow Guide, read the package notes, back up the current version and record settings. After updating, repeat at least one create/verify test and one failure-state test. Platform core updates can also affect payment hooks or route behaviour, so include payment testing in every release checklist.
If an update causes checkout errors, disable the new module or restore the previous package rather than editing production files blindly. Preserve database records and local order references during rollback so payments already in progress can still be reconciled.
- Keep the previous working package.
- Document configuration changes.
- Retest after platform, PHP/runtime or theme updates.
- Rotate keys only with a planned rollout so old in-flight requests are handled safely.
15. Production launch plan
Launch gradually. Enable TikiPay for a controlled set of users or a low-risk product first, watch logs and support requests, then expand. Keep another safe payment route available during the first production window if your business cannot tolerate checkout downtime.
Define who responds when an order remains pending, who can inspect verification records, who can rotate credentials and how customers are informed during an incident. A reliable payment integration is an operational process, not only a plugin installation.
- Run a final live low-value test.
- Confirm support contact and escalation owner.
- Confirm dashboard, callback and verify logs are visible.
- Confirm rollback path.
- Confirm customer-facing payment instructions are accurate.
17. Detailed troubleshooting reference
Gateway is not visible at checkout
Check extension activation, store/currency restrictions, page cache and whether the module is assigned to the current site or store.
Create request returns authentication error
Re-copy the Brand API key, remove spaces, confirm environment and rotate the key if it may have been exposed.
Payment URL is empty
Inspect the API response status and required fields instead of redirecting blindly.
Customer returns but order stays pending
Check the backend verify call and the stored remote invoice/session mapping.
Callback never arrives
Confirm public HTTPS reachability, firewall/WAF rules, route method and application logs.
Callback arrives twice
Use idempotent order transitions and a unique guard for the remote payment reference.
Order is paid twice
Stop fulfilment immediately, add a database uniqueness/idempotency check and inspect callback/retry logic.
Wrong amount was approved
Compare the verified remote amount with the frozen local order amount before fulfilment.
Works on staging but not production
Compare endpoint, key, PHP/runtime modules, firewall, SSL and cache configuration.
Works on desktop but not mobile
Check responsive checkout UI, browser redirects, popup restrictions and mobile network behaviour.
API timeout occurs
Keep the local order pending, log the attempt and re-query safely rather than assuming failure or success.
Customer closes browser after payment
Use webhook or later backend verification to reconcile the payment.
Plugin update broke checkout
Restore the previous package, clear cache and compare platform compatibility before retrying.
Payment method duplicates in checkout
Disable obsolete/legacy modules and confirm only one TikiPay gateway registration is active.
Debug logs contain secrets
Remove or mask them, rotate exposed credentials and tighten log output immediately.
Android sync stops in background
Review permissions, battery optimization, background restrictions and device connection state.
Queued event syncs late
Keep affected orders pending until the event reaches the server and verification succeeds.
User reports paid but system says pending
Search by order and remote reference, wait for sync/webhook if applicable, then perform authoritative server verification.
Payment is verified but service did not activate
Inspect the local fulfilment hook/job, not only the payment API response.
Service activates on failed payment
Move business fulfilment behind the verified COMPLETED branch only.
18. Extended FAQ
Do I need a TikiPay account?
A live production workflow needs an active account/plan and valid credentials. Use test values only in the testing environment.
Can I mark an order paid from the success URL?
No. Treat the return as a UI event and run backend verification before the paid transition.
Where should the Brand API key be stored?
Use the protected gateway settings, server environment file or secret manager. Do not expose it to the browser.
Can a callback be repeated?
Yes. Your handler must be safe when the same event is delivered more than once.
What happens to pending payments?
Keep the order pending and run controlled re-verification. Do not deliver before a verified completed state.
Should I delete a cancelled order?
Usually keep it as unpaid/cancelled so support and reconciliation have an audit trail.
Can I use the module on multiple websites?
That depends on your TikiPay plan and brand/device configuration. Use the dashboard and plan rules as the authoritative source.
Do I need HTTPS?
Yes for production payment and callback pages. HTTPS also prevents credentials and session data from being exposed in transit.
Can I use frontend JavaScript for the private API call?
No. Send the browser to your backend and let the backend call TikiPay using the secret credential.
How do I prevent double balance credit?
Use a unique remote payment reference plus an atomic/idempotent local credit operation.
Can I customize the gateway title?
If the platform package exposes a title/description field, you can use customer-friendly TikiPay wording while keeping the integration identity intact.
What should I log?
Local order ID, remote reference, normalized status, timestamps and the action taken. Mask secrets.
How do I test wrong amounts?
Use a controlled test flow and confirm that mismatch never reaches your fulfilment branch.
What if TikiPay API is temporarily unreachable?
Keep the order recoverable, show pending/retry messaging, log the failure and retry verification safely.
Can I disable the gateway without removing files?
Most platforms allow deactivation. Prefer disabling before deleting files so in-flight records remain traceable.
Will cache affect payment status?
It can. Exclude dynamic checkout, callback and verification endpoints from full-page cache.
What if the customer pays after session expiry?
Do not auto-approve from a screenshot. Reconcile using the provider/reference and your supported verification policy.
Can support staff manually mark paid?
If your business allows manual override, restrict it to trusted roles and require an audit reason. Automated verification should remain the normal path.
How do I roll back an update?
Restore the previous working module/package and configuration, clear cache and run a verification test before reopening traffic.
Where can developers continue?
Use the TikiPay Developer Docs, Apps & Modules page and your internal deployment notes for endpoint and package-specific details.