Docs
RevenueCat integration
What it is
RevenueCat purchase events can grant Meterly packages and usage units through provider mappings.
When to use it
Use this when RevenueCat verifies purchases and Meterly manages the customer's usage-unit balances and runtime authorization.
How to use it
Setup and event policy
Step 1
Create the integration
Add one RevenueCat provider integration in Meterly and configure the shared Authorization value.
Step 2
Copy the webhook endpoint
Paste the Meterly RevenueCat endpoint into RevenueCat: https://api.getmeterly.dev/api/v1/tenants/<tenant_id>/webhooks/revenuecat.
Step 3
Map provider identifiers
Map RevenueCat product_id or entitlement IDs to Meterly packages.
Step 4
Receive lifecycle events
RevenueCat sends purchase, refund, cancellation, and lifecycle events to Meterly.
Step 5
Grant and adjust safely
Meterly grants mapped packages, deducts available usage units for refund cancellations, and never creates negative balances.
Subscription grant
One-time grant
Refund
Refund reversed
Mapping priority is product_id, then entitlement_ids, then legacy entitlement_id. INITIAL_PURCHASE, RENEWAL, and NON_RENEWING_PURCHASE grant mapped packages. Subscription products usually map to packages that expire at RevenueCat period end. One-time purchases usually map to packages with no expiration. Refund CANCELLATION events deduct available granted usage units down to zero. Non-refund CANCELLATION and EXPIRATION events are ignored with no usage-unit change. The EXPIRATION event itself does not remove usage units; the grant bucket controls expiry. REFUND_REVERSED restores only the amount Meterly previously deducted for that refund. PRODUCT_CHANGE, BILLING_ISSUE, TEST, and unsupported events are ignored safely and do not create grants.