#zam91_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/1268169001473806336
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
What do you mean by 'payment update link'? A URL where the can pay the invoice?
For example, invoices (relating to the subscription) have a URL where they can be paid: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Got it. There's no represenation of those links in the API, no
Damn
Okay, can i workaround it somehow? Can that link always be emailed to the same mail? Then I could build a bot to check that inbox, and strip out the link from the HTML
When the payment fails, for example
Why not just use the field I share that would be in invoice.payment_failed events, where the invoice can be paid and payment details updated?
Hmm. So if the payment of a subscription fails, it generates an invoice. I can then grab that invoice, and the attached link, send that to the customer, and when the customer pays for that invoice, it will apply those same payment details to the subscription?
Testing it now
An invoice is generated at the beginning of each period/cycle and payment is attempted against the invoice not the subscription directly. Yes, I believe paying an invoice that failed payment (just to a decline or whatever) via that URL will update the default PM on the sub meaning all future payments will use that new card
Just grabbed the payment link, looks nice. I'm now trying to "pay" with a test card, and will watch what happens on subscriptions
Okay, so right now it's "overdue"
"Processing..."
drumroll
It's now "active" - however, the payment method still holds the incorrect card ๐ฆ
Advancing to 30 Sep
And now it fails again
So unfortunately, with this method, it will fail every single month, and the customer would have to re-enter their card information every month. I'm afraid that is not very feasble. Do you have any other suggestion?
Can you paste the sub_xxx ID
sub_1PiAgD1FyXrdb8udNgXc1C4d
Everything on the account is on test_mode, we are now live yet, so we can pretty much do whatever
Hmm, that's unfortunate. Seems it didn't update the default_payment_method on the sub
No, it didn't. With your knowledge of Stripe, what do you think is the best solution here?
In short, I just need to have the availability to update the card information on a subscription, without the need to login to stripe. I want the payment update link or something similuar, accessable outside of Stripe. And I'm willing to try "funny" workarounds, as long as we meet the goal.
Yeah you're likely going to have to implement some kind of custom UI, or leverage the customer portal
I really want to avoid the customer portal - no offense
Can stripe automatically shoot an email directly to the client? (outside of my setup)
I believe you can enable an email yep: https://docs.stripe.com/billing/revenue-recovery/customer-emails#failed-payment-notifications
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
I will - thanks