Core Resources
Notifications
The Customer Notifications API is used to dispatch email notifications to customers within Recharge. The API uses your configured Recharge email templates, and will dispatch an email to the address associated with the indicated customer_id. Some email templates require variable values, which are sent through the Customer Notifications API via the template_vars attribute. See below examples for all available template types.
Currently, the Customer Notifications API can be used to dispatch Get Account Access, and Upcoming Charge emails. Support for additional email templates and message types will be added in the future. To view your email template configurations, see the Notifications Settings section in your Recharge Merchant Portal.
Currently, the Customer Notifications API can be used to dispatch Get Account Access, and Upcoming Charge emails. Support for additional email templates and message types will be added in the future. To view your email template configurations, see the Notifications Settings section in your Recharge Merchant Portal.
#Send email notification
POST/customers/{id}/notifications
Sends an upcoming charge email to the customer with the customer_id indicated in the route. To view the upcoming charge email template, visit the Notifications section in your Recharge Merchant Admin Portal.
Body parameters
- Identifies the type of the notifications. Value can be email only.
- Identifies the type of the email notifications. To send an “Upcoming Charge” email, set value to upcoming_chargePossible values
upcoming_chargeget_account_access - template_varsobjectAn object containing the necessary template variables for this email template type.
Show child attributesHide child attributes2
- template_vars.address_idintegerIf needed by the
template_type, theaddress_idassociated with the indicatedCustomer, and the object of theNotification. - template_vars.charge_idbooleanIf needed by the
template_type, thecharge_idof theChargefor which the notification should be sent.
curl -X POST 'https://api.rechargeapps.com/customers/18819267/notifications' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"type": "email",
"template_type": "upcoming_charge",
"template_vars": {
"address_id": 1234567890,
"charge_id": 9876543210
}
}'{}