Posts under category Facebook WhatsApp Business API

Hello everyone. I'm having a problem downloading media files that are sent to a Whatsapp bot. I am using NodeJS. I have followed the documentation, first doing a GET to https://graph.facebook.com/v18.0/ and obtaining the download URL, but when doing the GET to the download URL I get an error 500. I tried through INSOMNIA and Node. I have attached screenshots of the error messages in Node

I am currently facing an issue with the Meta Cloud API and WhatsApp Business API and I'm seeking some guidance.

Issue Description:

I have a WhatsApp chatbot for customers, and to facilitate testing and development, I've set up three different environments (stages). Each stage has its own test number and is associated with a separate app using the Meta Cloud API and WhatsApp Business API. Every app is connected to its unique webhook and is subscribed to the 'messages' field.

However, I am encountering an unexpected behavior where every webhook is receiving events from all other numbers, not just its corresponding number.

Setup Details:

For each app, I have the following configuration in the meta developer web app:

Quickstart Configuration: To get alerted when you receive a message or when a message's status has changed, a Webhooks endpoint is set up for each app.

Callback URL: Each app has a different callback URL, something like https://.....com/webhook.

Verify token: Different for each app

What actually happens:

Despite having distinct endpoints and configurations for each app, messages intended for one stage are being received by the webhooks of the other stages as well.

Object received from Meta Cloud API when I send "hi" to the test number – gets delivered to all three webhooks:

{     "object": "whatsapp_business_account",     "entry": [         {             "id": "id_1",             "changes": [                 {                     "value": {                         "messaging_product": "whatsapp",                         "metadata": {                             "display_phone_number": "test_stage_phone_no",                             "phone_number_id": "test_stage_phone_no_id"                         },                         "contacts": [                             {                                 "profile": {                                     "name": "Leon"                                 },                                 "wa_id": "my_phone_number"                             }                         ],                         "messages": [                             {                                 "from": "my_phone_number",                                 "id": "wamid.HBgNNDk...",                                 "timestamp": "1704481181",                                 "text": {                                     "body": "hi"                                 },                                 "type": "text"                             }                         ]                     },                     "field": "messages"                 }             ]         }     ] } 

Object received from Meta Cloud API when I send "hi" to the production number – gets delivered to all three webhooks:

{     "object": "whatsapp_business_account",     "entry": [         {             "id": "id_2",             "changes": [                 {                     "value": {                         "messaging_product": "whatsapp",                         "metadata": {                             "display_phone_number": "prod_stage_phone_no",                             "phone_number_id": "prod_stage_phone_no_id"                         },                         "contacts": [                             {                                 "profile": {                                     "name": "Leon"                                 },                                 "wa_id": "my_phone_number"                             }                         ],                         "messages": [                             {                                 "from": "my_phone_number",                                 "id": "wamid.HBgNN...",                                 "timestamp": "1704482444",                                 "text": {                                     "body": "hi"                                 },                                 "type": "text"                             }                         ]                     },                     "field": "messages"                 }             ]         }     ] } 

As a temporary workaround, in my webhook, I am checking the WhatsApp Business ID from which the message originates and filtering out messages that don't match the Business ID associated with that stage. However, I believe there should be a way to ensure each webhook only receives messages for its specific app.

Questions:

Has anyone else experienced this issue with the Meta Cloud API and WhatsApp Business API?

Is there a configuration step I might be missing that would ensure each webhook only receives messages intended for its associated app? Are there any best practices or additional settings I should consider to isolate the webhook events to their respective apps?

We tried sending order_details (interactive) to the customers. And we are getting the error
{"error":{"message":"(#131009) Parameter value is not valid","type":"OAuthException","code":131009,"error_data":{"messaging_product":"whatsapp","details":"Interactive Message type, 'order_details' not supported. Supported types ['button', 'list']"}
We tried using the below link to opt in for payments, but the form doesn't submit data and shows error https://www.facebook.com/help/contact/322487863689187
We came across a support article to add payment gateway integration for India (Razorpay / PayU). But when we try to add payments, it only shows Singapore as the country with Stripe as the option.
How do we enable payments from India using In-app UPI. We currently have fallen back to payment links being sent from Razorpay (without in-app payment flow)