#jzills-ach
1 messages · Page 1 of 1 (latest)
Hello! Yes, you can specify the Payment Method ID when you create the charge and pass confirm: true to attempt payment. Using "on" or "off" for setupFutureUse is up to you - if you anticipate that you'll want to charge your users in the future in an off-session flow you'll want to use "off"
Can you elaborate what exactly the difference is between the off and on session flows?
Ah, looks like in the .NET sdk I have a PaymentIntent.Confirm action. Is that the flow then? I create the paymentIntent, then when the customer is checking out, chooses an existing paymentMethod, then I must confirm the paymentIntent attaching that paymentMethod?
On session means that your customer is interacting with your site - (example: they have logged in to your site and physically press a button to continue payment). With off session you are attempting payment without any user interaction (like if you wanted to charge them automatically at the first of the month for a subscription)
Got it that makes sense.
Regarding this?
It depends on your flow - if you first want to generate the Payment Intent and then confirm it at a later point then yes, you can PaymentIntent.confirm to confirm it after creation with the saved Payment Method of their choice.
If you want to immediately confirm/charge the Payment Intent after creating it you can pass in confirm: true to confirm it during creation (saving you a request)
Ok what happens once the paymentIntent is confirmed? That is when the payment is initiated to be collected?
Yes, when the payment intent is confirmed thats when we attempt payment
Perfect thanks a lot for all your help!
Hi Karbi - I have a follow up question. I'm using plaid to connect and create stripe bank accounts, I'm using the Platypus test bank account but I'm attaching metadata to it but it is not being persisted. Is the metadata not allowed to be manipulated on the test bank account?
Hi @true basin I'm taking over, give me a sec to catch up.
No problem thanks
Which object did you attach the metadata to? can you send me the request ID?
Yes one second let me run it again.
req_gkFBileiJvXfVD
When I fetch it in the CLI the metadata is null even though the request response has the correct metadata coming back to me.
OK, so you have attached some metadata to the bank_account object, what CLI command do you use?
stripe payment_methods list --customer= --type=us_bank_account
do you need the customer id?
can you send me the response that you get from this CLI?
yes one second...talking to you on one computer and working on the other
{
"object": "list",
"data": [
{
"id": "ba_1KtiWlGlQRIgvmTkauTu8MzR",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"created": 1651195307,
"customer": "cus_Lau8Z3Zs9n5a3n",
"livemode": false,
"metadata": null,
"type": "us_bank_account",
"us_bank_account": {
"account_holder_type": "individual",
"account_type": "checking",
"bank_name": "STRIPE TEST BANK",
"fingerprint": "vcbwMamhp7mr0BYB",
"last4": "6789",
"routing_number": "110000000"
}
}
],
"has_more": false,
"url": "/v1/payment_methods"
}
Sorry formatting is terrible
can you try stripe sources retrieve ?
what are the args?
stripe sources retrieve ba_1KtiWlGlQRIgvmTkauTu8MzR
No such source
Sorry you should use stripe payment_sources list cus_ID --object=bank_account
here is the doc https://stripe.com/docs/api/customer_bank_accounts/list?lang=cli
Ok I see the metadata now...why is the metadata not attached to the paymentMethod since that's the call I'm using in the .NET SDK?
Sorry I'm using BankAccount.Create
For BankAccounts the metadata is on the PaymentSource not the PaymentMethod?
You are setting it to the bank_account object, not directly on the payment_method object.
So when I create a BankAccount object do I need to associate it with a PaymentMethod? Or does that happen automatically?
Because when I call the cli for payment_methods list it is returned and I didn't create a paymentMethod only a BankAccount.
It might be easier if I tell you what I'm trying to accomplish...
I have a Customer, I create BankAccounts on the Customer through Plaid and I create Card PaymentMethods through setupFutureUsage during checkout. I have metadata that I need to store that relates to our internal users.
For instance, their UserId...so I persist it in the PaymentMethod for cards which returns the correct metadata field in the PaymentMethod object but with BankAccounts the metadata is not returned from the PaymentMethod Get API.
Long story short I want to get all the payment methods with a particular UserId stored in the paymentMethod metadata where my paymentMethods can be either BankAccount created through Plaid or a Card created as a PaymentMethod in Stripe directly.
Is there a centralized API to get all PaymentMethods on a Customer including the Metadata? Or am I missing a piece in the flow during creating the BankAccount?
Seems like I have to fetch all PaymentMethods, if any of them are "us_bank_account" then I also additionally have to fetch the PaymentSource to get that metadata?
I see, you are currently using the old source API to attach the bank_account to customer because the PaymentMethod API didn't support ACH previously.
We have recently release ACH support in PaymentMethod API (aka us_bank_account) and now you can use new PaymentMethod API to attach the ACH payment method to customer.
Well I'm using Plaid and I get a BankAccount Token from the connector to create a Stripe BankAccount...I'm using the calls from the .NET sdk....what should I be using then instead?
I'm using BankAccountService.Create
Is the sdk not up to date? Should I be making these calls manually?
Yup we have updated the SDK together with the GA of us_bank_account payment method.
Ah ok so I need to update the nuget then?
Yes, the us_bank_account support is added since 39.100.0 https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#391000---2022-03-25
Perfect thanks!