Products · Templates
get_provider_kyc_name
Get the name the subscriber's account is registered under with their network.
The get_provider_kyc_name template gets the name the subscriber's account is registered under with their network. Show it before a payment so the subscriber can check they are using the right account.
Configuration
This template takes no template_data and shows nothing on screen, so label isn't needed:
{
"id": "verify_identity",
"component": {
"type": "template",
"template_name": "get_provider_kyc_name"
}
}What It Returns
The page value is the registered name. Read it with $(page.PAGE_ID.value).
- If the network has no name for the subscriber, the page value is empty and the flow continues.
- If the lookup itself fails, the session ends with "Unable to get the dialer provider name".
Not every network returns a name for every subscriber, so plan for the empty case.
Example: Check the Name Before Paying
{
"version": "1.0",
"pages": [
{
"id": "enter_amount",
"component": {
"type": "prompt",
"label": "Enter amount to pay (SLE 10 to 5,000):",
"data_type": "integer",
"min_value": 10,
"max_value": 5000
}
},
{
"id": "verify_identity",
"component": {
"type": "template",
"template_name": "get_provider_kyc_name"
}
},
{
"id": "confirm_payment",
"component": {
"type": "prompt",
"label": "Pay SLE $(page.enter_amount.value) from the account of $(page.verify_identity.value)?",
"data_type": "boolean",
"exit_message": "Payment cancelled."
},
"options": {
"skip": "$(strings.is_blank(page.verify_identity.value))"
}
},
{
"id": "make_payment",
"component": {
"type": "template",
"label": "Enter your $(session.network_provider_name) PIN to pay {{amount}}.",
"template_name": "collect_payment",
"template_data": {
"payment_target_ref": "7150001234",
"amount": "$(page.enter_amount.value)"
}
}
},
{
"id": "payment_done",
"component": {
"type": "display",
"label": "Payment received. Ref: $(page.make_payment.value)"
}
}
]
}When the network has no name, confirm_payment is skipped and the subscriber goes straight to the PIN prompt. To stop instead, add a display page after verify_identity that is skipped when the name is not blank.