Provider Integration
Provider Integration is the configuration page for each third-party vendor delivering products via WhatsApp in your tenant — PPOB providers (PLN tokens, BPJS, PDAM), ticketing platforms, hotel/flight aggregators, payment gateways, and more.
For each (tenant, vendor) pair, the platform stores:
- Webhook configuration — how to read the vendor’s status callbacks (JSON Pointer, status name mapping, HMAC details).
- Creation message template — message sent to the customer after a booking is created (e.g., payment instructions via VA).
- Settlement message template — message sent when a booking changes status (successful, expired, failed, etc.).
- Encrypted secret — HMAC secret, API key for outbound calls.
Navigation
Section titled “Navigation”The Back-Office sidebar has two related entries:
- Provider Integration (
/integrations) — list, create, edit, and delete vendor configurations per tenant. - Booking Provider (
/integrations/bookings) — browse and debug actual transactions.
Both require the bo:integrations:managepermission. If the entries do not appear in the
sidebar, your role does not have that permission yet — ask an admin to
grant it.
Provider Integration Page
Section titled “Provider Integration Page”List View
Section titled “List View”The /integrations displays every (tenant, vendor) pair on the platform:
| The column | Description |
|---|---|
| Client | Tenant name |
| Provider | Vendor slug (example: welfares) |
| HMAC | Badge Active Secret if a secret is stored |
| Status | Badge Active or Inactive |
| Updated | Last modified time |
Click Edit on a row to edit its configuration. Click New Integration to register a new (tenant, vendor) pair.
Creating a New Integration
Section titled “Creating a New Integration”Use the New Integration to register a vendor for a tenant.
Available fields:
- Client Account ID — Tenant UUID (text input, required).
- Provider Name — vendor slug (for example
welfares). The same slug is used by all tenants using the same vendor (required). - Configuration (JSON) — the complete vendor configuration (see “Config Schema” below).
- Secret (JSON) — optional. Fill in to store the HMAC secret and API key.
The configuration is validated on the client side (JSON parsing) and server side (validation against the WebhookConfig schema in Rust). If the config is invalid, a red error message will appear — fix it and try again.
Click Create to save. The new integration is active by default.
Editing Integrations
Section titled “Editing Integrations”Click Edit on the existing row. The form is auto-filled from the current config. The form header displays Client Account ID, Provider Name, and the Active Secret or No Secret.
Secret behavior: existing secret values are NEVER returned to the browser. The form displays a badge Active Secret if a secret is stored, and the textarea Update Secret (JSON) is empty. Leave the textarea empty to keep the existing secret. Type new JSON to replace it entirely.
Click Update to save the changes.
Deleting an Integration
Section titled “Deleting an Integration”Click Edit on the row, then click Delete. A confirmation dialog will appear; once confirmed, the integration is permanently deleted and this action cannot be undone.
Config Schema
Section titled “Config Schema”The full configuration uses JSON format. Here is a quick reference:
{ "webhook": { "hmac_header": "x-welfares-signature", "booking_ref_path": "/data/bookingUuid", "event_id_path": "/meta/wfProcessId", "status_path": "/data/bookingStatus", "issued_token_path": "/data/message", "hmac_secret_key": "webhook_hmac_secret", "status_mapping": { "ISSUED": "CONFIRMED", "EXPIRED": "EXPIRED", "FAILED": "FAILED", "CANCELLED": "CANCELLED", "REFUNDED": "REFUNDED" } }, "creation_message": { "qris_payload_path": "/qris", "va_number_path": "/account_number", "va_bank_path": "/bank", "qris_caption": "*Bayar via QRIS*\n\n{{amount}}\nRef: {{booking_code}}{{expires}}", "va_text": "*Instruksi Pembayaran {{va_bank}}*\n\nVirtual Account: *{{va_number}}*\n{{amount}}\nRef: {{booking_code}}{{expires}}" }, "settlement_messages": { "CONFIRMED": "*Pembayaran Berhasil*\n\nKode Ref: *{{booking_code}}*\nJumlah: {{amount}}\n\n{{token_block}}", "EXPIRED": "*Pembayaran Kedaluwarsa*\n\nKode Ref: {{booking_code}}\n\nKetik *menu* untuk mulai lagi.", "FAILED": "Transaksi gagal. Ref: {{booking_code}}.", "CANCELLED": "Transaksi {{booking_code}} dibatalkan.", "REFUNDED": "Dana untuk transaksi {{booking_code}} telah dikembalikan." }}Available Template Variables
Section titled “Available Template Variables”In creation_message and settlement_messages, you can use the following variables:
| Variables | Filled in by |
|---|---|
{{booking_code}} | Booking code that the customer can read (for example, RH5CNQ) |
{{booking_ref}} | Vendor correlation reference (UUID, etc.) |
{{account}} | Customer identifier (PLN ID, etc.) |
{{amount}} | Amount in Rupiah format (“Rp 53.000”) |
{{product_code}} | Product code (for example P500) |
{{product_label}} | Product label |
{{provider_name}} | Provider slug |
{{va_bank}} | Bank name (creation message only, when paying via VA) |
{{va_number}} | Virtual Account number (creation message only) |
{{token_block}} | For prepaid token products, displays *Token:*\n<token> — empty for non-token bookings |
{{expires}} | If payment_time_limit is set: displays the payment deadline |
Setting / Rotating the HMAC Secret
Section titled “Setting / Rotating the HMAC Secret”After the vendor shares a new secret (always via 1Password or Bitwarden, never via plain email):
- Open the integration in Edit.
- In the Update Secret (JSON), paste:
Key name{ "webhook_hmac_secret": "<string-secret>" }
webhook_hmac_secretmust match the valuewebhook.hmac_secret_keyin the config. - Click Update.
The secret is encrypted before being stored. You will not be able to view it again — the form will display a badge Active Secret on the next visit.
To delete all secrets, paste an {} empty.
Booking Provider Page
Section titled “Booking Provider Page”/integrations/bookings is a debugging page — it displays every booking tracked by the platform, with filters and drill-down.
Filter
Section titled “Filter”At the top of the page:
- Phone — partial search by recipient phone number.
- Booking Ref — exact search by vendor reference.
- Status — canonical status dropdown (default All Statuses).
Filters are combined with AND logic. The page uses pagination of 50 rows per page.
List Columns
Section titled “List Columns”| Column | Description |
|---|---|
| Created | Creation timestamp |
| Client | Tenant name |
| Provider | Vendor slug |
| Ref | First 12 characters of the vendor reference (truncated with ”…” if longer) |
| Phone | Recipient phone number |
| Status | Current canonical status |
| Amount Amount in Rupiah |
Click Ref on the row to open the detail view.
Booking Detail
Section titled “Booking Detail”The detail view has three sections:
Header card — booking metadata: provider, vendor reference, booking code, recipient phone number, status, amount, and creation/update timestamps.
Payment instructions — the JSON payment_instruction received from the vendor (displayed as-is when present). For VA it generally contains the bank + account number; for QRIS it contains the EMVCO payload.
Event timeline — a reverse-chronological list of every event on the booking:
| Event type | Description |
|---|---|
webhook_received | Webhook received from the vendor |
message_sent | Message successfully sent to the customer |
message_failed | Message delivery failed |
Each event shows the status transition inline ((status_lama → status_baru)) when available. The timeline automatically refreshes every 5 seconds while the page is open.
General Debugging
Section titled “General Debugging”Customer says “I already paid but haven’t received the token”:
- Search by the customer’s phone number.
- Find the most recent booking.
- Open the details and check the timeline:
- Nothing
webhook_received— the vendor did not send a notification. Thenotify_urlmay be misconfigured. Contact vendor support. - There is
webhook_received(CONFIRMED) but nomessage_sent— settlement message delivery failed. Look for themessage_failedto view the error. - There is
message_sentwithwamid— the message has left the system. Check the delivery status in Meta Business Manager.
- Nothing
Customer says “Haven’t paid but keep getting reminders”:
DEP is not sending the reminder. The vendor is sending it via another channel. Confirm by checking the timeline: there should only be one message_sent
(creation phase) and no further messages.
Adding a New Vendor (End-to-End)
Section titled “Adding a New Vendor (End-to-End)”- Coordinate with the vendor. Get a sample webhook payload, the booking reference path, the status path, and their complete status vocabulary list.
- Map their statuses to the canonical statuses (
NEW,AWAITING_PAYMENT,PROCESSING,CONFIRMED,EXPIRED,FAILED,CANCELLED,REFUNDED). - Set up
provider_integrations.configper tenant, including the JSON Pointer, status mapping, and message template. - In
/integrations→Integrasi Baru, create a new row. Select the tenant, paste the config. Do not add the HMAC secret yet. - Ask the vendor to send a test webhook (with a non-existent booking ref). The expected result is an HTTP 200 response with
orphan: true— confirming the endpoint is reachable and the provider is configured. (If the provider does not have an active integration at all, the endpoint returns HTTP 404.) - Run a real end-to-end booking through the tenant’s automation flow. Confirm the timeline shows
message_sent(creation), thenwebhook_received, thenmessage_sent(settlement). - After the smoke test succeeds, add the HMAC secret via Edit → Secret.
- Monitor during the first few days — trace bookings and watch out for events
message_failed.
Access Permission
Section titled “Access Permission”Permission bo:integrations:manage controls all access to this page:
- Viewing the list and details.
- Creating, editing, and deleting integrations.
- Search for a booking and view its details.
If the sidebar entry does not appear, your role may not yet have this permission.
Ask an admin to add the permission bo:integrations:manage to your role.