# customer.credits.updated

## `customer.credits.updated`

#### Payload Structure

```js
{
  "payload": {
    "lastName": "1",
    "note": null,
    "reason": "EARNED_FROM_PURCHASE",
    "amount": 1,
    "isUpsell": false,
    "orderId": "6244265853059",
    "newBalance": 1,
    "orderTotal": 100,
    "previousBalance": 0,
    "createdAt": "2025-05-30T10:18:11.721Z",
    "firstName": "1a",
    "merchantId": "inveterate",
    "customerId": "7733540520067",
    "appliedBy": null,
    "expirationDate": "2025-05-31T10:00:00.000Z",
    "updatedAt": "2025-05-30T10:18:11.721Z",
    "email": "inveterate@inveterate.com"
  },
  "metadata": {
    "retryCount": 0,
    "shopDomain": "inveterate.myshopify.com",
    "topic": "customer.credits.updated",
    "version": "2025-06",
    "triggerredAt": "2025-05-30T10:18:12.985Z"
  }
}
```

#### 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
* `email` (string): Customer's email address
* `firstName` (string): Customer's first name
* `lastName` (string): Customer's last name
* `amount` (number): Amount of credits involved in this transaction
* `newBalance` (number): Customer's new credit balance after this transaction
* `previousBalance` (number): Customer's credit balance before this transaction
* `reason` (string): Reason for the credit update (e.g., "EARNED\_FROM\_PURCHASE")
* `orderId` (string): ID of the order associated with this credit transaction (if applicable)
* `orderTotal` (number): Total value of the associated order (if applicable)
* `expirationDate` (string): ISO timestamp when these credits will expire
* `note` (string|null): Additional notes about the credit transaction
* `appliedBy` (string|null): Who applied the credits (if manually applied)
* `isUpsell` (boolean): Whether this credit transaction was part of an upsell

**metadata**

* `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
