Billing & Payment

This document describes how to share your line of credit with a client business or revoke access, if that becomes necessary. Before you start, make sure the system user access token used for billing management has Financial Editor role.

Line of credit is the only accepted payment method for the API use. BSPs must share their line of credit with all end businesses onboarded via embedded signup flow. Businesses can only start using the API once their BSP has shared a line of credit.

As a WhatsApp BSP, WhatsApp bills you directly for your clients' WhatsApp usage.

Billing Liability Disclosure

Businesses that sign up through the Embedded Signup flow request access to your line of credit with Facebook to pay for WhatsApp Business API access —you can grant access to your line of credit with these API calls. This means that businesses pay you, and you receive an aggregated invoice to pay Facebook.

You are the “Bill To Party” for all businesses sharing your credit line. You are liable for and will pay Facebook for all WhatsApp Business API spend made by these businesses.

You can revoke access to your line of credit for individual businesses within the Business Manager or with a series of API calls.

Share Your Credit Line with a WhatsApp Business Account

For the purposes of this guide, an extended credit object is the same as a credit line object.

Step 1: Retrieve Your Business's Credit Line ID

Request

curl -i -X GET "https://graph.facebook.com/v12.0/{business-id}/
  extendedcredits?fields=id,legal_entity_name&
  access_token={system-user-access-token}"
To find the ID of a business, go to Business Manager > Business Settings > Business Info. There, you will see information about the business, including the ID.

Response

A call to this edge returns a list of ExtendedCredit nodes:

{
  "data": [
    {
      "id": "1972385232742146",    
      "legal_entity_name": "Your Legal Entity",
    }
  ]
}

Step 2: Attach Your Credit Line to a WhatsApp Business Account

Share the credit line with your client’s business and attach it to the client’s WhatsApp business account. The waba_currency argument is used for the WhatsApp business account’s invoicing, and its format is a 3-letter code (e.g., USD, EUR, etc.).

Request

  curl -i -X POST "https://graph.facebook.com/v12.0/
  {extended-credit-id}/whatsapp_credit_sharing_and_attach?
  waba_id={assigned-whatsapp-business-account-id}&
  waba_currency={assigned-whatsapp-business-account-currency-code}&
  access_token={system-user-access-token}"

Response

{
  "allocation_config_id": "1972385232742147",
  "waba_id": "1972385232742141",
}

Step 3: Verify Credit Line was Shared

This is an optional step, but it helps with validation. To verify the credit line has been shared, retrieve the shared credit line ID:

Request

In the following example, use the allocation_config_id returned in the previous step.

curl -g -i -X GET "https://graph.facebook.com/v12.0/
  {allocation-config-id}?fields=receiving_credential{id}&
  access_token={system-user-access-token}"

Response

{
  "receiving_credential": {
    "id": "1972385232742148"
  },
  "id": "1972385232742147",
}

Then, retrieve the WhatsApp business account’s payment method ID.

Request

In the following example, use the ID for the assigned WABA.

curl -i -X GET "https://graph.facebook.com/v12.0/
  {whatsapp-business-account-id}?fields=primary_funding_id&
  access_token={system-user-access-token}"
To find the ID of a WhatsApp Business Account (WABA), go to Business Manager > Business Settings > Accounts > WhatsApp Business Accounts. Find the WABA you want to use and click on it. A panel will open up with information about the account, including the ID.

Response

{
  "id": "1972385232742141",
  "primary_funding_id": "1972385232742148" 
}

Compare the id parameter of receiving_credential from the first response with primary_funding_id from the second response to verify they are the same.

Revoke a Shared Credit Line

These are the steps needed to remove the shared line of credit if you need to revoke access for any reason. You can revoke your credit line whenever you feel the need to and/or when your client removes you as a partner from their WhatsApp Business Account.

When you revoke a credit line from a customer's account, that revocation applies to all WABAs that belong to the customer's business and have been shared with you, the BSP.

Step 1: Retrieve the Credit Line ID for Your Business

Request:
curl -i -X GET "https://graph.facebook.com/v12.0/{business-id}/
  extendedcredits?fields=id,legal_entity_name&
  access_token={system-user-access-token}"
Response:
{
  "data": [
    {
      "id": "1972385232742146",    
      "legal_entity_name": "Your Legal Entity",
    }
  ]
}

Step 2: Retrieve the Client’s Business ID

If the WhatsApp business account is currently shared with the BSP, get the client’s business ID from the shared WhatsApp business account.

In the following example, use the ID for the assigned WABA. Request:
curl -i -X GET "https://graph.facebook.com/v12.0/
  {whatsapp-business-account-id}?fields=owner_business_info&
  access_token={system-user-access-token}"
Response:
{ 
  "owner_business_info": { 
    "name": "Client Business Name", 
    "id": "1972385232742147" 
  }, 
}

If the WhatsApp business account was unshared with the BSP or the client business removed the BSP as a partner from the WhatsApp business account, you cannot access the client's business ID from the above API call. See Unshared WhatsApp Business Account for information.

Step 3: Retrieve the Credit Sharing Record

In the following example, use your credit line ID as the extended credit ID. Request:
  curl -i -X GET "https://graph.facebook.com/v12.0/{extended-credit-id}/
  owning_credit_allocation_configs?
  receiving_business_id={clients-business-id}&
  fields=id,receiving_business&
  access_token={system-user-access-token}"
Response:
{
  "id": "1972385232742140", // Allocation config (i.e., credit sharing) id
  "receiving_business": {
    "name": "Client Business Name"
    "id": "1972385232742147"
  },
}

Step 4: Revoke the Credit Sharing

Request:

  curl -i -X DELETE "https://graph.facebook.com/v12.0/
  {allocation-config-id}?
  access_token={system-user-access-token}"

Response:

{
  "success": true,
}

Optional Step 5: Verify Credit Sharing was Revoked

Request:

curl -i -X GET "https://graph.facebook.com/v12.0/
  {allocation-config-id}?fields=receiving_business,request_status&
  access_token={system-user-access-token}"

Response:

{
  "receiving_business": {
    "name": "Client Business Name"
    "id": "1972385232742147"
  },
  "request_status": "DELETED"
}

Troubleshooting

Unshared WhatsApp Business Account

If the WhatsApp business account was unshared with the BSP or the client business removed the BSP as a partner from the WhatsApp business account, you are not able to access the client's business ID from the API call listed in Step 2.

In this case, you can retrieve the client’s business ID from the email notification that was sent to the BSP business admins when the client business removed the BSP as a partner from the WhatsApp business account.

It's important that BSPs revoke their line of credit from unshared accounts. If not revoked, the unshared account may generate additional costs to the BSP.

See Also