Webhooks

Webhooks allow your site or service to be notified when Orders, Members, Plans, Downloads or Subscriptions change in Memberful. Create and manage webhooks from Settings → Integrate → Webhooks in your Memberful dashboard. You can use these webhooks to react to the change, perhaps by creating an account or syncing data.

Want "code free" webhooks? Learn how to use webhooks with Zapier

Memberful webhook "pings" are sent as POST requests with a JSON payload. You should ensure that the URL the webhook pings only responds to POST requests, and always fetches the latest copy of the order/member/plan/download from Memberful, so as to avoid any issues with the order of pings.

If a webhook ping does not receive a response code in the 2XX range (i.e. success), then the ping will be retried once per hour for up to 24 hours, until a response code in the 2xx range is returned.

Payloads

member_signup

Sent when a Memberful member account is first created.

 {
  "event": "member_signup",
  "member": {
    "address": {
      "street": "Street",
      "city": "City",
      "postal_code": "Postal code",
      "country": "City"
    },
    "created_at": 1487876664,
    "credit_card": {
      "exp_month": 1,
      "exp_year": 2040
    },
    "custom_field": "Custom field value",
    "email": "john.doe@example.com",
    "first_name": "John",
    "full_name": "John Doe",
    "id": 0,
    "last_name": "Doe",
    "phone_number": "555-12345",
    "stripe_customer_id": "cus_00000",
    "unrestricted_access": false,
    "username": "john_doe"
  }
}

member_updated

Sent whenever a member's profile information is updated.

 {
  "event": "member_updated",
  "member": {
    "address": {
      "street": "Street",
      "city": "City",
      "postal_code": "Postal code",
      "country": "City"
    },
    "created_at": 1487876664,
    "credit_card": {
      "exp_month": 1,
      "exp_year": 2040
    },
    "custom_field": "Custom field value",
    "email": "john.doe@example.com",
    "first_name": "John",
    "full_name": "John Doe",
    "id": 0,
    "last_name": "Doe",
    "phone_number": "555-12345",
    "stripe_customer_id": "cus_00000",
    "unrestricted_access": false,
    "username": "john_doe"
  },
  "changed": {
    "email": [
      "bob@example.com",
      "john.doe@example.com"
    ]
  }
}

member.deleted

Sent when a member is deleted.

 {
  "event": "member.deleted",
  "member": {
    "deleted": true,
    "id": 0
  }
}

order.purchased

Sent after a member completes an order via checkout or when Staff manually adds a new order. Not sent for subscription renewal orders.

 {
  "event": "order.purchased",
  "order": {
    "uuid": "4DACB7B0-B728-0130-F9E8-102B343DC979",
    "number": "4DACB7B0",
    "total": 100000000,
    "status": "completed",
    "receipt": "receipt text",
    "member": {
      "address": {
        "street": "Street",
        "city": "City",
        "postal_code": "Postal code",
        "country": "City"
      },
      "created_at": 1487876664,
      "credit_card": {
        "exp_month": 1,
        "exp_year": 2040
      },
      "custom_field": "Custom field value",
      "email": "john.doe@example.com",
      "first_name": "John",
      "full_name": "John Doe",
      "id": 0,
      "last_name": "Doe",
      "phone_number": "555-12345",
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "products": [

    ],
    "subscriptions": [
      {
        "subscription": {
          "id": 0,
          "price": 1000,
          "name": "Sample plan",
          "slug": "0-sample-plan",
          "renewal_period": "monthly",
          "interval_unit": "month",
          "interval_count": 1,
          "for_sale": true
        }
      }
    ]
  }
}

order.suspended

Sent when order is suspended.

 {
  "event": "order.suspended",
  "order": {
    "uuid": "4DACB7B0-B728-0130-F9E8-102B343DC979",
    "number": "4DACB7B0",
    "total": 100000000,
    "status": "suspended",
    "receipt": "receipt text",
    "member": {
      "address": {
        "street": "Street",
        "city": "City",
        "postal_code": "Postal code",
        "country": "City"
      },
      "created_at": 1487876664,
      "credit_card": {
        "exp_month": 1,
        "exp_year": 2040
      },
      "custom_field": "Custom field value",
      "email": "john.doe@example.com",
      "first_name": "John",
      "full_name": "John Doe",
      "id": 0,
      "last_name": "Doe",
      "phone_number": "555-12345",
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "products": [

    ],
    "subscriptions": [
      {
        "subscription": {
          "id": 0,
          "price": 1000,
          "name": "Sample plan",
          "slug": "0-sample-plan",
          "renewal_period": "monthly",
          "interval_unit": "month",
          "interval_count": 1,
          "for_sale": true
        }
      }
    ]
  }
}

order.completed

Sent when order is marked as completed again (staff can complete suspended orders).

 {
  "event": "order.completed",
  "order": {
    "uuid": "4DACB7B0-B728-0130-F9E8-102B343DC979",
    "number": "4DACB7B0",
    "total": 100000000,
    "status": "completed",
    "receipt": "receipt text",
    "member": {
      "address": {
        "street": "Street",
        "city": "City",
        "postal_code": "Postal code",
        "country": "City"
      },
      "created_at": 1487876664,
      "credit_card": {
        "exp_month": 1,
        "exp_year": 2040
      },
      "custom_field": "Custom field value",
      "email": "john.doe@example.com",
      "first_name": "John",
      "full_name": "John Doe",
      "id": 0,
      "last_name": "Doe",
      "phone_number": "555-12345",
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "products": [

    ],
    "subscriptions": [
      {
        "subscription": {
          "id": 0,
          "price": 1000,
          "name": "Sample plan",
          "slug": "0-sample-plan",
          "renewal_period": "monthly",
          "interval_unit": "month",
          "interval_count": 1,
          "for_sale": true
        }
      }
    ]
  }
}

order.refunded

Sent when order is refunded.

 {
  "event": "order.refunded",
  "order": {
    "uuid": "4DACB7B0-B728-0130-F9E8-102B343DC979",
    "number": "4DACB7B0",
    "total": 100000000,
    "status": "refunded",
    "receipt": "receipt text",
    "member": {
      "address": {
        "street": "Street",
        "city": "City",
        "postal_code": "Postal code",
        "country": "City"
      },
      "created_at": 1487876664,
      "credit_card": {
        "exp_month": 1,
        "exp_year": 2040
      },
      "custom_field": "Custom field value",
      "email": "john.doe@example.com",
      "first_name": "John",
      "full_name": "John Doe",
      "id": 0,
      "last_name": "Doe",
      "phone_number": "555-12345",
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "products": [

    ],
    "subscriptions": [
      {
        "subscription": {
          "id": 0,
          "price": 1000,
          "name": "Sample plan",
          "slug": "0-sample-plan",
          "renewal_period": "monthly",
          "interval_unit": "month",
          "interval_count": 1,
          "for_sale": true
        }
      }
    ]
  }
}

subscription_plan.created

Sent when a new subscription plan is created.

 {
  "event": "subscription_plan.created",
  "subscription": {
    "id": 0,
    "price": 1000,
    "name": "Sample plan",
    "slug": "0-sample-plan",
    "renewal_period": "monthly",
    "interval_unit": "month",
    "interval_count": 1,
    "for_sale": true
  }
}

subscription_plan.updated

Sent when a subscription plan is updated.

 {
  "event": "subscription_plan.updated",
  "subscription": {
    "id": 0,
    "price": 1000,
    "name": "Sample plan",
    "slug": "0-sample-plan",
    "renewal_period": "monthly",
    "interval_unit": "month",
    "interval_count": 1,
    "for_sale": true
  }
}

subscription_plan.deleted

Sent when a subscription plan is deleted.

 {
  "event": "subscription_plan.deleted",
  "subscription": {
    "id": 0,
    "price": 1000,
    "name": "Sample plan",
    "slug": "0-sample-plan",
    "renewal_period": "monthly",
    "interval_unit": "month",
    "interval_count": 1,
    "for_sale": true
  }
}

subscription.deactivated

Sent when a subscription is deactivated (expired).

 {
  "event": "subscription.deactivated",
  "subscription": {
    "active": false,
    "autorenew": true,
    "created_at": 1402281249,
    "expires_at": 1433817249,
    "id": 1,
    "member": {
      "email": "john.doe@example.com",
      "full_name": "John Doe",
      "id": 0,
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "subscription_plan": {
      "id": 0,
      "interval_count": 1,
      "interval_unit": "month",
      "name": "Sample plan",
      "price_cents": 100000000,
      "slug": "0-sample-plan"
    },
    "trial_end_at": null,
    "trial_start_at": null
  }
}

subscription.deleted

Sent when a subscription is deleted.

 {
  "event": "subscription.deleted",
  "subscription": {
    "active": true,
    "autorenew": true,
    "created_at": 1402281249,
    "expires_at": 1433817249,
    "id": 1,
    "member": {
      "email": "john.doe@example.com",
      "full_name": "John Doe",
      "id": 0,
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "subscription_plan": {
      "id": 0,
      "interval_count": 1,
      "interval_unit": "month",
      "name": "Sample plan",
      "price_cents": 100000000,
      "slug": "0-sample-plan"
    },
    "trial_end_at": null,
    "trial_start_at": null
  }
}

subscription.renewed

Sent when a subscription is renewed.

 {
  "event": "subscription.renewed",
  "subscription": {
    "active": true,
    "autorenew": true,
    "created_at": 1402281249,
    "expires_at": 1433817249,
    "id": 1,
    "member": {
      "email": "john.doe@example.com",
      "full_name": "John Doe",
      "id": 0,
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "subscription_plan": {
      "id": 0,
      "interval_count": 1,
      "interval_unit": "month",
      "name": "Sample plan",
      "price_cents": 100000000,
      "slug": "0-sample-plan"
    },
    "trial_end_at": null,
    "trial_start_at": null
  }
}

subscription.updated

Sent when a subscription is updated. For example after a plan change.

 {
  "event": "subscription.updated",
  "subscription": {
    "active": true,
    "autorenew": true,
    "created_at": 1402281249,
    "expires_at": 1433817249,
    "id": 1,
    "member": {
      "email": "john.doe@example.com",
      "full_name": "John Doe",
      "id": 0,
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "subscription_plan": {
      "id": 0,
      "interval_count": 1,
      "interval_unit": "month",
      "name": "Sample plan",
      "price_cents": 100000000,
      "slug": "0-sample-plan"
    },
    "trial_end_at": null,
    "trial_start_at": null
  }
}

download.created

Sent when a download is created.

 {
  "event": "download.created",
  "product": {
    "id": 0,
    "name": "Sample download",
    "price": 1000,
    "slug": "0-sample-download",
    "for_sale": true
  }
}

download.updated

Sent when a download is updated.

 {
  "event": "download.updated",
  "product": {
    "id": 0,
    "name": "Sample download",
    "price": 1000,
    "slug": "0-sample-download",
    "for_sale": true
  }
}

download.deleted

Sent when a download is deleted.

 {
  "event": "download.deleted",
  "product": {
    "id": 0,
    "name": "Sample download",
    "price": 1000,
    "slug": "0-sample-download",
    "for_sale": true
  }
}

General

How to

CMS Integrations

Email Newsletters

Discussion Forums

WordPress

Video

API