#ishu22g-future-payments

1 messages · Page 1 of 1 (latest)

wintry charmBOT
nimble veldt
#

I am using this to create gather card (Step 2)

stripe.paymentIntents.create({
customer: customer
.id,
setup_future_usage: 'off_session',
amount: 100,
currency: 'usd',
// In the latest version of the API, specifying the automatic_payment_methods parameter is optional because Stripe enables its functionality by default.
automatic_payment_methods: {
enabled: true,
},
payment_method_types: ['card'],
statement_descriptor: 'Custom descriptor',
});

#

I am using this to create charges (Step 3)

stripe.paymentIntents.create({
amount: 1099,
currency: 'usd',
// In the latest version of the API, specifying the automatic_payment_methods parameter is optional because Stripe enables its functionality by default.
automatic_payment_methods: { enabled: true },
customer: customerId,
payment_method: paymentMethods.data[0].id,
return_url: 'https://example.com/order/123/complete',
off_session: true,
confirm: true,
});

exotic dock
#
  1. It will be stored indefinitely.
  2. You can
  3. You're a bit confused. A payment intent represents a charge. You don't charge a payment intent multiple times. You create a new payment intent for each charge
nimble veldt
#

Okay. So just to be clear maybe I am not using the correct terminologies. Let me rephrase. I am doing the following:

  1. Create Stripe customer for user
  2. Gather user credit card data using payment intent as a payment method
  3. Create offline payment intents on the payment method collected by stripe by using the same payment method which I collected earlier
#

So now me rephrased questions are:

My questions are:

  1. Will the card (payment method) be stored till its expiry or will user have to input card details again after sometime?

  2. If the user select a different plan later on down the line, would I be able to create new payment intents with varying amounts on the same payment method without any problems?

  3. How many times will I be able to create payment intents on the collected payment method?

#

I hope it makes sense now

exotic dock
#
  1. It will be stored indefinitely
  2. You can
  3. Infinite amounts
nimble veldt
#

Perfect! Thank you. Just wanted to double check

#

I guess I am ready to push to prod 🙂

exotic dock
nimble veldt
#

Yes, I am doing that using this:

stripe.paymentIntents.create({
customer: customer
.id,
setup_future_usage: 'off_session',
amount: 100,
currency: 'usd',
// In the latest version of the API, specifying the automatic_payment_methods parameter is optional because Stripe enables its functionality by default.
automatic_payment_methods: {
enabled: true,
},
payment_method_types: ['card'],
statement_descriptor: 'Custom descriptor',
});

exotic dock
#

Cool

nimble veldt
#

The only problem is this, that it requires me to enter $1 minimum. I wish there was a way to not charge the customer when we are just intiating a payment intent just to collect their payment method

exotic dock
#

You can. You need to use setupintent instead

nimble veldt
#

Okay. Wow! I didn't know that. I will try this out.

#

Also, is there a way of knowing if same card (payment method) is being used by any other customer?

#

The reason is that I want to determine the uniqueness of users based on their payment card

exotic dock
#

You should control this in your integration. Have unique stripe customer id's per customer

nimble veldt
#

Yes, I am doing that.

#

I am trying to address the issue where user creates multiple accounts for discounts

#

So one way I can determine their uniqueness is by payment method

#

But I didn't find any solution for it in Stripe documentation so far

exotic dock
#

You can use fingerprint

wintry charmBOT
#

ishu22g-future-payments

nimble veldt
#

Okay. Thank you. I will look into this as well

#

Thanks for all the help