> For the complete documentation index, see [llms.txt](https://developers.doku.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.doku.com/accept-payments/doku-checkout/order-and-notification-handling/automated-email-notifications.md).

# Automated Email Notifications

Automated Email Notifications keep customers informed about their order status in real time on DOKU Checkout — without any manual follow-up from the merchant. You can automatically send emails at each key stage of the order lifecycle (created, paid, failed, expiring soon, expired), reducing payment delays and support inquiries.

***

### Notification Events

DOKU can send a customer email for any combination of the following order events:

| Event                | Trigger                                                                                                                                                                                       |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **New Order**        | The order has been created but not yet paid.                                                                                                                                                  |
| **Successful Order** | The order has been successfully paid.                                                                                                                                                         |
| **Failed Order**     | <p></p><p>The order alert customers about failed transactions.</p>                                                                                                                            |
| **Expired Order**    | The order was not paid before the payment due date.                                                                                                                                           |
| **Almost Expired**   | The order is approaching its expiration time. The near-expiry threshold is configurable in days, hours, minutes, and seconds, and must be set to occur *before* the order's payment due date. |

{% hint style="info" %}
The **Expired Order** email is also the entry point for the [Recover Abandoned Cart](https://claude.ai/chat/checkout-recover-abandoned-cart.md) feature — it's what carries the recovery link back to the customer. If you use both features together, make sure **Expired Order** is enabled.
{% endhint %}

***

### 1. Enable via Dashboard

1. Log in to your **DOKU Dashboard**
2. Go to **Settings > Checkout Page Notifications**
3. For each order status you want to notify customers about, tick the **Email** channel
   1. For **Almost Expired**, set how far in advance the reminder should fire (days/hours/minutes/seconds before the payment due date)
4. Under **Merchant Notification**, you can add **up to 5** additional recipient addresses –– you may also receive the copy of emails for yourself
5. Click **Save**

***

### 2. API Reference

#### `customer.email` is required to trigger emails

Email delivery depends on a field you're likely sending already. DOKU can only send order-status emails if the order was created with a valid `customer.email`.

| Body parameter   | Type   | Mandatory                                   | Description                                                                                                                                                                                                                                        |
| ---------------- | ------ | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `customer.email` | string | **Required to receive email notifications** | Customer's email address. If omitted, no order-status emails (New Order, Successful Order, Failed Order, Expired Order, Almost Expired) will be sent to the customer — regardless of which events are enabled in the Dashboard. Max length: `128`. |

**Request sample:**

```json
{
    "order": {
        "amount": 80000,
        "invoice_number": "INV-{{$timestamp}}"
    },
    "payment": {
        "payment_due_date": 60
    },
    "customer": {
        "id": "JC-01",
        "name": "Zolanda",
        "email": "zolanda@example.com",
        "phone": "628121212121"
    }
}
```

{% hint style="danger" %}
Dashboard event configuration and `customer.email` are **both** required — enabling an event in the Dashboard without sending `customer.email` in the request means no email is sent, and vice versa.
{% endhint %}

#### How this differs from webhook (payment) notifications

Automated Email Notifications are a customer/merchant-facing email channel, separate from your server-to-server **Webhook / Payment Notification** integration:

|                | Email Notifications                                          | Webhook / Payment Notification                                                                |
| -------------- | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| Recipient      | Customer (and optionally merchant, via BCC-style recipients) | Merchant's backend system                                                                     |
| Purpose        | Keep the customer informed, ex:recover abandoned carts       | Trigger backend logic (order fulfillment, status sync)                                        |
| Configured via | Dashboard: **Settings > Checkout Page Notifications**        | Dashboard: **Settings > Webhook**, or `additional_info.override_notification_url` per request |
| Required field | `customer.email`                                             | Notification URL (webhook)                                                                    |

Enabling email notifications does not change your webhook payloads, and configuring a webhook does not automatically enable customer emails — the two are independent.

***

### Notes & Limitations

* No emails are sent unless `customer.email` is included in the `Initiate Order` request — this applies to **all** event types, not just Expired Order.
* The **Almost Expired** reminder time must be set to trigger *before* `payment.payment_due_date` elapses, or it will have no effect.
* Merchant copies (BCC-style notifications to your own team) support up to **5** additional recipient email addresses.
* Email appearance customization (logo, colors, text) applies to all notification events uniformly — you cannot currently style each event's email independently.
