v3 Billing events

📘

There is no Meta fees charged for service conversations 1st Nov onwards, hence the billable parameter will be false for service conversations.

The billing-event informs you if a conversation is billable or not. Learn more about Conversation based pricing.

{
    "app": "DemoAPI",
    "timestamp":1580546677791,
    "version":2,
    "type": "billing-event",
    "payload":{
        "deductions":{
            "type": "marketing/authentication/utility/service/FEP/FTC",
            "conversationType": "service",
            "model": "NBP/CBP",
            "source": "whatsapp",
            "billable":"true/false"
       },
        "references":{
            "id":"59f8db90c37e-4408-90ab-cc54ef8246ad",
            "gsId":"ee4a68a0-1203-4c85-8dc3-49d0b3226a35",
            "conversationId":"532b57b5f6e63595ccd74c6010e5c5c7",
            "destination":"91XX985XX10X"
        }
    }
}

Deductions - Object Description

Key

Description

Example

type

The type of conversation. Possible values:

  • FEP (Free entry point)
  • Marketing
  • Authentication
  • Utility -Service
  • FTC (Free Tier conversation)

Marketing

conversationType

The type of FTC (Free Tier Conversation). This parameter is only received for type FTC.
If type='FTC' then conversationType is "service"

Service

model

The pricing policy model applied for this message. Possible values:

  • CBP (Conversation based pricing)
  • NBP (Notification based pricing)

CBP

source

Origin source of the conversation

whatsapp

billable

The value is either true or false depending on whether a conversation is billable or not.

false

References - Object Description

Key

Description

Example

id

Unique WhatsApp identifier for a message

59f8db90c37e-4408-90ab-cc54ef8246ad

gsId

Unique Gupshup identifier for a message

ee4a68a0-1203-4c85-8dc3-49d0b3226a35

conversationId

Unique identifier for a conversation

532b57b5f6e63595ccd74c6010e5c5c7

destination

Phone number of the user engaged in the conversation. Phone Number will be in E.164 format.

91XX985XX10X

Call Interactions

This document outlines the structure and fields of billing events related to call interactions.

Sample Payload

{
	"entry": [
		{
			"changes": [
				{
					"field": "billing-event",
					"value": {
						"billing": {
							"deductions": {
								"billable": "true/false",
								"conversation_type": "call",
								"source": "whatsapp"
							},
							"references": {
								"conversation_type": "MESSAGE/CALL",
								"destination": "9191638XXXXX",
								"source": "9112fXXXXXX",
								"direction": "[USER_INITIATED|BUSINESS_INITIATED]",
								"id": "WHATSAPP_CALL_ID",
								"duration": "12321",
								"start_time": "",
								"end_time": ""
							}
						}
					}
				}
			]
		}
	],
	"gs_app_id": "GUPSHUP_APP_ID",
	"object": "whatsapp_business_account"
}

Root-Level Field Descriptions

KeyDescription
entryAn array containing event entries. Each entry represents a change related to a billing event.
changesAn array detailing the specific changes in the billing event.
fieldSpecifies the type of event. For billing events, this is set to "billing-event".
valueContains the billing information.
billingHolds the deductions and references related to the billing event.
deductionsDetails about the billing deductions.
billableIndicates whether the wallet is deducted for this event. Possible values are "true" or "false".
conversation_typeSpecifies the type of conversation. In this context, it is "call".
sourceDenotes the source of billing, e.g., "whatsapp".
referencesProvides additional information related to the billing event.
conversation_typeRefers to the type of conversation, either "MESSAGE" or "CALL".
destinationThe recipient's phone number.
sourceThe sender's phone number.
directionIndicates the direction of the call, either "USER_INITIATED" or "BUSINESS_INITIATED".
idThe unique identifier for the WhatsApp call.
durationThe duration of the call in seconds.
start_timeThe start time of the call.
end_timeThe end time of the call.
gs_app_idThe unique identifier for the Gupshup application.
objectSpecifies the object type, in this case, "whatsapp_business_account".

Sample Meta Billing Event

{
	"entry": [
		{
			"changes": [
				{
					"field": "billing-event",
					"value": {
						"billing": {
							"deductions": {
								"billable": "true",
								"conversation_type": "call",
								"source": "whatsapp"
							},
							"references": {
								"conversation_type": "CALL",
								"destination": "919355015912",
								"direction": "USER_INITIATED",
								"duration": 18,
								"end_time": 1743598139,
								"id":"wacid.HBgMOTE5NjQzNTk1NDUyFQIAEhggMTczN0EzM0E4Q0MyRjk5RUQwQzQwRTZBQjk5NkRDODQcGAw5MTkzNTUwMTU5MTIVAgAA",
								"source": "919643595452",
								"start_time": 1743598121
							}
						}
					}
				}
			],
			"time": 1743598141518
		}
	],
	"gs_app_id": "b6016edd-12fb-4da1-8e96-e5bb634e271f",
	"object": "whatsapp_business_account"
}

Sample GS Billing Event

{
	"entry": [
		{
			"changes": [
				{
					"field": "billing-event",
					"value": {
						"billing": {
							"deductions": {
								"billable": "false",
								"conversation_type": "call",
								"source": "gupshup"
							},
							"references": {
								"conversation_type": "CALL",
								"destination": "919355015912",
								"direction": "USER_INITIATED",
								"duration": 18,
								"end_time": 1743598139,
								"id":"wacid.HBgMOTE5NjQzNTk1NDUyFQIAEhggMTczN0EzM0E4Q0MyRjk5RUQwQzQwRTZBQjk5NkRDODQcGAw5MTkzNTUwMTU5MTIVAgAA",
								"source": "919643595452",
								"start_time": 1743598121
							}
						}
					}
				}
			],
			"time": 1743598141518
		}
	],
	"gs_app_id": "b6016edd-12fb-4da1-8e96-e5bb634e271f",
	"object": "whatsapp_business_account"
}