> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer emails

> Learn which billing emails Paygentic sends to your customers and how to turn them off.

Paygentic sends billing emails to your customers on your behalf. Customers receive an email when an invoice is due, when a payment is confirmed, when a subscription is about to renew, and when an automatic charge fails.

Each email goes to the billing email addresses on the customer's organization (`billingEmails`). If none are set, Paygentic uses the customer's email address.

## Email types

| Email | When Paygentic sends it | Setting |
| - | - | - |
| Invoice issued | An invoice is issued and the customer needs to pay it. The email includes the invoice and a link to pay. | `invoiceIssued` |
| Payment failed | An automatic charge fails and Paygentic will retry it. The email includes the next retry date and a link to pay. | `invoiceIssued` |
| Payment failed, final notice | Paygentic has stopped retrying a failed charge. The email includes a link to pay. | `invoiceIssued` |
| Payment confirmation | An invoice is paid. The email includes the invoice. | `invoicePaid` |
| Renewal reminder | A set number of days before a subscription renews. | `renewalReminder` |

When a subscription uses automatic charges and the charge succeeds, the customer receives only the payment confirmation. To learn when the payment failed emails are sent, see [When an automatic charge fails](/platform/billing/subscriptions#when-an-automatic-charge-fails).

<Note>
  The payment failed emails use the `invoiceIssued` setting. If you turn off `invoiceIssued` for a customer, they also stop receiving emails about failed payments. If you send your own invoice emails, make sure they cover failed payments too.
</Note>

## Turn off emails for a customer

All settings are on by default. To change them, update `notificationSettings` on the customer. Paygentic only changes the settings you include in the request.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.paygentic.io/v0/customers/cus_p1q2r3s4t5u6v7w8" \
    -H "Authorization: Bearer sk_test_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "notificationSettings": {
        "invoicePaid": false
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch('https://api.paygentic.io/v0/customers/cus_p1q2r3s4t5u6v7w8', {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer sk_test_YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ notificationSettings: { invoicePaid: false } }),
  });
  ```

  ```python Python theme={null}
  import requests

  requests.patch(
      "https://api.paygentic.io/v0/customers/cus_p1q2r3s4t5u6v7w8",
      headers={"Authorization": "Bearer sk_test_YOUR_API_KEY"},
      json={"notificationSettings": {"invoicePaid": False}},
  )
  ```
</CodeGroup>

<Info>
  **API Reference**: See the [Update Customer endpoint](/api-reference/customers/update).
</Info>

## Renewal reminders

You set up renewal reminders on the plan. To turn them on, set `renewalReminderEnabled` to `true`, and set `renewalReminderDays` to the number of days before renewal to send the reminder. The number of days must be shorter than the billing period.

To use different settings for one subscription, set the same fields on the subscription. To go back to the plan's settings, set them to `null`.

A customer only receives renewal reminders if their `renewalReminder` setting is on.

If the subscription uses automatic charges and the customer has no saved payment method, the reminder asks them to add one before the renewal date.

## Next steps

* [Subscriptions](/platform/billing/subscriptions)
* [Invoices](/platform/billing/invoices)
* [Customer Lifecycle](/platform/billing/customer-lifecycle#customer-portal)
