Skip to main content
Use this path after setting up MPS with Messages processed by: Your infrastructure. You own registration, messaging, and message webhooks; Kapso provides managed billing.

At a glance

  1. Prepare your Meta app and copy your MPS Solution ID.
  2. Launch Embedded Signup so the customer can authorize your app.
  3. Complete onboarding on your backend, including registration and webhook setup.
  4. Confirm Kapso detected and funded the account before paid traffic.
  5. Start messaging and monitor usage in Kapso.
This path uses Meta’s JavaScript SDK, not @kapso/sdk, a Kapso setup link, or Kapso’s onboarding endpoints.

Prepare your Meta app

  • Activate a Multi-partner Solution with Messages processed by: Your infrastructure and App with messaging permission: Your Meta app.
  • Copy the Meta solution ID from Tenants > Multi-partner solution. This is not the Meta App ID or a Kapso UUID.
  • Create a Facebook Login for Business configuration for your Tech Provider app, using WhatsApp Embedded Signup v4 and the products you need.
  • Add your HTTPS domain and OAuth redirect URIs in Meta’s login settings. Kapso setup-link allowed_origins does not apply to this path.
  • Configure your webhook endpoint and subscribe your Meta app to account_update and messages.
Use your own app’s IDs below. Never include your app secret or access tokens in browser code. See Meta’s implementation guide for the app configuration.

Launch Embedded Signup

If you already have Embedded Signup, add extras.setup.solutionID to your existing FB.login options. Keep the SDK initialization and flow options appropriate for your configuration. For a new v4 integration, this example initializes Meta once and enables the button only after FB.init completes:
solutionID is case-sensitive and belongs inside extras.setup, not at the top level. Keep it as a string. The Solution ID links the customer’s authorization to both partners. See Meta’s Multi-partner Solution instructions. If you offer multiple solutions, select the correct App ID, configuration ID, and Solution ID for the customer before enabling the button. Store that expected context with the onboarding attempt on your backend.

Complete onboarding on your backend

The example’s /api/whatsapp/onboarding/complete is an endpoint in your application. Protect it with your normal authentication and CSRF controls; adapt the request headers to your framework. Bind the attempt to the signed-in customer.
  1. Exchange code through Meta’s GET /oauth/access_token, using your App ID and app secret. Store the returned business token securely on your server; do not log it or return it to the browser.
  2. Resolve the authorized WABA and phone number using that token. If multiple assets are available, confirm the customer’s selection rather than choosing the first result. You can also collect IDs through Meta’s WA_EMBEDDED_SIGNUP browser event: validate the event origin and verify asset access server-side. Browser-supplied IDs are not proof of ownership or funding.
  3. Subscribe your app to the customer’s WABA with POST /{WABA_ID}/subscribed_apps so your backend receives message webhooks.
  4. Register the phone number with POST /{PHONE_NUMBER_ID}/register when required by the selected flow. The example targets the standard Cloud API flow; follow Meta’s separate requirements for coexistence, migrations, or WABA-only signup.
  5. Persist the connection in your system. Return success only after the required backend setup completes.
Use Meta’s Tech Provider onboarding guide for the requests. For Kapso-managed billing, use the funding confirmation below instead of asking the customer to add a Meta payment method.

Confirm managed funding in Kapso

Meta notifies Kapso through account_update when the customer joins the solution. Kapso detects the WABA and attempts to fund it automatically, subject to eligibility and your project’s prepaid balance. You do not need to send Kapso the customer’s authorization code or business token. Open Tenants > Multi-partner solution, find the WABA, and confirm that funding is verified before sending paid messages. A successful signup callback or a detected WABA alone does not confirm funding. If the account shows Needs attention, resolve the displayed issue first. External onboarding does not create a Kapso WhatsApp configuration or emit the hosted path’s whatsapp.phone_number.created event. Your own backend tracks connection completion; the Kapso account table tracks funding and aggregate usage. If the WABA does not appear, check that signup used the exact active Solution ID and the correct Meta app. If those match, contact Kapso with the Solution ID, WABA ID, and signup time. Do not send secrets or access tokens.

Monitor usage

Once funded, keep sending through your own Meta integration. View each WABA’s funding and aggregate usage in Tenants > Multi-partner solution. Kapso checks Pricing Analytics about every five minutes; usage can arrive later. Kapso cannot block sends made through your infrastructure, so keep enough balance for usage between checks. See How billing works and Manage funding.

Connect an existing customer to your solution

Use this flow when a customer already uses your Tech Provider app outside your Multi-partner Solution and wants Kapso managed billing. Meta keeps the customer’s WhatsApp account and phone number and creates a new Messaging Account for the solution. If Embedded Signup returns #2494156, your app may already have a paid Messaging Account for that WhatsApp account. Meta’s account model
  1. Agree on a window with the customer. Record the current Messaging Account ID and confirm how you’ll access any source templates you need to copy after removing partner access.
  2. In Meta Business Suite, have the customer’s business admin open Settings → Accounts → Messaging Accounts and remove your existing partner access to the Messaging Account. Sending through that account stops when access is removed.
  3. Have the customer run Embedded Signup again with your solution ID and select their existing WhatsApp account. Use the new Messaging Account ID returned as waba_id to complete onboarding on your backend and subscribe your app’s webhooks.
  4. If the same Meta business owns both Messaging Accounts, use Meta’s Template Migration API to copy templates with status APPROVED and quality GREEN or UNKNOWN. Recreate and submit any required templates that can’t be copied. Check template status, confirm funding in Kapso, and test sending and receiving before resuming traffic.

Switch from another provider

If the customer’s number is connected to another provider, have the customer select their existing WhatsApp account in Embedded Signup with your solution ID. Meta creates a separate Messaging Account for your integration and keeps the same number. The customer can keep the previous provider connected during setup. Meta’s account model Use the new waba_id to complete onboarding. Check your templates and confirm funding in Kapso, then test sending and receiving before switching traffic.
If Meta reports an outstanding balance, check with the previous provider or Meta Support before changing the linked account. To find Replace linked account, open Meta Business Suite → Settings → Accounts → Messaging accounts, select the previous Messaging Account, and open the WhatsApp accounts tab. When available, the option appears in the … menu on the row for the linked number.