#Gyan-ACH
1 messages · Page 1 of 1 (latest)
Hi there, you can specify a payment_method (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method) when creating a PaymentIntent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Gyan-ACH
okay and once payment intent is created with the payment_method, what should be the next step in order to charge the bank account?
Stripe will take it from here, and you can get notified of the payment result by listening to the payment_intent.succeeded or payment_intent.payment_failed events
oh.. so just creating the payment intent will create the charge on that payment method?
Oh I forget to mention that you also need to set confirm=true, otherwise you need to make a separate PaymentIntent confirmation API to confirm the PaymentIntent
ok.. let me try creating payment intent with confirm=true
and see if it charges the bank account
I am getting this error
{
"error": {
"message": "The PaymentMethod provided (us_bank_account) is not allowed for this PaymentIntent. Please attach a PaymentMethod of one of the following types: card. Alternatively, update the allowed payment_method_types for this PaymentIntent to include "us_bank_account".",
"type": "invalid_request_error"
}
}