WhatsApp Cloud

WhatsApp Cloud vs BSP #

You can obtain WhatsApp API either directly from Meta (WhatsApp Cloud) or via a Meta-appointed Business Solution Provider (BSP)

FeatureWhatsApp CloudBSP
Requires business verificationNot necessaryYes
CostAs per Meta’s conversation feeMeta’s conversation fee + BSP fee

Pre-requisites #

  1. Ensure that you have a Facebook Business Account. Read here to create your own Facebook Business Account
  2. Ensure that you have a phone number capable of receiving SMS. The phone number must not be associated with any active WhatsApp account. Please deactivate the WhatsApp account before proceeding with application 

How to create a new WhatsApp Cloud Inbox #

Creating a new WhatsApp Cloud inbox will involve:

  1. Creating a Facebook Developer App
  2. Registering a new WhatsApp phone number
  3. Adding payment method
  4. Setup system user to generate access token
  5. Creating the inbox in Peasy Sales
  6. Adding the webhook to receive message on Facebook Developer App

Creating a Facebook Developer App #

  1. Head on over to https://developer.facebook.com
  2. Click on “Create App”. You will see a screen similar to the image below. 
  3. Select Other and click “Next”. You will see a screen similar to the image below. 
  4. Select “Business” and click “Next”. You will see a screen similar to the image below. 
  5. Type in your App name. You can type in your company name, this App will not be visible to the public. Key in your email. IMPORTANT: Please select the Business Account that owns your Facebook Page (and Catalog if you have one), and make sure you have admin access to the Business Account. Click “Create App” when you’re ready. You should be directed to a screen similar to the image below. 
  6. Look for “WhatsApp” card and click on the “Set up” button. You should see a screen similar to the image below. 
  7. That’s it, you’ve created your WhatsApp Business App. Now you’re ready for the next step.

Registering a new WhatsApp phone number #

  1. Continuing from the earlier step; from your Facebook Developer screen – click on the “Start using the API” button similar to the image below.
  2. A screen similar to the image below will appear. Scroll down and click on the “Add Phone Number” button. 
  3. A pop-up form will appear. Fill in your Profile Display Name (what your contact will see as your name on their WhatsApp, we recommend using your Company/Product name), timezone, category and business description (both will be visible on your public WhatsApp profile, but don’t worry – you can always edit them later). Click “Next” when you are ready.
  4. Key in your phone number and choose your preferred validation method. Click “Next” when you are ready.
  5. If this error message appears after you had clicked “Next”, either deactivate your existing WhatsApp account or use a different phone number. 
  6. Otherwise, a screen similar to the image below will appear. Please key in the OTP code sent by Meta via your selected verification method. 
  7. You will be directed to the screen similar to the image below once your phone number is registered. Your WhatsApp account is now ready for usage, let’s proceed to the next step. 

Adding payment method #

You’ll be paying Meta directly for your WhatsApp API conversation charges. Meta will charge you once your usage exceed your credit limit. To setup payment method for your WhatsApp Cloud, please follow these steps:

  1. From your Facebook Developer App screen, please click on the “Add payment method” button. 
  2. You will be directed to a screen similar to the image below. Click on the “Payment Settings” button. 
  3. You will be directed to a screen similar to the image below. Click on the “Add Payment Method” button. 
  4. After clicking on the “Add Payment Method”, select your currency (MYR is not supported at this point in time) in the popup form and click “Next”
  5. Choose your payment method and click “Next”
  6. Continue until your payment method is added. Your payment method should appear in the Payment Settings screen similar to the image below. 
  7. Hooray! You’re now ready for the next step.

Setup system user to generate access token #

Please ensure that you’ve created your Facebook App, added your phone number and payment method BEFORE engaging in this step.

  1. Head on over to your Facebook Business Account settings. If you don’t remember your Account URL, select your Business Account from https://business.facebook.com/settings. Please select the same Business Account associated to your Facebook App and WhatsApp API.
  2.  In your Business Account Settings, select User -> System User. 
  3. If you do not have an existing System User, click on the “Add” button to create a new System User. Make sure that you grant “Admin” and not “Employee” access to the System User.
  4. Click on the “Add assets” button within the inner window panel. A popup will appear, select the app you have just created, and checked the “Manage App” permission to assign full admin access to the system user.
  5. Click on the “Generate new token” button. Select the Facebook Developer App you have just created on step 1, the popup will expand.
  6. Select “Never” in your token expiration. Otherwise, we will have to repeat this step every 60 days. 
  7. Scroll down and checked on both “whatsapp_business_management” and “whatsapp_business_messaging” checkboxes.
  8. Click on the blue “Generate token” button at the bottom of the popup.
  9. Meta will generate an access token, similar to the image below. Click on the link, you will be redirected to a new tab on your browser.
  10. Copy the access token from the new tab (similar to the image below). This is your API KEY. Copy and save the API KEY, you will be using this to create your WhatsApp Inbox in Peasy

Creating the inbox in Peasy Sales #

Before creating the inbox, we will need to prepare these:

ValuesSource
API KeyThe system user’s access token generated in the previous step. Get this from your Facebook Business Settings
WhatsApp Phone NumberThe phone number you had used to register a new WhatsApp account in step 2
WhatsApp Phone IDFrom your Facebook Developer App that you have created in step 1
WhatsApp Business Account IDFrom your Facebook Developer App that you have created in step 1
Webhook Verify TokenCreate a password (without any space character), we will reuse it the next step.
  1. Login to your Peasy Sales account as Admin
  2. Click on Settings->Inbox
  3. Click on “Add Inbox” in the Inbox list screen
  4. Select “WhatsApp” from the list of channel cards.
  5. A form will appear. Select “WhatsApp Cloud” as your API Provider. 
  6. Assign any name you like as the inbox name. The inbox name is not visible to your contact, it is only visible internally.
  7.  Key in your phone number into the “Phone number” field. Make sure to append “+” and country code onto your phone number.
  8. Key in the WhatsApp Phone ID into the “Phone number ID” field. Make sure the values are copied accurately, without any additional space.
  9. Key in the WhatsApp Business Account ID into the “Business Account ID” field. Make sure the values are copied accurately, without any additional space.
  10. Key in the API Key into the “API key” field. Make sure the values are copied accurately, without any additional space.
  11. Key your Webhook Verify Token. We recommend that you note down the same password, we will need to key in the exact same value later in the next step.
How to get my WhatApp Phone and Business Account ID #
  1. Head on over to the https://developer.facebook.com and select the App which you have created on Step 1
  2. From the left menu, select WhatsApp->API Setup. You should see a screen similar to the image below. 
  3. Select your phone number, and copy the generated WhatsApp Phone and Business Account ID from the same screen.

Adding the webhook to receive message on Facebook Developer App #

  1. Head on over to the https://developer.facebook.com and select the App which you have created on Step 1
  2. From the left menu, select WhatsApp->Configuration. You should see a screen similar to the image below. 
  3.  Click on the Edit button. A popup similar to the image below will appear. 
  4. Key in “https://chat.peasy.ai/webhooks/whatsapp/<<your WhatsApp phone number>>” into the Callback URL field. For example, if your WhatsApp phone number is +60121005000, then please key in https://chat.peasy.ai/webhooks/whatsapp/+60121005000
  5. Key in the webhook verify token you have set in step 5 into the Verify Token field
  6. Click on “Verify and Save”. If your inbox was created with exact same webhook verify token, you should see the webhook registered successfully similar to the image below. Otherwise, please double check your verify token value. 
  7. Next, let’s configure the webhook fields. Click on the “Manage” button similar to the image above. Tick on the “message_template_status_update” and “messages” checkboxes and click “Done”.
  8. That’s it! Congrats, you have now link Peasy to your WhatsApp Cloud account. Now you’re ready to test your connection setup.

How can I know if my WhatsApp Cloud Inbox is setup correctly? #

  1. Send a WhatsApp message from your personal WhatsApp to your new WhatsApp API phone number. You should be able to see the incoming message from your Peasy Sales conversation dashboard.
  2. Reply via Peasy Sales conversation window, you should be able to receive an incoming message on your personal WhatsApp

Common errors #

I am unable to receive incoming WhatsApp message #

Please check if your webhook is setup correctly. Reexamine your settings in step 6. The usual culprit are either incorrect Callback URL, Verify Token OR you have missed to select the right webhook’s fields

I am unable to send outgoing WhatsApp message #

  1. If the red session expiry message appears on your conversation window, please make sure to send an approved template message
  2. Check that Meta is able to access your configured payment method
  3. Make sure you have not exceeded your plan’s monthly quota, and that you have sufficient prepaid balance if you do exceed your plan’s monthly quota.
Did you find this article to be helpful?
Updated on July 20, 2023

Sign up for Peasy

Just enter your email and password to start using Peasy for free! We will re-direct you to our login page as soon as you are registered.

[fluentform id="5"]

Apply for the BSN SME Digitization Grant

Get RM2,000 worth of FB Ad Credits and 1 year subscription of Peasy Gold Free

[fluentform id="3"]