---
title: "Membership Updated"
method: POST
path: "membership.updated"
tags: ["Memberships"]
---

# Membership Updated

`POST membership.updated` (webhook)

Sent whenever a membership changes: it activates or deactivates, cancel_at_period_end flips, or the seller edits its billing period, price or renewal date. previous_attributes carries the values that changed from. membership.activated is also delivered as a membership.updated, so you can subscribe to this single event and read the current status from the payload.

Required permissions:
 - `member:basic:read`
 - `member:email:read`
 - `webhook_receive:memberships`

## Headers

- `webhook-id` string, required: A unique identifier for this webhook request
- `webhook-signature` string, required: The signature of the webhook request with the webhook version prepended
- `webhook-timestamp` string, required: The timestamp in seconds since the Unix epoch that the webhook was sent at on the server

## Payload

- object
  - `account_id` string, nullable: The account ID that this webhook event is associated with
  - `api_version` 'v1', required: The API version for this webhook
  - `api_version_date` string, nullable, required: The dated API version (Api-Version-Date) the payload is serialized to
  - `data` Membership, required
    - `account` StorefrontAccount, required: The account (seller) this membership belongs to.
      - `banner_image_url` string, nullable, required: Account banner image URL. `null` when the account has not set one.
      - `id` string, required: Account ID, prefixed `biz_`.
      - `logo_url` string, nullable, required: Account logo image URL. `null` when the account has not set one.
      - `route` string, required: Account public route identifier, used in the `whop.com/{route}` storefront path.
      - `title` string, required: Account display name.
    - `affiliate` MembershipAffiliate, nullable, required
      - `applies_to_payments` 'first_payment' | 'all_payments', required: Whether the commission is paid on the membership's first payment only or on all its payments.
      - `commission_amount` Money, nullable, required
        - `amount` string, required: The amount in major units, as an exact decimal string. For example, `"10.00"` is ten dollars. It is a string so that no float rounds it in transit.
        - `currency` string, required: Three-letter ISO 4217 currency code, lowercase.
        - `decimals` integer, required: How many decimal places the amount carries. This is the precision the charge itself runs at.
        - `display_decimals` integer, required: How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
      - `commission_percentage` number, nullable, required: The percentage commission in percentage points, so `20` means 20%, or `null` for a flat fee.
      - `commission_source` 'custom' | 'member' | 'marketplace' | 'global', required: How the commission rate was set: `custom` for a rate set for this affiliate, `member` for the member affiliate rate of the plan or product, `global` for the product's global affiliate rate, or `marketplace` for a Whop marketplace referral.
      - `commission_type` 'flat_fee' | 'percentage', required: Whether the commission is a percentage or a flat fee.
      - `enabled` boolean, required: Whether this membership pays affiliate commissions. `false` means the affiliate is kept on the membership but is no longer paid.
      - `id` string, required: Affiliate ID, prefixed `aff_`.
      - `user_id` string, required: ID of the affiliate's user, prefixed `user_`.
    - `billing_period_days` integer, nullable, required: Number of days between recurring charges. `null` for non-renewing memberships or memberships with multiple renewal schedules.
    - `cancel_at_period_end` boolean, required: Whether the membership is set to cancel when the current billing period ends. Only meaningful for recurring variants.
    - `cancel_option` 'too_expensive' | 'switching' | 'missing_features' | 'technical_issues' | 'bad_experience' | 'unused' | 'other' | 'testing' | 'null', nullable, required: The category the member picked for why they canceled. `null` when no category was picked.
    - `canceled_at` string, nullable, required: When cancellation was requested, or when the membership was canceled if no request time is recorded, as an ISO 8601 timestamp. `null` when neither is recorded.
    - `cancellation_reason` string, nullable, required: Free-text explanation provided when canceling. `null` when no reason was provided.
    - `collection_method` 'charge_automatically' | 'send_invoice' | 'null', nullable, required: How renewals are collected. `charge_automatically` charges the saved payment method each period; `send_invoice` emails the buyer an invoice each period. `null` when not set.
    - `created_at` string, required: When the membership was created, as an ISO 8601 timestamp.
    - `current_period_end` string, nullable, required: When the current billing period renews, or when a non-renewing membership expires, as an ISO 8601 timestamp. `null` for one-time purchases with no expiration.
    - `current_period_start` string, nullable, required: When the current billing period started, as an ISO 8601 timestamp. `null` when no billing period is recorded.
    - `expires_at` string, nullable, required: When access ends for a membership with a fixed expiration, as an ISO 8601 timestamp. `null` when the membership has no expiration, such as a renewing membership.
    - `external_accounts` MembershipExternalAccount[], nullable, required
      - `external_id` string, required: The member's user ID on the platform, such as a Discord user ID. Prefixed with the platform (`discord_<external_id>`), it is the `external_account` value List Memberships filters by.
      - `platform` 'discord' | 'telegram', required: The platform the member's account is on.
      - `username` string, nullable, required: The member's username on the platform. `null` when Whop doesn't know it, such as for a membership imported with only a Discord ID.
    - `feedback_option` MembershipFeedbackOption, nullable, required
      - `label` string, required: The option's label when the member picked it. Renaming the option later does not change it.
    - `id` string, required: Membership ID, prefixed `mem_`.
    - `initial_price` Money, required: The variant's current up-front price, in the variant's currency. A list price, not necessarily what the buyer paid. `amount` is `"0.00"` when the first charge is free.
      - `amount` string, required: The amount in major units, as an exact decimal string. For example, `"10.00"` is ten dollars. It is a string so that no float rounds it in transit.
      - `currency` string, required: Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required: How many decimal places the amount carries. This is the precision the charge itself runs at.
      - `display_decimals` integer, required: How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `license_key` string, nullable, required: The software license key for this membership. Only present when the product includes a software licensing experience.
    - `manage_url` string, nullable, required: URL where the buyer can sign in to manage billing. `null` without a member record or unless the caller is the buyer or has `member:manage` on the account.
    - `member` MembershipMember, nullable, required
      - `access_level` 'no_access' | 'admin' | 'customer', required: What the member can reach on the account: `customer` for paying members, `admin` for team members, `no_access` once every grant has lapsed.
      - `last_accessed_at` string, nullable, required: When the member last opened the account's content, as an ISO 8601 timestamp. `null` if they never have.
      - `position` number, nullable, required: The member's sort position in the buyer's own account list. `null` until they arrange it.
    - `member_id` string, nullable, required: The buyer's member record on the account, prefixed `mber_`. `null` when the membership has no member record, such as an unclaimed membership.
    - `metadata` object, required: Custom key-value pairs stored on the membership, commonly used for software licensing.
    - `most_recent_action` 'canceled_on' | 'finished_split_pay_at' | 'canceling_on' | 'ending_on' | 'renewing_on' | 'past_due' | 'next_payment_attempt' | 'paused_at' | 'trial_ends_at' | 'unresolved_at' | 'trial_canceling_on' | 'null', nullable, required: The membership's latest lifecycle event, such as `renewing_on` or `canceled_on`. Pair it with `most_recent_action_at`. `null` when none is recorded.
    - `most_recent_action_at` string, nullable, required: When `most_recent_action` happened or is scheduled to happen, as an ISO 8601 timestamp. A future time for upcoming events such as `renewing_on`. `null` when no action is recorded.
    - `phone_number` string, nullable, required: The buyer's phone number recorded for this membership, or `null`. The number collected (or verified) at checkout when the seller's phone collection is on; falls back to the buyer's account number when they have shared one with this seller.
    - `product` MembershipProduct, required: The product this membership grants access to.
      - `id` string, required: Product ID, prefixed `prod_`.
      - `logo_url` string, nullable, required: Product logo image URL. `null` when the product has no logo.
      - `title` string, required: Product display name.
    - `product_id` string, required: The product this membership grants access to, prefixed `prod_`.
    - `promo_code_id` string, nullable, required: The promo code discounting this membership, prefixed `promo_`. `null` when none is applied. Set at checkout or by Apply Promo Code to Membership.
    - `renewal_price` Money, nullable, required
      - `amount` string, required: The amount in major units, as an exact decimal string. For example, `"10.00"` is ten dollars. It is a string so that no float rounds it in transit.
      - `currency` string, required: Three-letter ISO 4217 currency code, lowercase.
      - `decimals` integer, required: How many decimal places the amount carries. This is the precision the charge itself runs at.
      - `display_decimals` integer, required: How many decimal places to SHOW. Usually equal to `decimals`, and deliberately not always: COP is charged in centavos but written in whole pesos, so it is `2` and `0`. Format the number in your own locale using this.
    - `split_pay_current_payments` integer, nullable, required: Paid installments counted so far on a split pay membership. `null` when the membership is not on split pay, or before its first installment is counted.
    - `split_pay_required_payments` integer, nullable, required: Installment payments required before the membership stops billing. `null` when the membership is not on split pay.
    - `status` 'trialing' | 'active' | 'past_due' | 'completed' | 'canceled' | 'expired' | 'unresolved' | 'scheduled', required: Billing state of the membership. `active` and `trialing` memberships grant access. `past_due` is the grace period after a failed payment. `completed` one-time purchases keep access. `scheduled` memberships wait for their variant's start date, when the first charge runs and access starts. `canceled` and `expired` memberships do not grant access.
    - `updated_at` string, required: When the membership was last changed, as an ISO 8601 timestamp. Reflects the most recent change to the membership itself, so you can reconcile against webhook retries, replays, and backfills.
    - `user_id` string, nullable, required: The buyer, prefixed `user_`. `null` when the buyer is another business or the membership is unclaimed.
    - `variant_id` string, required: The variant the buyer purchased, prefixed `plan_`.
  - `id` string, required: A unique ID for every single webhook request
  - `previous_attributes` object: For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event
  - `timestamp` string, date-time, required: The timestamp in ISO 8601 format that the webhook was sent at on the server
  - `type` 'membership.updated', required: The webhook event type

## Acknowledgement `200`

Return a 200 status to indicate that the data was received successfully

---

[API](https://skmtc.dev/whop/apis/whop-api.md) - [All operations](https://skmtc.dev/whop/apis/whop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whop/apis/whop-api/revisions/b10d1ab093e8?raw)
