# Invoice events

Sent when an invoice is created or deleted through this API.
- `invoice.created`
:
`POST /invoices`
.
`payload.invoice`
 is the

invoice the request returned.
- `invoice.deleted`
:
`DELETE /invoices/{token}`
 deleted an unpaid or

overdue invoice.
`payload.invoice`
 is the invoice as it was just

before it was deleted.

Endpoint: POST invoiceEvent
Security: ClientKey, SecretKey

## Header parameters:

  - `X-Dime-Signature` (string, required)
    `v1=` followed by the hex HMAC-SHA256 of the raw body, keyed with the endpoint's `signing_secret`.

  - `X-Dime-Signature-Version` (string, required)
    Signing scheme. Always `v1`.

  - `X-Dime-Event-Id` (string, required)
    The body's `event_id`.

  - `X-Dime-Event-Type` (string, required)
    The body's `event_type`.

  - `X-Dime-Attempt` (string, required)
    The attempt number, `1` for the first and up to `9` with retries.

## Request fields (application/json):

  - `event_id` (string, required)
    Unique per event, and the same on every redelivery and replay of it. Use it to discard duplicates.
    Example: evt_V1StGXR8Z5jdHi6BmyT2

  - `event_type` (string, required)
    Enum: "invoice.created", "invoice.deleted"

  - `occurred_at` (string, required)
    When Dime sent the event. Events can arrive out of order; use this to order them.
    Example: 2026-10-27T15:04:07.112Z

  - `owner_type` (string, required)
    Enum: "merchant"

  - `owner_id` (string | null, required)
    Your merchant token.
    Example: m82yalYupLIdpAz

  - `addon_subscription_id` (null)
    Always `null`.
    Example: null

  - `resource_type` (string, required)
    Enum: "invoice"

  - `resource_id` (string | null, required)
    The `token` of the record the event is about: a transaction's
for `payment` and `refund`, otherwise the token of the kind named
by `resource_type`.
    Example: txn_20261027_PBFpP02

  - `payload` (object, required)

  - `payload.invoice` (object, required)

  - `payload.invoice.object` (string)
    Enum: "invoice"

  - `payload.invoice.number` (string | null)
    Human-readable invoice number.
    Example: INV-25082026-0007

  - `payload.invoice.token` (string)
    Public token. The customer pays at `https://pay.dimepay.app/open-invoices/{token}/`.
    Example: inv_20260825_giodwK2

  - `payload.invoice.status` (string)
    Enum: "PAID", "UNPAID", "OVERDUE", "CANCELLED"

  - `payload.invoice.payment_type` (string | null)
    Example: example

  - `payload.invoice.currency` (string)
    Enum: "USD", "JMD", "GBP", "EUR", "TTD", "BBD", "XCD", "GYD", "SRD"

  - `payload.invoice.subtotal` (number)
    Example: 1000

  - `payload.invoice.total` (number)
    Example: 1100

  - `payload.invoice.shipping` (number | null)
    Example: 0

  - `payload.invoice.tax` (number | null)
    Example: 100

  - `payload.invoice.tax_label` (string | null)
    Example: example

  - `payload.invoice.discount` (number | null)
    Example: 0

  - `payload.invoice.customer` (string | null)
    The customer's `token`.
    Example: cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW

  - `payload.invoice.notes` (string | null)
    Example: example

  - `payload.invoice.recurring` (boolean)
    Example: true

  - `payload.invoice.recurring_frequency` (any)

  - `payload.invoice.recurring_billing_cycle` (integer | null)
    Example: 6

  - `payload.invoice.recurring_start_date` (string | null)
    Example: 2026-11-19T00:00:00.000Z

  - `payload.invoice.recurring_end_date` (string | null)
    Example: null

  - `payload.invoice.recurring_end_type` (string | null)
    Enum: "DATE", "CYCLE", "CANCEL", "null"

  - `payload.invoice.line_items` (array)

  - `payload.invoice.line_items.type` (string)
    Enum: "custom", "product"

  - `payload.invoice.line_items.product` (string | null)
    The product's `token`, for catalog items.
    Example: prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE

  - `payload.invoice.line_items.name` (string)
    Example: Sample Item

  - `payload.invoice.line_items.description` (string | null)
    Example: A short description.

  - `payload.invoice.line_items.quantity` (integer)
    Example: 1

  - `payload.invoice.line_items.unit_amount` (number)
    Example: 1100

  - `payload.invoice.invoice_date` (string)
    Example: 2026-08-26T00:48:52.252Z

  - `payload.invoice.due_date` (string)
    Example: 2026-08-26T00:48:52.252Z

  - `payload.invoice.paid_at` (string | null)
    Example: 2026-08-26T00:48:52.252Z

  - `payload.invoice.created_at` (string)
    Example: 2026-08-26T00:48:52.252Z

  - `payload.invoice.updated_at` (string)
    Example: 2026-08-26T00:48:52.252Z

  - `signature_version` (string, required)
    Enum: "v1"

## Request examples:

  - `Deleted through the API` (unknown)

## Response 200:

  - `200` (unknown)
    Return any `2xx` within 7 seconds to acknowledge. Otherwise Dime
retries automatically for about 3 days; see **Webhooks guide**.
Replay a delivery sooner, or after it has `FAILED`, with
`POST /webhook-events/{token}/replay`.

