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 |
---|---|---|
| The type of conversation. Possible values:
| Marketing |
| The type of FTC (Free Tier Conversation). This parameter is only received for | Service |
| The pricing policy model applied for this message. Possible values:
| CBP |
| Origin source of the conversation | |
| The value is either | false |
References - Object Description
Key | Description | Example |
---|---|---|
| Unique WhatsApp identifier for a message | 59f8db90c37e-4408-90ab-cc54ef8246ad |
| Unique Gupshup identifier for a message | ee4a68a0-1203-4c85-8dc3-49d0b3226a35 |
| Unique identifier for a conversation | 532b57b5f6e63595ccd74c6010e5c5c7 |
| 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
Key | Description |
---|---|
entry | An array containing event entries. Each entry represents a change related to a billing event. |
changes | An array detailing the specific changes in the billing event. |
field | Specifies the type of event. For billing events, this is set to "billing-event". |
value | Contains the billing information. |
billing | Holds the deductions and references related to the billing event. |
deductions | Details about the billing deductions. |
billable | Indicates whether the wallet is deducted for this event. Possible values are "true" or "false". |
conversation_type | Specifies the type of conversation. In this context, it is "call". |
source | Denotes the source of billing, e.g., "whatsapp". |
references | Provides additional information related to the billing event. |
conversation_type | Refers to the type of conversation, either "MESSAGE" or "CALL". |
destination | The recipient's phone number. |
source | The sender's phone number. |
direction | Indicates the direction of the call, either "USER_INITIATED" or "BUSINESS_INITIATED". |
id | The unique identifier for the WhatsApp call. |
duration | The duration of the call in seconds. |
start_time | The start time of the call. |
end_time | The end time of the call. |
gs_app_id | The unique identifier for the Gupshup application. |
object | Specifies 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"
}
Updated 1 day ago