#GiovanniV-treasury-outboundpayment
1 messages · Page 1 of 1 (latest)
yes it does. question does the bank account needs to be validated in order to be shown?
I don't believe so - but can you share a Customer ID so I can check?
cus_M86ivDtOp4sY46
That customer doesn't have any attached Payment Methods that I see
the outbound payment creation does work, but when I go back to list the payment methods I don't see the payment method that was created, which is just surprising. I was hoping we'd have a list to reflect back on to send future ACH/wires.
Can you show me the request that's creating the Payment Method that you expect to be attached?
customer = Stripe::Customer.create(
{description: @payee.description},
{stripe_account: current_user.connected_account_id},
)
result = Stripe::SetupIntent.create(
{
customer: customer.id,
flow_directions: ['outbound'],
payment_method_types: ['us_bank_account'],
payment_method_data: {
type: 'us_bank_account',
us_bank_account: {
routing_number: @payee.routing_number,
account_number: @payee.account_number,
account_holder_type: @payee.account_holder_type,
},
billing_details: {name: @payee.billing_details_name},
},
},
{stripe_account: current_user.connected_account_id}
)
puts result
@payment_method_id = result.payment_method
payment_result = Stripe::Treasury::OutboundPayment.create({
financial_account: 'fa_****************', # TODO contextualize this
amount: 100,
currency: 'usd',
customer: customer.id,
destination_payment_method: @payment_method_id,
description: 'OutboundPayment to a 3rd party',
}, {stripe_account: current_user.connected_account_id})
puts payment_result
What is the status of the Setup Intent after created it?
requires_confirmation
that's your problem! Which doc are you following?
you're going too fast
you are missing the confirm: true parameter when you create the SetupIntent. Until you confirm, there's no attached PaymentMethod you can use
if you look at https://stripe.com/docs/treasury/examples/moving-money#adding-an-external-bank-account for example we pass confirm: true as expected
but you'll need to do micro-deposits verification(s) too in that case
that makes sense
I also am quite confused overall about your code and why you create a Customer
That's not the canonical flow and that's not what the docs you shared do as far as I can tell
Are you trying to pay out to that person's bank account or to someone else's? Treasury has many different fund flows and being crisp about what you are trying to do exactly is important here
GiovanniV-treasury-outboundpayment
absolutely I'm trying to build the proper flow right now testing different methods. I think I got it from here ,now that I understand the confirmation confirm: true needs to be required regardless of what the steps we will will follow it will be fine thank you very much
gotcha, we're happy to help you further if you can outline which exact flow of funds you're after
I appreciate it have a great day
Is there anyway to get all payment methods without filtering by customer?
I basically want to get a list of all the places we can wire/ACH to.
I believe you can list all, as with many other Stripe objects: https://stripe.com/docs/api/treasury/financial_accounts/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Does that get you oriented in the right direction?
yes thanks
1 more question can I get a list of all payment methods of type us_bank_account for a given connected account without regard to the customer.?
I'm not sure I understand. Do you want the payment methods associated with end-customers? Or financial accounts associated with connected accounts? Like, which object do you want from the connected account?
is like a report list giving me the list of all payments methods type X for a connected account without regard to the customer Id so a list of all
so a way to extract a list of all available payment methods type anything that I'm looking for from one of a connected account this is a report that I need on a platform level
with the above giving solution you send me I can find any payment method but I need to state a customer ID in order to look at the payment method for that customer
we just need a list with all payment methods related to a particular connected account on a list
its coming back empty if I leave our customer field blank
Ah! Okay. I think you can pass in the Stripe account header to make the retrieve request on behalf of the connected account, using its account ID. That may give back all the financial accounts related to the connected account. Have you tried that?
no let me try
I get a empty list
Despite that connected account having a payment method
I see. This product is still fairly new, so I don't have a good way to test this and our docs don't seem to indicate that it's possible to delineate financial accounts by connect account, so I assume that it isn't possible via a simple list all API call
Apologies if that was a red herring, but it was the best resolution I could come up with