Skip to content

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.

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.

The /integrations displays every (tenant, vendor) pair on the platform:

The columnDescription
ClientTenant name
ProviderVendor slug (example: welfares)
HMACBadge Active Secret if a secret is stored
StatusBadge Active or Inactive
UpdatedLast modified time

Click Edit on a row to edit its configuration. Click New Integration to register a new (tenant, vendor) pair.

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.

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.

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.

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."
}
}

In creation_message and settlement_messages, you can use the following variables:

VariablesFilled 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

After the vendor shares a new secret (always via 1Password or Bitwarden, never via plain email):

  1. Open the integration in Edit.
  2. In the Update Secret (JSON), paste:
    { "webhook_hmac_secret": "<string-secret>" }
    Key name webhook_hmac_secret must match the value webhook.hmac_secret_key in the config.
  3. 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.

/integrations/bookings is a debugging page — it displays every booking tracked by the platform, with filters and drill-down.

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.

ColumnDescription
CreatedCreation timestamp
ClientTenant name
ProviderVendor slug
RefFirst 12 characters of the vendor reference (truncated with ”…” if longer)
PhoneRecipient phone number
StatusCurrent canonical status
Amount Amount in Rupiah

Click Ref on the row to open the detail view.

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 typeDescription
webhook_receivedWebhook received from the vendor
message_sentMessage successfully sent to the customer
message_failedMessage 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.

Customer says “I already paid but haven’t received the token”:

  1. Search by the customer’s phone number.
  2. Find the most recent booking.
  3. Open the details and check the timeline:
    • Nothing webhook_received — the vendor did not send a notification. The notify_url may be misconfigured. Contact vendor support.
    • There is webhook_received (CONFIRMED) but no message_sent — settlement message delivery failed. Look for the message_failed to view the error.
    • There is message_sent with wamid — the message has left the system. Check the delivery status in Meta Business Manager.

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.

  1. Coordinate with the vendor. Get a sample webhook payload, the booking reference path, the status path, and their complete status vocabulary list.
  2. Map their statuses to the canonical statuses (NEW, AWAITING_PAYMENT, PROCESSING, CONFIRMED, EXPIRED, FAILED, CANCELLED, REFUNDED).
  3. Set up provider_integrations.config per tenant, including the JSON Pointer, status mapping, and message template.
  4. In /integrations → Integrasi Baru, create a new row. Select the tenant, paste the config. Do not add the HMAC secret yet.
  5. 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.)
  6. Run a real end-to-end booking through the tenant’s automation flow. Confirm the timeline shows message_sent (creation), then webhook_received, then message_sent (settlement).
  7. After the smoke test succeeds, add the HMAC secret via Edit → Secret.
  8. Monitor during the first few days — trace bookings and watch out for events message_failed.

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.