#pritam-sarbajna_api

1 messages · Page 1 of 1 (latest)

celest marshBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1339558270347776010

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

placid iris
#

hi there!

#

how are you accepting payments? Checkout Session, Payment Element, something else?

still basin
#

I have this intent currently

      const paymentIntent = await stripe.paymentIntents.create({
          amount: 1099,
          currency: 'usd',
          setup_future_usage: 'off_session',
          customer: customer.id,
          payment_method_types: ['us_bank_account'],
          payment_method_options: {
            us_bank_account: {
              verification_method: 'microdeposits',
            },
          },
        });
still basin
placid iris
still basin
#

Can't I do two thing at the same time ?

#

Both of these stripe.subscriptions.create and stripe.paymentIntents.create

placid iris
#

you can, but you run the risk of the customer having to go though two 3DS flow in a row.

#

it's much better to do that in a single payment if possible

still basin
#

Actually we want to take an upfront payment of x dollars and a subscription of y dollars. So we are showing a mandate of charging them both of these amount and charging them the upfront one time and scheduling the subscription from the next time. I know I can do subscription schedule but I want to do this together if possible in a same payment intent like this.

placid iris
#

I'm sorry I don't understand. what's your question exactly?

still basin
#

I want to charge

  1. $x amount upfront (one time)
  2. $y amount subscription (recurring)

I’m currently using payment intent with ACH debit to charge a customer one time.
But what I want right now is to add the second (2) functionality too. I can do subscription schedule with billing api I know but can I do both (1) and (2) with the same payment intent somehow.

placid iris
#

you want to do 1 and 2 at the same time? then use the solution I shared above. no need for subscription schedule.

still basin
#

Is it a recommended standard approach what I’m thinking? Or should we change the approach?

placid iris
#

it's very common to chage a one time price and a recurring one at the same time. that's why subscriptions support this.

still basin
#

Cool. thank you for the reference and help.

#

Have a nice day

placid iris
#

happy to help 🙂