Overview
Accessing a customer’s purchase history lets you tailor onboarding, upsell paths, and support flows. Flowglad provides past purchases and current subscriptions for easy consumption.How to use
- Fetch all customer’s subscriptions: Use the
subscriptionsfield fromuseBillingon client side or accesssubscriptionsfrom thegetBilling()result on server. Refer to the subscriptions response object for the data fields returned. - Fetch customer’s current active subscriptions: Use the
currentSubscriptionsfield fromuseBillingon client side or accesscurrentSubscriptionsfrom thegetBilling()result on server. Refer to the currentSubscriptions response object for the data fields returned. These subscription statuses are considered current:active,trialing,past_due,unpaid,credit_trial,cancellation_scheduled. - Fetch all customer’s purchases (subscription, single payment, or usage price type): Use the
purchasesfield fromuseBillingon client side or accesspurchasesfrom thegetBilling()result on server. Refer to the purchases response object for the data fields returned.