Core Resources
Notifications
The Customer Notifications resource is used to dispatch email notifications to customers within Recharge. The endpoint 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 resource via the template_vars attribute. See below examples for all available template types.15 additions in V2, marked New
Everything marked New also works when you send X-Recharge-Version: 2021-11.
#Send email notification
POST/customers/{id}/notifications
Sends a notification 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.Scope
write_notificationsReturns
204 with no content. The request body is not wrapped in a root key.Body parameters
- Identifies the type of the notifications. Value can be email only.Possible values
emailsms - Identifies the type of the email notifications.Possible values
delayed_checkout_payment_failedget_account_accesssubscription_activationupcoming_chargerepurchase_reminderrepurchase_welcomemembership_enrollmentmembership_cancellationmembership_expirationrepurchase_reminder_smsrepurchase_welcome_smsmembership_upcoming_chargemembership_reactivationmembership_renewal_confirmationmembership_advanced_notice_upcoming_renewal_chargemembership_pricing_removedgift_skipped_shipmentshopify_update_payment_informationshopify_migrate_payment_information - template_varsobjectAn object containing the necessary template variables for this email template type.
Show child attributesHide child attributes1015 new
- 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. - The
payment_method_idof thePaymentMethodof theCustomerthat the notification is about. Used by theshopify_update_payment_informationandshopify_migrate_payment_informationtemplate types. - Whether a deleted
PaymentMethodmay be referenced bypayment_method_id. Defaults tofalse. Used by theshopify_update_payment_informationtemplate type. - Whether the updated payment information should be applied to all of the customer's addresses. Defaults to
false. Used by theshopify_migrate_payment_informationtemplate type. - Deprecated. Use
apply_to_all_subscription_addressesinstead. - The
order_idof anOrderon the given address. Optional; used by thesubscription_activationtemplate type. - The
membership_idof theMembershipfor which the notification should be sent. Required by themembership_enrollment,membership_cancellation,membership_expiration,membership_reactivationandmembership_renewal_confirmationtemplate types. - The line items to feature in the notification. Required (at least one item) by the
repurchase_reminderandrepurchase_welcometemplate types.Show child attributesHide child attributes55 new
- Unique numeric identifier of the line item.
- Identifier of the product of the line item.
- Identifier of the product variant of the line item.
- Quantity of the line item.
- Identifier of the order the line item was purchased in.
- The repurchase notification the email is sent for. Required by the
repurchase_reminderandrepurchase_welcometemplate types.
curl -X POST 'https://api.rechargeapps.com/customers/18819267/notifications' \
-H 'X-Recharge-Version: v2' \
-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
}
}'{}