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

# Webhook Events

> Complete list of webhook events and their payloads

## Member Events

### member.created

Triggered when a new member signs up.

```json theme={null}
{
  "id": "evt_123",
  "event": "member.created",
  "created_at": "2024-01-15T10:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "mem_xyz",
    "email": "user@example.com",
    "full_name": "John Doe",
    "avatar_url": null,
    "plan_id": "free",
    "status": "active",
    "metadata": {},
    "created_at": "2024-01-15T10:00:00Z"
  }
}
```

### member.updated

Triggered when a member's profile is updated.

```json theme={null}
{
  "id": "evt_124",
  "event": "member.updated",
  "created_at": "2024-01-15T11:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "mem_xyz",
    "email": "user@example.com",
    "full_name": "John Smith",
    "changes": {
      "full_name": {
        "old": "John Doe",
        "new": "John Smith"
      }
    }
  }
}
```

### member.deleted

Triggered when a member account is deleted.

```json theme={null}
{
  "id": "evt_125",
  "event": "member.deleted",
  "created_at": "2024-01-15T12:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "mem_xyz",
    "email": "user@example.com",
    "deleted_at": "2024-01-15T12:00:00Z"
  }
}
```

### member.login

Triggered when a member logs in.

```json theme={null}
{
  "id": "evt_126",
  "event": "member.login",
  "created_at": "2024-01-15T13:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "mem_xyz",
    "email": "user@example.com",
    "ip_address": "192.168.1.1",
    "user_agent": "Mozilla/5.0...",
    "login_method": "password"
  }
}
```

### member.plan\_changed

Triggered when a member's plan changes.

```json theme={null}
{
  "id": "evt_127",
  "event": "member.plan_changed",
  "created_at": "2024-01-15T14:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "mem_xyz",
    "email": "user@example.com",
    "previous_plan": "free",
    "new_plan": "pro",
    "changed_at": "2024-01-15T14:00:00Z"
  }
}
```

## Subscription Events

### subscription.created

Triggered when a new subscription is created.

```json theme={null}
{
  "id": "evt_300",
  "event": "subscription.created",
  "created_at": "2024-01-15T10:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "sub_123",
    "member_id": "mem_xyz",
    "plan_id": "pro",
    "status": "active",
    "current_period_start": "2024-01-15T00:00:00Z",
    "current_period_end": "2024-02-15T00:00:00Z",
    "stripe_subscription_id": "sub_stripe_123"
  }
}
```

### subscription.cancelled

Triggered when a subscription is cancelled.

```json theme={null}
{
  "id": "evt_301",
  "event": "subscription.cancelled",
  "created_at": "2024-01-15T10:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "sub_123",
    "member_id": "mem_xyz",
    "plan_id": "pro",
    "cancel_at_period_end": true,
    "cancelled_at": "2024-01-15T10:00:00Z",
    "effective_date": "2024-02-15T00:00:00Z"
  }
}
```

## Payment Events

### payment.succeeded

Triggered when a payment is successful.

```json theme={null}
{
  "id": "evt_400",
  "event": "payment.succeeded",
  "created_at": "2024-01-15T10:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "pay_123",
    "member_id": "mem_xyz",
    "amount": 9900,
    "currency": "usd",
    "description": "Pro Plan - Monthly",
    "stripe_payment_intent_id": "pi_123",
    "paid_at": "2024-01-15T10:00:00Z"
  }
}
```

### payment.failed

Triggered when a payment fails.

```json theme={null}
{
  "id": "evt_401",
  "event": "payment.failed",
  "created_at": "2024-01-15T10:00:00Z",
  "project_id": "proj_abc",
  "data": {
    "id": "pay_124",
    "member_id": "mem_xyz",
    "amount": 9900,
    "currency": "usd",
    "error_code": "card_declined",
    "error_message": "Your card was declined.",
    "failed_at": "2024-01-15T10:00:00Z"
  }
}
```
