Monetization
Monetization Subscriptions
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).