Webhooks
Appwind Pay sends every purchase event to your server — in RevenueCat's webhook format, so handlers written for RevenueCat keep working.
Project settings → Webhook to your server: the URL (https), an optional Authorization header, and a signing secret made for you.
Events
| Type | When |
|---|---|
INITIAL_PURCHASE |
First purchase of a subscription (trial or paid) |
RENEWAL |
Renewal; trial converted to paid (is_trial_conversion: true); resubscribe; billing recovered |
CANCELLATION |
Auto-renew turned off (cancel_reason: UNSUBSCRIBE), or a refund (CUSTOMER_SUPPORT, with refund_reason) |
UNCANCELLATION |
Auto-renew turned back on |
NON_RENEWING_PURCHASE |
One-time purchase or consumable |
EXPIRATION |
Access ended (expiration_reason: UNSUBSCRIBE, BILLING_ERROR, PRICE_INCREASE, PRODUCT_DISCONTINUED) |
BILLING_ISSUE |
Payment failed; grace_period_expiration_at_ms when in grace |
PRODUCT_CHANGE |
Plan change, with new_product_id (downgrades wait for the renewal date) |
TRANSFER |
Purchase moved to another user (transferred_from, transferred_to) |
SUBSCRIPTION_PAUSED |
Google Play pause |
SUBSCRIPTION_EXTENDED |
Apple renewal extension, Google deferral |
REFUND_REVERSED |
Apple reversed a refund |
VIRTUAL_CURRENCY_TRANSACTION |
Coins added or spent |
TEST |
“Send test event” |
Fields include app_user_id, original_app_user_id, aliases, product_id, entitlement_ids, period_type, purchased_at_ms, expiration_at_ms, environment (SANDBOX / PRODUCTION), store, transaction_id, original_transaction_id, price (USD), price_in_purchased_currency, currency, country_code, is_family_share, offer_code, subscriber_attributes.
Checking that a call is from Appwind Pay
Every request carries Appwind-Signature: t=<unix time>,v1=<hex>, where v1 is HMAC-SHA256 of "<t>.<raw body>" with your signing secret.
import hmac, hashlib, time
def verify(secret, body: bytes, header: str):
parts = dict(p.split("=", 1) for p in header.split(","))
if abs(time.time() - int(parts["t"])) > 300: return False
want = hmac.new(secret.encode(), f'{parts["t"]}.'.encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(want, parts["v1"])
X-Appwind-Event-Id is stable across retries — use it to ignore duplicates.
Delivery and retries
Answer with any 2xx within 15 seconds. Otherwise Appwind Pay retries after 1, 5, 30 minutes, 2, 6, 12 hours, then daily — about 6 days in all — then marks the event failed and alerts you. Fix your endpoint, then Events & webhooks → Resend failed. Events are sent oldest first; several Appwind Pay servers share the work without sending an event twice.
History-only events (REFUND_DECLINED, OFFER_REDEEMED, PRICE_INCREASE_CONSENT) show in the dashboard but aren't sent, so RevenueCat-style handlers don't see unknown types.