Share and Revoke Credit Lines

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. Solution Partners must share their line of credit with all end businesses onboarded via embedded signup flow. Businesses can only start using the API once their Solution Partner has shared a line of credit.

As Solution Partner, 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 Meta to pay for WhatsApp Business Platform 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 Meta.

You are the "Bill To Party" for all businesses sharing your credit line. You are liable for and will pay Meta for all WhatsApp Business Platform 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/v19.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 invoicing its value should be a 3-letter currency code. We support the following currency codes, which correspond to our pricing rates: USD, EUR, INR, IDR, GBP, and AUD.

Request

  curl -i -X POST "https://graph.facebook.com/v19.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",
}

Credit lines cannot be changed after being attached to a WABA. You must create a new WABA with the credit line you want to use, then migrate the phone numbers to this new WABA.

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/v19.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/v19.0/
  {whatsapp-business-account-id}?fields=primary_funding_id&
  access_token={system-user-access-token}"
To find the ID of a WhatsApp Business Account, go to Business Manager > Business Settings > Accounts > WhatsApp Business Accounts. Find the account you want to use and click on it. A panel opens, 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 Solution Partner.

Step 1: Retrieve the Credit Line ID for Your Business

Request:
curl -i -X GET "https://graph.facebook.com/v19.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 Solution Partner, get the client’s business ID from the shared WhatsApp Business Account.

In the following example, use the ID for the assigned WhatsApp Business Account.

Request:
curl -i -X GET "https://graph.facebook.com/v19.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 Solution Partner or the client business removed the Solution Partner 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/v19.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/v19.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/v19.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 Solution Partner or the client business removed the Solution Partner 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 Solution Partner business admins when the client business removed the Solution Partner as a partner from the WhatsApp Business Account.

When the WhatsApp Business Account is unshared, all messaging for that account is blocked to protect the Solution Partner's credit line. For complete security, it is recommended that Solution Partners revoke their credit line as soon as the unshare occurs.

See Also