Customers and identity
App user IDs
- Anonymous:
$anon:…, made by the SDK on first launch. - Identified: your ID, set with
logIn("user_42").
When an anonymous user logs in, their purchases and attributes move to the identified user and the anonymous ID becomes an alias (it keeps resolving). The same customer on another device or platform logs in with the same ID and has the same access.
Restores on another account
A store purchase belongs to one Apple ID / Google account. If it's restored while a different user is logged in, Appwind Pay either moves it to the new user (default, sends TRANSFER) or keeps it on the first user. Choose in Project settings.
Customer info
GET /v1/subscribers/{app_user_id} returns the RevenueCat-shaped subscriber: entitlements (with expires_date, is_active, will_renew, period_type, grace_period_expires_date, billing_issue_detected_at…), subscriptions (including auto_renew_product_id when a plan change is scheduled, price, offer_type), non_subscriptions, virtual_currencies, attributes, management_url.
Attributes
$email, $displayName, $phoneNumber, attribution keys and your own. Set from the SDK or POST /v1/subscribers/{id}/attributes. Used in targeting, webhooks and dashboard search.
Granting access without a purchase
Dashboard (customer → Grant) or REST with a secret key:
POST /v1/subscribers/user_42/entitlements/pro/promotional {"duration": "monthly"} // or {"days": 10}
POST /v1/subscribers/user_42/entitlements/pro/revoke_promotionals
Virtual currency
Consumables can add coins; spend or give them from your server:
POST /v1/subscribers/user_42/virtual_currencies/COIN {"amount": -20, "reason": "unlock_level", "idempotency_key": "order-881"}
Balances never go below zero; the same idempotency key never applies twice.
Deleting a customer
DELETE /v1/subscribers/{id} (secret key) removes the customer with their purchases, transactions, events, coins, aliases and attributes — for account deletion requests (GDPR, Apple 5.1.1(v)).