#brel_api

1 messages ยท Page 1 of 1 (latest)

dense pathBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285224450802978838

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

willow agateBOT
thick python
#

Hi ๐Ÿ‘‹ no, you have to use the ID of the Price object.

lilac pawn
#

Ok I have another question. What is the correct webhook event I should listed to to make sure user has created the subscription and it is paid correctly ?

#

is customer.subscription.created enough?

thick python
#

Kind of depends on your integration. customer.subscription.created is a good start, but you'll want to make sure the status in those is active. If your integration creates incomplete Subscriptions, then you'll also want to listen to customer.subscription.updated to check for the status switching to active.

lilac pawn
#

I am creating subscriptions directly on backend like this:

Stripe::Subscription.create({customer:"cus_QqDJodr2Q6tB8R", items: [{price: "price_1PzbVGARjJ1na9Eli6Dk3U6K"}]})

#

I think it should automatically change user default card

#

customer.subscription.created shous the correct "active" status. But I am thinking what happens if there will be a problem on card and the charge cannot be completed. Shoudl I still listed to customer.subscription.updated still?