#satvik-techie_code

1 messages ยท Page 1 of 1 (latest)

rotund quartzBOT
#

๐Ÿ‘‹ 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/1296791359310794902

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

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.

elfin hull
#

hi there

#

i am creating a payment link using above code , now the issue is stripe creates new customer and new subscription every time i generate payment link, how can i prevent to create new customer & subscription ?

grave flower
#

now the issue is stripe creates new customer and new subscription every time i generate payment link
That should only happen when somebody uses the Payment Link to actually pay and start a susbcription. Simplying creating a Payment Link won't do that

#

Overall, I'm not really sure what the behaviour is you expect

elfin hull
#

let me brief you, i am creating a subscription (montly) now if payment fails, then i am generating a payment link using above code and sending email to customer to complete payment, now when customer complete the payment , i dont want stripe to create a new customer and subscription apart is should use existing customer and subscription

grave flower
#

Yeah that's not really supported in the Payment Link context. You can't use a Payment Link to collect payment for an existing subscription/invoice. Instead you should just email them the hosted_invoice_url URL from the invoice: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url

elfin hull
#

ok, can you send me the api creation link for the same ?

grave flower
#

There is no API creation link. It's a field on the existing invoice that payment failed for

#

How are you currently notified on failing invoice payments? invoice.payment_failed event?

elfin hull
#

okay

#

leti have checked, so when i receive a failed event in my api i will get hosted_invoice_url

#

in object

#

and that link i need to send to customer ?

#

correct ?

grave flower
#

Yep!

elfin hull
#

?

#

it is test data

grave flower
#

Looking

elfin hull
#

okay

#

the failed invoice is of today's date

#

getting
Uncaught (in promise) UnexpectedError: Expired API Key provided: ek_test_YW*********************************************************************_******SHrI. Platform access may have been revoked.

#

there ?

grave flower
#

I am here yes, we're looking it it. Please be patient

elfin hull
#

ohh,

#

no worries

grave flower
#

So it's a Connect scenario. The test invoice was created on acct_1ObN43DrLkxfYeQV by the platform (acct_1Ny8mPKqRsEnJhIg) related to this sub: sub_1QBCEjDrLkxfYeQV0wfkhfjt

However there's no testmode connection between those two accounts โ€“ only live. Which can be problemtic in these scenarios. Can you try and establish a testmode connection between those two accounts use the client_id in testmode (from the platform Dashboard)?

elfin hull
#

okay i will