#_durrell

1 messages ยท Page 1 of 1 (latest)

stray knotBOT
polar rune
#

@ancient cosmos I'm sorry I am really confused about this. Checkout can not be used at all for something like this as far as I know

#

Checkout is here to collect PaymentMethod details for a payment. It is not compatible with Treasury and I don't think you can make it work this way. At least I wouldn't

#

Checkout has an expiry of 24 hours so there isn't really a "come back to it" later but it's really just one page

ancient cosmos
#

Here is my train of thought. If you use chrome you should be able to see the highlighted parts of the docs I'm linking to.

  1. This page shows the Stripe::Treasury::OutboundPayment call I'm trying to make. It says I must first create a PaymentMethod using a SetupIntent.
    https://stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments#:~:text=With destination_payment_method%2C you,is attached to.

  2. This page talks about enabling ACH Direct Debit as a payment method here:
    https://stripe.com/docs/payments/ach-debit/set-up-payment?platform=checkout#enable-ach-direct-debit-as-a-payment-method
    Then at the bottom of the page it says we can collect the PaymentMethod here:
    https://stripe.com/docs/payments/ach-debit/set-up-payment?platform=checkout#use-the-payment-method

  3. The last link above has a "collect" link that goes to this page:
    https://stripe.com/docs/payments/save-and-reuse#retrieve-checkout-session
    This page talks about receiving a checkout.session.completed event where we can get a Session object with a setup_intent id:
    https://stripe.com/docs/payments/save-and-reuse#retrieve-checkout-session:~:text=After you have retrieved the Session object%2C get the value of the setup_intent key%2C which is the ID for the SetupIntent created during the Checkout Session.
    Then we retrieve the SetupIntent with that id and we will see that payment_method ID:
    https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=checkout#retrieve-setup-intent

Will this not even work or is there a better way to do this?

polar rune
#

I'm fairly certain this would never work but I haven't really tried. Really you're supposed to use PaymentElement on your own app/website to collect bank details for that flow

stray knotBOT
ancient cosmos
charred sail
#

Hi there ๐Ÿ‘‹ taking over, as my colleague needs to step away

What have you tried to implement already?

ancient cosmos
#

๐Ÿ‘‹

I haven't tried any of this yet. I suspect I need a Stripe::SetupIntent to use the PaymentMethod off session though

charred sail
#

You can also select "Custom payment flow" to switch off of Checkout.

#

In order to recenter on the problem though: where are you getting stuck? I'd really recommend hacking around with this stuff a bit to get a better idea of how these technologies interact. We tend to be most helpful when you've already created some sort of integraitona that gets you close to your end-goal

ancient cosmos
#

That makes sense.

#

It seems like using the Checkout Session would be a lot faster to build and easier to maintain than the custom payment flow though wouldn't you agree?

#

And they both lead to a Stripe::PaymentMethod that we can use off line correct?

charred sail
ancient cosmos
#

ok. To answer your question, I"m not really stuck, but rather more looking for the best path forward. Your recommendation to use the "custom payment flow" is the sort of direction I was looking for.

#

Thank you

charred sail
#

Sure thing!

ancient cosmos
#

To check my understanding, once we have a SetupIntent that has its usage set to "off_session", then for our flow we don't need to use a PaymentIntent to use the PaymentMethod right? Instead we will use the Stripe::Treasury::OutboundPayment to use the PaymentMethod for our custom flow.

charred sail
#

As far as I can tell, that is correct