Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions content/docs/integrations/webhooks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The `data` field contains detailed information about the subscription or payment
| `ts` | number | Event timestamp (milliseconds) |
| `expirationReason` | string (optional) | Reason for expiration (see [Cancel Reasons](#cancelexpiration-reasons)) |
| `checkoutContext` | object (optional) | Stripe-specific checkout context |
| `userAttributes` | object (optional) | Custom user attributes set via the SDK (see [User Attributes](#user-attributes)) |

**Note on Store field:** iOS and Android apps can receive events from any payment provider. For example, an iOS app can receive `STRIPE` or `PADDLE` events when users purchase through Superwall's App2Web features, which allow web-based checkout flows within mobile apps. The `store` field indicates where the payment was processed, not which platform the app runs on.

Expand Down Expand Up @@ -604,6 +605,26 @@ The `originalTransactionId` is Apple's terminology that acts like a subscription
- Let a subscription fully expire and re-subscribe later
- **Cross-platform consistency**: While originally an Apple concept, we generate and maintain equivalent IDs for all payment providers to ensure consistent subscription tracking

### User Attributes

Any attributes you set using the [User Attributes API](/docs/ios/quickstart/setting-user-properties) are automatically included in your webhook payloads. This lets you correlate webhook events with your own user data.

For example, you could identify which user made a purchase or had a subscription expire.

```json
{
"data": {
// ... other fields ...
"userAttributes": {
"name": "Jane Doe",
"foo": "baz"
}
}
}
```

The attributes included match whatever you've set via `Superwall.shared.setUserAttributes(_:)` (or the equivalent method on Android/Flutter/React Native).

### Notes

- **Currency handling**:
Expand Down