#standby2852
1 messages · Page 1 of 1 (latest)
Hi there 👋 our guides have samples for most or all of the libraries we offer. I would recommend starting here to get a feel for how our Subscriptions work in general:
https://stripe.com/docs/billing/subscriptions/overview
Then take a look at our sample integration for Subscriptions:
https://stripe.com/docs/billing/quickstart
A couple important things to note, these guides are useful if you're just using the Laravel PHP framework. If you're also leveraging Laravel Cashier, you will likely want to check the Laravel documentation as that is their prebuilt Stripe integration.
It's also worth noting that while having the first payment go through 3DS/SCA typically means subsequent payments won't need to, it's ultimately up to the issuer of the card being used to decide if 3DS has to be completed. So your flow should still be prepared for the possibility that a customer will need to complete a challenge for an existing Subscription.
Thank for your help.
$paymentMethod = $stripe->paymentMethods->create([
'type' => 'card',
'card' => [
'token' => $request->stripeToken,
],
]);
$paymentMethod = $stripe->paymentMethods->attach(
$paymentMethod->id,
['customer' => $customer->id]
);
$subscription = $stripe->subscriptions->create([
'customer' => $customer->id,
'items' => $items,
'off_session' => false,
'payment_behavior' => 'allow_incomplete',
'payment_settings' => [
'save_default_payment_method' => 'on_subscription'
],
'default_payment_method' => $paymentMethod->id,
'expand' => ['latest_invoice.payment_intent'],
"description" => $request->dedicate_this_donation ? "Double-Time Donate - " . $request->dedicate_this_donation : "Double-Time Donate",
]);
$paymentIntent = $stripe->paymentIntents->retrieve($subscription->latest_invoice->payment_intent->id);
if($paymentIntent->status === 'requires_action'){
$paymentIntent->confirm([
'return_url' => route('stripe.threeDS'),
]);
}
return json_encode($paymentIntent);
I have created the subscription using this code.
And then on front end, I have confirmed with 3DS/SCA, After that first payment is paid.
After 1 days, a new invoice is created and then the payment intent of this invoice requires "requires_action".
But user confirmed this payment with 3DS/SCA. So I think it is good to no need to require 3DS/SCA.
I think this invoice should be paid automatically without 3DS/SCA.
How can I do this?
Please reply to me ASAP.
Thanks.
@grave meadow
Busy now?
This is a server where we are working with multiple users at once. Please be patient, we cannot give immediate responses during busy server hours.
What is the value for stripe.threeDS in your code? Is that a URL where the Customer can go authenticate via 3DS? Or is it an internal URl that just goes to your own webpage?
Hi, @solar oxide
But I am waiting for your response....
It is ok
It is good for me to find the solution.
It is own my webpage url.
Okay, and where is your business geographically? Like, what country?
United kingdom
Okay, so you can't bypass 3DS in the UK. You have to build 3DS authentication into your payment flow, which means you'll need to move to one of Stripe's 3DS solutions.
I would recommend the Payment Element: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
Of course. User confirmed the first pay of subscription with 3DS/SCA.
I mean future invoices, not first invoices.
So should the user always confirm pay with 3DS/SCA each time of subscription?
So are you trying to make it so that they only have to authenticate once at the first payment? Or do you want them to authenticate each time they make a payment?
only authenticate once at the first payment. not authenticate after that.
Hi, stepping in and catching up. Please give me some time
Ok. Thanks for your help.
Stripe Billing handles this for you. When you create the initial payment and if the customer goes through SCA, we will ask for an exemption on the next payments for SCA. However, it is possible that the issuing banks ask for SCA anyways. In this case, you'd need to bring your customer back on session to complete 3DS.
I mean, if the issuing bank does not ask for an SCA on the next invoice, it should work.