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

# payment.attempt.failed

> An attempt to charge a payment was declined.

# payment.attempt.failed

> Generated from COPE public event contracts. Do not edit this page by hand.

Sent once for every declined attempt to charge a payment, the first one included: at checkout each card the buyer tries, and on a renewal or instalment each attempt the payment processor makes, with `will_retry` and `next_attempt_at` saying whether and when it will try again. `attempt` counts the payment's declines from 1. A decline reported after the payment already succeeded is still sent. Delivery order against `payment.sale.succeeded` and `subscription.cancelled` is not guaranteed. `payment.failed` is still sent once per payment, at its first decline: subscribe to `payment.failed` for one alert per failed payment, or to this event for every attempt, not both, or the first decline reaches you twice. Stripe payments only.

## Delivery Contract

| Field | Value |
| - | - |
| Encoding | JSON: `id`, `type`, `version`, `source`, `created_at`, `occurred_at`, `data` |
| Delivery | At least once |
| Idempotency | Deduplicate on `id`: every retry and replay of this event repeats it, and `X-Cope-Event-Id` carries it. |
| Source | `cope.core` |
| Category | Payments |
| Availability | Available in the public webhook reference. |
| Schema title | payment.attempt.failed webhook body |
| Schema ID | `https://schemas.cope.com/webhooks/payment.attempt.failed/v1` |

## Payload Fields

| Field | Required | Type | Allowed Values | Description | |
| - | - | - | - | - | - |
| `amount_cents` | yes | `integer` | - | - | |
| `attempt` | yes | `integer` | - | Which declined attempt on this payment the event reports, counted from 1 in the order COPE recorded the payment's declines. A payment is one checkout payment or one renewal or instalment invoice, so the count starts again at 1 for each invoice. A new card tried on the same payment is that payment's next attempt. | |
| `business` | no | `object` | - | The business this event concerns. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by. | |
| `business_name` | no | \`string | null\` | - | - |
| `buyer` | no | `object` | - | The buyer as the checkout captured them. `email` is null when the checkout did not ask for one. | |
| `currency` | yes | `string` | - | - | |
| `decline_code` | no | \`string | null\` | - | The decline reason the payment processor gave for this attempt, when it gave one. |
| `event_type` | yes | `const` | `payment.attempt.failed` | - | |
| `failed_at` | yes | `string` | - | - | |
| `failure_code` | yes | `string` | - | - | |
| `failure_message` | yes | `string` | - | - | |
| `in_checkout` | yes | `boolean` | - | True when the buyer was present on the payment page when the charge was declined: a checkout charge, not a renewal or instalment invoice, on a payment method that reports its outcome while the buyer waits, such as a card. False for an invoice charge, and for a payment method whose outcome arrives after the buyer has left, such as a SEPA, ACH or Bacs bank debit, or whose type the decline does not name. | |
| `is_recurring` | no | `boolean` | - | True when any line the failed payment covers is on a recurring plan (a subscription or an installment plan), including that plan's first charge at checkout. | |
| `line_items` | no | `array` | - | One entry per line the failed payment covers; every entry names its product. At least one entry when present. Optional: present when the producer sends it; older events do not carry it. | |
| `next_attempt_at` | yes | \`string | null\` | - | When the payment processor will make its next attempt, as it reported it; never estimated by COPE. Null whenever `will_retry` is false, and when the next attempt has already happened (the invoice is paid). |
| `occurred_at` | yes | `string` | - | - | |
| `order` | no | `object` | - | The order this event concerns. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by. | |
| `payment` | no | `object` | - | The payment this event concerns. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by. | |
| `payment_method` | no | \`object | null\` | - | The payment method this attempt was declined on: the same shape `payment.sale.succeeded` carries. `brand` and `last4` are present for a card. Null when the decline does not describe the method. |
| `processor` | yes | `string` | - | - | |
| `product` | no | `object` | - | The product this event concerns. Carries `object` (what it is) and `id` (which one); `id` is the public identifier a merchant addresses it by. | |
| `product_name` | no | \`string | null\` | - | - |
| `schema_version` | yes | `const` | `1.0` | - | |
| `will_retry` | yes | `boolean` | - | True when another attempt on this payment followed this one or is scheduled. Always false at checkout, where the buyer retries, including for a checkout decline reported after the payment already succeeded. For a renewal or instalment: true while the payment processor has another attempt scheduled; true when the invoice has since been paid; false after the last attempt, and when the invoice was voided. | |

## Example delivery

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "created_at": "2026-05-05T12:00:00.000Z",
  "data": {
    "amount_cents": 4900,
    "attempt": 2,
    "business": {
      "id": "biz_g7-Jq2PxT_4mRvNa",
      "object": "business"
    },
    "business_name": "example_business_name",
    "buyer": {
      "billing_address": {
        "city": "example_city",
        "country": "DE",
        "line1": "example_line1",
        "line2": "example_line2",
        "postal_code": "example_postal_code",
        "region": "example_region"
      },
      "company_name": "example_company_name",
      "email": "ada@example.com",
      "first_name": "example_first_name",
      "full_name": "example_full_name",
      "last_name": "example_last_name",
      "locale": "de",
      "phone": "example_phone",
      "private_person": false,
      "shipping_address": {
        "city": "example_city",
        "country": "DE",
        "line1": "example_line1",
        "line2": "example_line2",
        "postal_code": "example_postal_code",
        "region": "example_region"
      },
      "tax_id": "example_tax_id"
    },
    "currency": "EUR",
    "decline_code": "example_decline_code",
    "event_type": "payment.attempt.failed",
    "failed_at": "2026-05-12T16:30:12Z",
    "failure_code": "example_failure_code",
    "failure_message": "example_failure_message",
    "in_checkout": false,
    "is_recurring": true,
    "line_items": [
      {
        "payment_number": 2,
        "product": {
          "id": "prod_Hq2W8xLm",
          "object": "product"
        },
        "subscription": {
          "id": "ps_Gm3Tq8ZrW1bN",
          "object": "subscription"
        }
      }
    ],
    "next_attempt_at": "2026-10-08T11:19:00Z",
    "occurred_at": "2026-05-12T16:30:12Z",
    "order": {
      "id": "ord_V7kP2mQx9RtL",
      "metadata": {},
      "object": "order"
    },
    "payment": {
      "id": "py_4nHs8QwZ2pLk",
      "object": "payment"
    },
    "payment_method": {
      "brand": "example_brand",
      "last4": "example_last4",
      "type": "example_type"
    },
    "processor": "example_processor",
    "product": {
      "id": "prod_Hq2W8xLm",
      "object": "product"
    },
    "product_name": "example_product_name",
    "schema_version": "1.0",
    "will_retry": true
  },
  "id": "8d2f6c1a-4e7b-4a39-b5d0-2c9e1f7a3b64",
  "occurred_at": "2026-05-05T11:59:58.500Z",
  "source": "cope.core",
  "type": "payment.attempt.failed",
  "version": "v1"
}
```

## Compatibility

Fields may be added within the same major version. Removing or changing the meaning of a documented field requires a new event version.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.