#brel_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
Hi ๐ no, you have to use the ID of the Price object.
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?
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.
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?