Monetization
Monetization Subscriptions
Beta Feature
The monetization feature is currently in beta and is subject to change. There may be bugs and issues that are not yet resolved. Use with caution and please report any issues to support.
You can programmatically access details of your users subscription when using Zuplo monetization. Here's an example inbound policy that logs the subscription details.
This would log the following structure
If no subscription is available, getSubscription
will return undefined
.
Note how you can see details about the subscriber (e-mail and JWT 'sub' from the dev-portal sign-in) and the current consumption level of the meters specified on their plan.
This information is only available in the pipeline after the
MonetizationInboundPolicy
has executed (this loads the subscription data).