#learner-intents

1 messages · Page 1 of 1 (latest)

honest prawn
#

Hi there 👋

#

So a bit of clarification on the beginning. Setup Intents are a way to save payment information without charging it at the same time. When it comes times to charge that payment method then that flow would still use a Payment Intent.

Payment Intents are currently the best and recommended route for charging payment methods.

The client-side piece of the flow is for collecting the user's payment information, and is done this way so that information only hits Stripe servers, which means only Stripe has to be PCI compliant (you don't :D).

#

You can create a payment intent and complete the entire flow server-side as long as you already have the payment method available in Stripe.

broken gale
#

My problem statement: I want user to enter to credit card details for a subscription, charge the customer server side after 15 minutes for the very first subscription payment and then charge automatically when the subscription period expires

#

So a bit of clarification on the beginning. Setup Intents are a way to save payment information without charging it at the same time. When it comes times to charge that payment method then that flow would still use a Payment Intent.
is there a Demo example for same which completes this process? I saw https://github.com/stripe-samples/nextjs-typescript-react-stripe-js donate-with-elements example which I believe uses 1 above

#

@honest prawn if 1 supports ability to charge customer for first time from server side after 15 minutes, and also gives option to charge after subscription period expires, it is good for my use case, else would please suggest which would be the one

honest prawn
#

Will you already have the customer's payment information, or will you need to collect it (for the first payment)?

broken gale
#

Will need to collect first time

honest prawn
broken gale
#

@honest prawn This will charge the customer right away the first time?

#
    //`Elements` instance that was used to create the Payment Element
    elements,
    confirmParams: {
      return_url: 'https://my-site.com/order/123/complete',
    },
  });```?
#

I want to collect the Payment information the first time, but charge them after 15 minutes from server side (strange business requirements)

honest prawn
#

Yup, that confirmation step is what triggers the payment. If you want to delay payment then you can delay calling that confirm function.
https://stripe.com/docs/api/payment_intents/confirm

Is it alright to put a hold for the amount on the payment method and then collect it after 15 minutes? If so you can look at this flow:
https://stripe.com/docs/payments/capture-later

If not, you should be wary that the payment intent may go into a requires_action status when you confirm it if the issuer requires additional authentication. If this happens you'd need to bring your customer back on-session to complete that authentication. This is more applicable to transactions that take place in Europe.

broken gale
#

In my case, all customer all US based where we don't have 3DS as of now. So requires_action is covered

#

Like

  1. Setup Payment Intent
  2. Save Credit Card
  3. Initiate the capture-payment-later flow to block funds from user
  4. Charge the customer after 15 minutes the first time
  5. Use card on file for future payments ?
#

Without Setup Payment Intent flow this is not possible?

honest prawn
broken gale
#

is there a performance benefit between two approaches?

azure hinge
#

no