Infobip Documentation
Home » Use Cases

Share Real-time Updates on Financial Transactions

WhatsApp use case - Share Real-time Updates on Financial Transactions - high-level overview

This use case will show how to set up notifications regarding any changes to the user’s balance account using the WhatsApp message template.  

Help your customers easily track their finances by introducing automatized real-time notifications regarding any changes on their account balance – from cash withdrawal to transaction confirmation. 

Automatized notifications sent over WhatsApp Business API are end-to-end encrypted, ensuring personal finance information stays - personal. 

In order to start communicating with your customers over WhatsApp, you must receive and store their opt-ins. 

Process Workflow

WhatsApp use case - Share Real-time Updates on Financial Transactions - process workflow

Implementation Steps

The transaction_confirmation notification is already approved by WhatsApp, as shown in the table below. As this is a template, it can be reused for all clients adapting placeholders with other values.

NOTE

For template registration, you need to provide template name, notification content, and language info, after which Infobip sends the template to WhatsApp for approval. Once registered on the WhatsApp platform, templates for your account get a unique template namespace.

Template name

Content

Language

Template namespace

Approval

transaction_confirmation

Your transaction of {{1}} USD to {{2}} has been successfully processed.

en

whatsapp_templatenamespace

Log in to dev.infobip.com and copy your BASE URL:

  • e.g. Your personal base URL is: https://{{BASE_URL}}.api.infobip.com/
NOTE

The personal BASE URL is a simple way to identify who sent out the API request. This means we can identify the request through DNS and then find the optimal route for API requests.

Send approved Message Template following the steps below:

  1. Choose POST method 
  2. Replace endpoint with https://{{BASE_URL}}.api.infobip.com/omni/1/advanced
  3. Add Authorization header, e.g. Basic: Base64 encoded username and password (more about Authorization methods on our API developer hub)
  4. Copy previously created scenarioKey

In case you have not created your scenario yet, check Creating scenario.

  • Specify the destination phoneNumber you wish to send the notification to
  • Replace templateName,templateNamespacetemplateData and language fields with registered ones (refer to the table above). Field templateData contains real data for placeholders in the registered template.
{
   "scenarioKey":"CC9F01A5DC7BEE2C2B829D208482A654",
   "destinations":[
      {
         "to":{
            "phoneNumber":"41793026727"
         }
      }
   ],
   "whatsApp":{
      "templateName":"transaction_confirmation",
      "templateNamespace":"whatsapp_templatenamespace",
      "templateData":["105,00","Go2Shop"],
      "language":"en"
   }
}
NOTE

Template name, template namespace, template data and language are mandatory in order to successfully send the notification. Template data should contain the same number of elements as placeholders in the registered template. In case the template doesn’t contain any placeholders, templateData field should be an empty array “[ ]”.


Related Products

Communicate with your customers over the world’s most used Chat app