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

# invoice.payment_failed

> Sent when a payment attempt for an invoice fails.

<Note>Available from API version `2026-05-27.curie` onwards.</Note>

Triggered when a payment attempt against an invoice fails (e.g. SEPA rejection, insufficient funds). Limited to `usage` and `prepayment` invoices. Fires once per failed payment attempt; a single invoice may emit this event multiple times if Nomos retries collection. Use `invoice.uncollectible` to detect the terminal failure after dunning is exhausted.

## Response body parameters

<ResponseField name="id" type="string" required>
  Unique event identifier (starts with `evt_`).
</ResponseField>

<ResponseField name="timestamp" type="string" required>
  ISO 8601 timestamp when the event was created.
</ResponseField>

<ResponseField name="topic" type="literal" required>
  Always `invoice.payment_failed` for this event.
</ResponseField>

<ResponseField name="context" type="object" required>
  Event-specific data containing related resource IDs.

  <Expandable title="properties" defaultOpen>
    <ResponseField name="invoice" type="string" required>
      ID of the related invoice (starts with `inv_`).
    </ResponseField>

    <ResponseField name="subscription" type="string" required>
      ID of the related subscription (starts with `sub_`).

      Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json Example payload theme={null}
  {
    "id": "evt_mi4f0oda6x9m7gcsvjk0ole1",
    "timestamp": "2026-01-15T10:30:00.000Z",
    "topic": "invoice.payment_failed",
    "context": {
      "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1",
      "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1"
    }
  }
  ```
</RequestExample>
