#richie-paymentlinks-customer
1 messages ยท Page 1 of 1 (latest)
Hi ๐
No, Payment Links do not connect to a Customer. You can use them to create a new Customer record using the information the customer provides though
This is what the customer_creation parameter does: https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-customer_creation
That seems like an oversight on stripe's part
I have always created my own customer ids, but now I want to use Payment Links (or find some other easy way to support 3d Secure) and keep using my customer IDs
I can't create new customers every time in my use case ๐ฆ
Payment Links were explicitly designed to not connect to Customers so they could be widely shared and used for generic purchases like linking to an Instagram post
If you have Customer records you should create Checkout Sessions linked to the Customer and share the URL.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Sure thing
I think I can work with this
Stripe Checkout also has a lot of other features that you may find useful.
The problem I'm trying to solve is that for an increasing number of my customers (especially in india, at least from support emails), they can't sign up with 3d secure
Although some can
I am using some old JS stripe thing but it's working great otherwise
So for customer's whose payment/subscription creation fails because of 3DS, I was wanting to link to the Payment Links
I guess I can achieve the same with the Checkout Sessions
But I also just realized I can go in the Dashboard, and manually create a subscription, and then it is emailing them the 3DS link.
Is there a way to trigger that besides Checkout sessions?
That is actually up to the requesting bank AFAIK.
But I would review some of the features of Checkout Sessions here: https://stripe.com/docs/payments/checkout
What is up to them?
How the 3DS authentication is carried out, An email link, a code sent to their mobile device, etc.
Oh, ok. That's not really my question tho. So far when I've done "start subscription" on two of the customers in Dashboard who failed in Dashboard, stripe says "this customer uses 3d secure, we'll send them an email"
So what I mean is, can I trigger stripe programmatically to Create the subscription and send the email for that customer (after detecting that the stripe js failed to do so)
- I would not use Stripe.js to create the Checkout Session. That flow has been deprecated since before I started at Stripe. I would recommend creating the Checkout Session on the server and redirecting your users to it.
Following this guide: https://stripe.com/docs/payments/accept-a-payment
Yea, I gotta update, but right now I don't have time to do a new flow for everyone and test it. I am already using the old way and getting new customers etc.
I just want to build a layer to handle the people being rejected bc of 3ds
I use a couple
I also see the error like this immediately when they fail, so I can do whatever I like at that point on my server, such as generate a Checkout Session, or do something else
```2023-03-24 14:18:31 unable to sign up customer: sabriss2s2s2@gmail.com, error: Payment for this subscription requires additional user action before it can be completed successfully. Payment can be completed using the PaymentIntent associated with subscription.latest_invoice. Additional information is available here: https://stripe.com/docs/billing/subscriptions/overview#requires-action
(Status 402) (Request req_TStSqyri0w01DG) Payment for this subscription requires additional user action before it can be completed successfully. Payment can be completed using the PaymentIntent associated with subscription.latest_invoice. Additional information is available here: https://stripe.com/docs/billing/subscriptions/overview#requires-action
So I'm wondering if there's a way with stripe-php to do what I did today with the Dashboard
Okay, I was also going to suggest you listen for the checkout.session events to stay informed of how that goes.
When you say "what I did today with the Dashboard" what exactly did you do that you want to replicate
I find the customer in Stripe, I see they have no subscription and some failed payment
I click create subscription
Select Monthly or Yearly
Select "Automatically charge a payment method on file" (preselected actually)
Click Start Subscription
The Checkout Session is designed to be a surface to collect the Payment Information. You can do that with the API and the PHP client library
Now stripe popup says "this customer uses 3d secure, we'll send them an email""
I click ok on that, customer got an email, customer completed, subscription started, all good
I just wanna do that automatically without me having to go in teh dashboard
Right, okay
You can do that starting here: https://stripe.com/docs/api/subscriptions/create
Yea, the only thing that sucks about that is, customer has do put in the payment info again, when it's actually already saved in stripe
Right so in that case you create the Subscription directly
via the API.
Specify the collection. method as charge_automatically: https://stripe.com/docs/api/subscriptions/create
Ok, and it looks like it handles the 3ds as well
Perfect I will try that one
Thanks for working with me
Okay. Subscription behavior can be tricky so make sure to use our Test cards and go through a number of test scenarios
Thank you
I guess not tricky, it's just that we have to cover so many use-cases that it's easy to get lost. Here's a good overview: https://stripe.com/docs/billing/subscriptions/overview
One thing that's throwing me off is it's asking to pass in a price
Right, you need to define the recurring price you are going to charge your customers
I was expecting to pass in a plan since I have those defined already
Price/Plan are interchangeable. You can use a Plan since we made the Price API to be backward compatible
Rather than re-creating all those Plans in new Price objects? Yeah that sounds like a pain

Happy to help ๐