m2pfintech
Webhook Guide

Templates & Configuration

Notification template variables, sample templates, and product-level notification configuration.


Notification Channels

ChannelDeliveryNotes
SMSVia configured SMS gatewayMax 160 chars (single) or 320 chars (concat). Respects DND.
EmailVia SES, SendGrid, or configured providerHTML templates. Supports attachments.
PushFCM (Android) / APNS (iOS)JSON payload with title, body, custom data. Supports deep links.

When multiple channels are configured for an event, they are sent in parallel.


Template Variables Reference

All available variables for notification templates:

VariableKeyDescriptionExample
Amount{amount}Transaction amount5000.00
Wallet Amount{wallet_amount}Wallet-specific amount3000.00
Wallet Amount ISO{wallet_amount_iso}Amount in ISO minor units500000
Balance{balance_amount}Post-transaction balance15000.00
Card Number{card_number}Masked card numberXXXX1234
Name{name}Customer nameJohn Doe
Mobile{mobile}Customer mobile+919876543210
Date/Time{date_time}Transaction date & time12/02/2026 14:30
Date{date}Transaction date12/02/2026
Datetime{datetime}ISO datetime2026-02-12T14:30
Merchant{merchant}Merchant nameAmazon India
Product Name{product_name}Product nameRetail Prepaid Card
Currency Code{currency_code}Transaction currencyINR
Wallet Currency{wallet_currency_code}Wallet currencyUSD
Kit{kit}Kit / card number650527XXXX1234
RRN{rrn}Retrieval reference123456789012
MCC{mcc}Merchant category code5411
Mode{mode}Transaction modePOS
Fees{fees}Fee charged20.00
Expiry{expiry}Card expiry date12/2029
Error Reason{error_reason}Error descriptionInsufficient Balance
Application Ref{application_ref}Application referenceAPP2026020001
Card Type{card_type}Card typeGPR
Purchaser Name{purchaser_name}Gift card purchaserJane Smith
To Email{to_email}Recipient emailjohn@example.com
Product{product}Product identifierGPR_RETAIL_001

Sample Templates

Transaction Success:

Dear {name}, your M2P card ending {card_number} was used for
{currency_code} {amount} at {merchant} on {date_time}.
Avl Bal: {currency_code} {balance_amount}.
Ref: {rrn}

Card Activation:

<h2>Card Activated Successfully!</h2>
<p>Dear {name},</p>
<p>Your {product_name} card ending <b>{card_number}</b> has been
activated successfully on {date_time}.</p>
<p>Card Expiry: {expiry}</p>
<p>You can now use your card for transactions.</p>

Transaction Decline:

{
  "title": "Transaction Declined",
  "body": "Your card ending {card_number} transaction of {currency_code} {amount} at {merchant} was declined. Reason: {error_reason}",
  "data": {
    "type": "TXN_DECLINE",
    "amount": "{amount}",
    "card": "{card_number}"
  }
}

Low Balance Alert (SMS):

Alert! Your M2P card ending {card_number} balance is low at
{currency_code} {balance_amount}. Please reload to continue
using your card.

Product-Level Configuration

Notifications are configured as part of the product setup in the notification array:

{
  "notification": [
    {
      "eventType": "CARD_ACTIVATION",
      "channels": ["SMS", "EMAIL", "PUSH"],
      "templateId": "ACTIVATION_TEMPLATE_01",
      "isEnabled": true
    },
    {
      "eventType": "CARD_TXN_SUCCESS",
      "channels": ["SMS", "PUSH"],
      "templateId": "TXN_SUCCESS_TEMPLATE_01",
      "isEnabled": true,
      "thresholdAmount": 500
    },
    {
      "eventType": "LOW_BALANCE_ALERT",
      "channels": ["SMS", "EMAIL"],
      "templateId": "LOW_BALANCE_TEMPLATE_01",
      "isEnabled": true,
      "thresholdAmount": 100
    }
  ]
}

Threshold-Based Notifications

When thresholdAmount is set:

Event CategoryBehavior
Transaction eventsNotification sent only for transactions threshold amount
Balance alertsNotification sent when balance falls threshold amount

Enable / Disable

Toggle individual events without removing the configuration:

{
  "eventType": "CARD_TXN_DECLINE",
  "channels": ["SMS", "PUSH"],
  "isEnabled": false
}

Low Balance Alerts

Configured at two levels:

LevelConfigurationScope
ProductthresholdAmount in notification configAll customers on product
CorporatethresholdValueForNotification on corporate entityCorporate-specific threshold

Low balance check runs after every debit transaction. Only one notification per threshold breach — resets when balance goes above threshold again.

On this page