Skip to main content

Scenario

Pull subscriptions with status=past_due or status=canceled along with payment failure history. Extract traits — plan type, tenure, failed attempts — and feed into Mavera for personalized retention messaging.

Architecture

Code

Example Output

Error Handling

Stripe limits expansion depth. For nested data like customer.default_payment_method, make a separate stripe.Customer.retrieve() call.
Prompts capped at 8,000 tokens. Batch profiles into groups of 20 or summarize into aggregate statistics.