#zachucks

1 messages ยท Page 1 of 1 (latest)

pulsar briarBOT
mighty rain
#

Hello ๐Ÿ‘‹
Subscription can change in a way but the ID still stays the same (unless you cancel it and re-create it)

You can use List Subscriptions API and pass customer ID as parameter to retrieve all subscriptions for a customer
https://stripe.com/docs/api/subscriptions/list

pallid gyro
#

is there a way to limit the list subscriptions api response to active subscriptions only?

mighty rain
#

There's a status parameter too

#

along with customer

pallid gyro
#

excellent thank you!

mighty rain
#

๐Ÿ‘

pallid gyro
#

is it possible to get sample data structure for checkout.session.completed post request for the webhook?

mighty rain
pallid gyro
#

i did try this, but the subscription was null in the test event, so i couldn't see what i could grab data wise, and the customer was null as well

mighty rain
#

Ah the fixure only creates a test mode event for "payment" mode.

The other option is to create a test mode checkout session for a subscription and complete it.
It should generate a checkout.session.completed event

pallid gyro
#

is there any documentation on how to do that, or do i just enable test mode on my account and re-create the webhook for test mode?

mighty rain
pallid gyro
#

i just put my account in test mode and made a payment link and did a test subscription that way and was able to get the data i needed. thanks!