#pbj-subscription-listcanceled

1 messages · Page 1 of 1 (latest)

tough karmaBOT
chilly saddle
#

You would need to know on your end somehow that they are the same Customer. Maybe by checking for signals from their billing address, email, name, etc.

main lake
#

@chilly saddle what would that provide me? We do currently store the stripe customer_id value.

#

So we can look that up but I noticed that if a user cancels a subscription the subscription array is just empty and status is not active

chilly saddle
#

I'm not sure I understand the problem you're solving for. Are you just trying to stop people from creating duplicate subscriptions? Are you trying to recall previous customers who have cancelled their subscriptions? What are you actually trying to build?

main lake
#

Fair question!

We have an application system that once approved you're prompted to pay for your subscription in the admin.

So we want to see if its a "new user" so we can change out the messaging between new users and returning users who may have cancelled in the past.

EX:

New User:
To get started, add your credit card information.

Existing User (already cancelled)
Reactive your subscription

chilly saddle
#

Ahhh, okay. Do you have that application hooked up to a database? I would assume so, since you mentioned sending them to an admin page

main lake
#

yes we do!

#

our database stores a bunch of app relevant info and then we store the customer_id value from Stripe so far and thats it.

chilly saddle
#

I would cache more information in your database that relates to Stripe then, because (as you've already realized) the Customer object on Stripe does not contain past canceled subscriptions, so you would essentially need to track if they've had a previous subscription that got cancelled.

One alternative would be to set metadata on the Customer object when a Subscription is canceled that basically says has_had_canceled_subscription: True whenever a Customer cancels a Subscription. That way you can look at the Customer object to find out if they've ever had a canceled subscription: https://stripe.com/docs/api/customers/update#update_customer-metadata

faint wren
#

pbj-subscription-listcanceled

main lake
#

@faint wren @chilly saddle thank you both for this! thank you!