Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add RevenueCat/play-billing-skills --skill webhooksgit clone --depth 1 https://github.com/RevenueCat/play-billing-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/revenuecat/play-billing-skills/webhooks)<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/webhooks"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/webhooks/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/revenuecat/play-billing-skills/webhooks"><img src="https://agentmods.dev/badge/skills/revenuecat/play-billing-skills/webhooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.02189 |
| Opus 5 | $0.00028 | $0.01094 |
| Sonnet 5 | $0.00011 | $0.00438 |
| Haiku 4.5 | $0.00006 | $0.00219 |
Grade A, and why
webhooks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
97% identical to rc-webhooks — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RevenueCat Webhooks
You configure one endpoint. RevenueCat posts one normalized JSON event schema for every store. Your job on the server side is to verify the signature, deduplicate by event.id, and dispatch per event type.
Phase 1: Discover
Confirm what you are wiring up before touching code.
- You own a server side HTTPS endpoint that accepts POST with a JSON body.
- You have the webhook secret from the RevenueCat dashboard under Integrations then Webhooks.
- You have durable storage to record processed event IDs and entitlement state per
app_user_id. - You understand that RevenueCat has already mapped products to entitlements, so you branch on
event.typeand readevent.entitlement_ids. You do not maintain a product to entitlement table on your backend.
Every event has this outer shape:
{
"api_version": "1.0",
"event": {
"id": "evt_01HABCXYZ0000000000000001",
"type": "INITIAL_PURCHASE",
"app_user_id": "user_12345",
"product_id": "premium_monthly",
"period_type": "NORMAL",
"purchased_at_ms": 1700000000000,
"expiration_at_ms": 1702592000000,
"store": "PLAY_STORE",
"environment": "PRODUCTION",
"entitlement_ids": ["pro_access"],
"transaction_id": "GPA.1234-5678-9012-34567"
}
}
Phase 2: Plan
Pick the right action for each event type before you write the handler.
| Event type | Meaning | Handler action |
|---|---|---|
INITIAL_PURCHASE |
First paid transaction for this user and product. | Grant entitlements in entitlement_ids. |
RENEWAL |
Subscription renewed, including resubscription after an EXPIRATION. |
Grant or extend entitlements in entitlement_ids. |
CANCELLATION |
User turned off auto renew. Access continues until expiration_at_ms. |
Schedule revocation at expiration_at_ms. Do not revoke now. |
UNCANCELLATION |
User re enabled auto renew before expiry. | Cancel any scheduled revocation. Keep entitlements active. |
EXPIRATION |
Subscription actually ended. | Revoke entitlements now. |
BILLING_ISSUE |
Payment failed. User may be in grace period or on hold. | Flag the account. Do not revoke yet. RevenueCat sends EXPIRATION if recovery fails. |
PRODUCT_CHANGE |
User switched plan (upgrade, downgrade, or cross grade). | Update the product on record. Entitlement state follows entitlement_ids. |
SUBSCRIBER_ALIAS |
Two app user IDs were merged into one identity. | Merge your local records for the aliased IDs. |
TRANSFER |
A transaction moved from one app user ID to another. | Move entitlements from the old ID to the new ID. |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 213 lines · 56 tokens per session scan A 13176b7a32af
webhooks is a skill published in the GitHub repository RevenueCat/play-billing-skills (53 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 56 tokens to every session and 2,189 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to rc-webhooks, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
convex-billing
Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).
cloudbase-wechat-integration
A guide for connecting CloudBase applications to WeChat services, including payments, official accounts, and user identity.
commerce-app-business-config
Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…
baselinker-webhooks
Receive BaseLinker (Base.com) webhooks. Use when building a BaseLinker order or warehouse callback receiver, because BaseLinker is not a normal webhook source: deliveries arrive as HTTP HEAD requests with NO body, the entire payload is in the query string (observed params: orderid, state), there is NO signature…
b2c-custom-job-steps
Create custom job steps for B2C Commerce batch processing. Use this skill whenever the user needs to write a batch job, data export script, scheduled cleanup task, or any server-side processing that runs on a schedule. Also use when they ask about steptypes.json, chunk-oriented vs task-oriented job steps…
tiktok-shop-webhooks
Receive and verify TikTok Shop webhooks. Use when setting up TikTok Shop webhook handlers, debugging Authorization-header signature verification, or handling events like ORDERSTATUSCHANGE, PACKAGEUPDATE, RECIPIENTADDRESSUPDATE, PRODUCTSTATUSCHANGE, or SELLERDEAUTHORIZATION.