Stripe Checkout: setup_future_usage required

More
2 years 11 months ago #143258 by Paul Adams
Replied by Paul Adams on topic Stripe Checkout: setup_future_usage required
Ok, Thanks for the update and hard work. Hope you can figure it out as the changes happen soon and it's my main method of payment.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #143837 by Paul Adams
Replied by Paul Adams on topic Stripe Checkout: setup_future_usage required
Is there an update for this? It's two weeks out from the changes with Stripe.

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 11 months ago - 2 years 11 months ago #143953 by hide10
Hello Tuan,

Will you please take a look at the Stripe's document about setup_future_usage below?
stripe.com/docs/payments/accept-a-paymen...yment-method-details

setup_future_usage parameter will be required effective on May 21st.
And we received the alert message from Stripe again.

Hope the plugin will be updated soon.

Thank you.
Last edit: 2 years 11 months ago by hide10.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #144050 by Paul Adams
Replied by Paul Adams on topic Stripe Checkout: setup_future_usage required
Hi Tuan,

Will the update for the Stripe plugin be out in time? It's only a three days away.

Please let me know. Thanks for your hard work.

Paul

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #144055 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Checkout: setup_future_usage required
Hi Paul

I looked at it and still unsure where it says it is required and what is that data used for

See this documentation stripe.com/docs/api/payment_intents/obje...t-setup_future_usage . Assume that it is needed, what option will you need: on_session or off_session ?

Tuan

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 11 months ago #144056 by hide10
Hi Tuan,

Have you checked the link I mentioned above at #143953?Sample code is written there:$session = \Stripe\Checkout\Session::create([
  'payment_intent_data' => [
Code:
    'setup_future_usage' => 'off_session',
  ],

Thanks.

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #144057 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Checkout: setup_future_usage required
I have no problem with the code. I just don't understand why it is needed and what should be the value passed to that parameter and and how it will affect the payment process...

Tuan

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 11 months ago - 2 years 11 months ago #144058 by hide10
Again, have you read the article I mentioned?
stripe.com/docs/payments/accept-a-paymen...yment-method-details

It says:

By default, payment methods used to make a one-time payment with Checkout aren’t available for future use outside of Checkout. You can instruct Checkout to save payment methods used to make a one-time payment by passing the payment_intent_data.setup_future_usage argument. This is useful if you need to capture a payment method on-file to use for future fees, such as cancellation or no-show fees.

Stripe uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules. For example, if your customer is impacted by Strong Customer Authentication, passing setup_future_usage=off_session ensures that they’re authenticated while processing this payment. You can then collect future off-session payments for this customer using the Payment Intents API.

Card payment methods saved to customers using setup_future_usage are reusable in future Checkout Sessions for existing customers.


The alert email I received from Stripe is unfortunately non-English. 
If you need information more than that, will you please ask Stripe? 

Thanks you for your support.
Last edit: 2 years 11 months ago by hide10. Reason: typo

Please Log in or Create an account to join the conversation.

More
2 years 11 months ago #144064 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Checkout: setup_future_usage required
Yes. I read it but still don't understand why it is needed. So the main question here is do you really need it?

If you really need it, tell me what value you want to use off_session or on_session so that I might modify code and add that for you

So far, it is still unclear to me why it is needed and what should be the right value to use, so I don't want to add it to core package

Tuan

Please Log in or Create an account to join the conversation.

  • hide10
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 11 months ago - 2 years 11 months ago #144065 by hide10
It's just that Stripe says they will make it required from May 21st.

Judging from the description below, I guess I need to use off_session for our recurring subscriptions so that renewal payment can be made automatically without customer's intervention.

Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.
Use off_session if your customer may or may not be present in your checkout flow.


Therefore, I edited the following file.
components/com_osmembership/plugins/os_stripe.php

And added the 'setup_future_usage' => 'off_session', as attached screenshot.
 

If I'm doing anything wrong, please let me know.
Thank you.
Last edit: 2 years 11 months ago by hide10. Reason: typo

Please Log in or Create an account to join the conversation.