API
GuidesGet API token
You’re viewing the reference for API version 2021-01.See the latest version, 2021-11 →
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.

#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

  • typeintegerRequired
    Identifies the type of the notifications. Value can be email only.
  • template_typestringRequired
    Identifies the type of the email notifications. To send an “Upcoming Charge” email, set value to upcoming_charge
    Possible values
    upcoming_chargeget_account_access
  • An object containing the necessary template variables for this email template type.
    Show child attributesHide child attributes2
    • If needed by the template_type, the address_id associated with the indicated Customer, and the object of the Notification.
    • If needed by the template_type, the charge_id of the Charge for which the notification should be sent.
POST/customers/{id}/notifications
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
  }
}'
Response
{}