# customer\_billing.attempt.failed

## `customer_billing.attempt.failed`

#### Payload Structure

```js
{
  "payload": {
    "customerId": "7733540520067",
    "merchantId": "inveterate",
    "createdAt": "2025-05-30T10:40:38.660Z",
    "updatedAt": "2025-05-30T10:40:38.660Z",
    "customer": {
      "id": "7733540520067",
      "email": "inveterate@inveterate.com",
      "phoneNumber": null
    },
    "detail": {
      "amount": 100,
      "currency": "USD",
      "errorMessage": "Payment method was revoked",
      "billingDate": "2025-06-30T07:00:00.000Z",
      "attemptedAt": "2025-06-30T07:00:00.000Z",
      "lastAttemptedAt": "2025-06-30T07:00:00.000Z",
      "billingAttempts": 3,
      "billingTierId": "3a636361"
    }
  },
  "metadata": {
    "id": "f8e4a11b-d12f-18f4-98e5-49bb16c7bc4e",
    "retryCount": 0,
    "shopDomain": "inveterate.myshopify.com",
    "topic": "customer_billing.attempt.failed",
    "version": "2025-06",
    "triggerredAt": "2025-05-30T10:40:38.682Z"
  }
}
```

#### Payload Fields

**payload**

* `createdAt` (string): ISO timestamp when the event was created
* `updatedAt` (string): ISO timestamp when the event was last updated
* `merchantId` (string): Merchant identifier
* `customerId` (string): Customer identifier
* `customer` (object): Customer information
  * `id` (string): Customer identifier
  * `email` (string): Customer's email address
  * `phoneNumber` (string|null): Customer's phone number
* `detail` (object): Billing attempt details
  * `amount` (number): Amount that failed to be charged
  * `currency` (string): Currency code (e.g., "USD")
  * `errorMessage` (string): Description of the billing failure
  * `billingDate` (string): ISO timestamp of billing date
  * `attemptedAt` (string): ISO timestamp of billing attempted date
  * `lastAttemptAt` (string): ISO timestamp of last billing attempted date
  * `billingAttempts` (number): Number of billing attempts made so far
  * `billingTierId` (string): ID of the billing tier being charged

**metadata**

* `id` (string): Unique event identifier
* `retryCount` (number): Number of retry attempts for this event
* `shopDomain` (string): Shopify domain of the merchant
* `topic` (string): Event topic name
* `version` (string): API version
* `triggerredAt` (string): ISO timestamp when the event was triggered
