Share Real-time Updates on Financial Transactions
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
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 |
Approval |
---|---|---|---|
transaction_confirmation |
Your transaction of {{1}} USD to {{2}} has been successfully processed. |
en |
✅ |
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:
- Choose POST method
- Replace endpoint with https://{{BASE_URL}}.api.infobip.com/omni/1/advanced
- Add Authorization header, e.g. Basic: Base64 encoded username and password (more about Authorization methods on our API developer hub)
- 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
,templateData
andlanguage
fields with registered ones (refer to the table above). FieldtemplateData
contains real data for placeholders in the registered template.
{
"scenarioKey":"CC9F01A5DC7BEE2C2B829D208482A654",
"destinations":[
{
"to":{
"phoneNumber":"41793026727"
}
}
],
"whatsApp":{
"templateName":"transaction_confirmation",
"templateData":["105,00","Go2Shop"],
"language":"en"
}
}
NOTE
Template name, 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 “[ ]”.