#ebellotpu6_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ebellotpu6_api, 3 hours ago, 16 messages
- ebellotpu6_code, 5 days ago, 23 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257295585804025866
đ Have more to share? Add details, code, screenshots, videos, etc. below.
I want to know how to retry a payment for a subscription using the stripe api
Stripe will retry the payments automatically, you can configure it in the settings: https://dashboard.stripe.com/settings/billing/automatic
but for example, imagine I have a customer that is trying to rent a storageroom on my website. He fill the paymentElement with a valid paymentMethod but then when the API tries to create the subscription, something wrongs happens and the subscription reminds in incomplete status. We notify to the customer that the subscription coudn't be collected successfully and he retries the payment. Our API detect that a subscription already exists for this customer and this product, so we don't want to create a new subscrition, instead, we want to modify the subscription if its necessary, and then try the payment again.
?
If it's a card payment, it will fail immediately so the customer will know. If it's a async payment method type, e.g. bank_transfer, the you will get an invoice.payment_failed webhook event, and then you can send a link to the Invoice.hosted_invoice_url: https://docs.stripe.com/api/invoices/send
yes
but, if it's a card payment for example, how can I retry the payment of the invoice without create a new one? From the API, without using the link
If you have a saved card PaymentMethod you can try to confirm the Invoice.payment_intent with this PaymentMethod pm_xxx: https://docs.stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method
Or better, pay an Invoice directly with the PM: https://docs.stripe.com/api/invoices/pay#pay_invoice-payment_method
okey, I will try it