#teevee_code

1 messages ¡ Page 1 of 1 (latest)

wheat archBOT
chilly trellisBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

wheat archBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257918234280071201

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

chilly trellisBOT
late torrent
#

After the microdeposit you would be able to use the payment_method like the last step mentioned

north thunder
#

yes

#

but I have the user go through checkout on setup mode and they save/verify their bank account info first. Then on a payments page I display their bank info to them. They enter the amount they want to load their account with and when they hit payment button I want to create a payment intent with their verified saved bank account linked to their customer for an ach direct debit payment

#

I conceptually understand what I am trying to do but I need a code example of what the proper syntax should be. This is my best attempt:

const { amount, customerStripeId, paymentMethodId } = req.body;

// Create PaymentIntent with ACH direct debit
const paymentIntent = await stripe.paymentIntents.create({
  payment_method_types: ['us_bank_account'],
  amount: amount * 100, // Amount in cents
  currency: 'usd',
  customer: customerStripeId,
  payment_method: paymentMethodId, 
  confirm: true, 
  setup_future_usage: 'on_session', 
});
late torrent
#

I think you should remove setup_future_usage. Also is paymentMethodId the one coming from the confirmed SetupIntent?

north thunder
#

Yes it is the paymentMethod Id assigned to the verified bank account that was done through checkout in setup mode.

late torrent
#

Yeah then without the setup_future_usage it looks similar to the code example in the Doc link I shared above