app_installation.created when an account installs it and app_installation.deleted when an account removes it. Each installation also stores two values that only your app can change. external_id links the installation to a record in your system, and metadata holds small values such as a sync cursor.
A storefront that takes payments through Whop
This guide follows a made-up app. Market Lane is an online store builder, and its Whop app lets a business take payments on its Market Lane store through Whop. Every store has a handle, such asriver-coffee, and every checkout on Market Lane starts with that handle.
Market Lane has to know three things:
- When a business installs the app, so it can connect the business’s store.
- Which Whop account takes the payment when a checkout starts on a store.
- When a business removes the app, so its store stops offering Whop at checkout.
1
Request the permissions your app needs
In your app’s permissions, request
checkout_configuration:create to create checkouts on the account, and webhook_receive:payments to hear when they’re paid. The business approves both when it installs the app.2
Subscribe your app's webhook
Create one webhook that belongs to your app, not to your account: set The key needs
resource_id to your app’s ID. It receives the installation events for every account that installs your app, plus the payment events those accounts granted.developer:manage_webhook on the account that owns the app. Store the webhook_secret from the response, and verify every delivery as described in Webhooks.Only your app’s own webhooks receive installation events. An account’s webhooks never do, even for the apps installed on that account.3
Connect the store when a business installs the app
app_installation.created carries the installation in data. The envelope’s account_id is the business that installed the app:river-coffee, Market Lane stores the handle on the installation as external_id:4
Find the account when a checkout starts
A shopper checks out on The result has at most one installation, and its
river-coffee. The request carries only the store handle, so Market Lane looks the installation up by external_id:account.id is the account that takes the payment. Market Lane creates a checkout on that account with POST /checkout_configurations, puts its own order ID in metadata, and sends the shopper to the purchase_url. Market Lane keeps no table of store handles and Whop accounts, because the installation is the mapping.5
Mark the order paid
payment.succeeded arrives on the same webhook. Its account_id is the store’s business, and the payment carries the metadata from the checkout, so Market Lane finds the order by its ID and marks it paid.6
Turn off Whop payments when the business removes the app
app_installation.deleted arrives as soon as a business removes your app. Market Lane stops offering Whop at checkout on river-coffee right away, so no shopper reaches a checkout that would fail. The installation no longer appears in GET /app_installations, and your app can no longer act on that account.7
Reconnect on a reinstall
If the business installs the app again, you get another
app_installation.created. It’s the same installation: the id, created_at, external_id, and metadata all come back. Market Lane sees external_id: "river-coffee" in the payload and turns Whop payments back on for that store, without asking the business to connect it again.Store your own ID on an installation
external_idis unique across your app’s installations. Setting a value that another installation already has returns a409, so two businesses can never claim the same store. Values are case-sensitive:River-Coffeeandriver-coffeeare different.metadatamerges. The keys you send are set, a key set tonullis removed, keys you leave out don’t change, and{}clears every key. Values are strings.- A removed installation keeps its
external_id. While a business has your app removed, no other installation of your app can take that value. If the business installs the app again, the value comes back with it. - Don’t store secrets. Your developer account can read
metadataandexternal_id.
Handle repeated events
- Expect repeats. A business can install, remove, and install your app again. Treat
app_installation.createdfor an installation you already know as a reinstall. - Ignore duplicates by
webhook-id. Whop retries deliveries that don’t get a2xxresponse, and a retry keeps the samewebhook-id.
Who can read installations
Next steps
Webhooks
Verify signatures, handle retries, and see every event.
App Installations API reference
Every field and endpoint for app installations.
Accept payments
Create checkouts and fulfill orders from
payment.succeeded.Permissions
Declare the permissions your app requests at install.

