#cory_code

1 messages ยท Page 1 of 1 (latest)

quick pythonBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1336072773050699911

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

fresh hinge
#

Hello
I think you should be using the payment object created on the connected account for this which is a Payment (py_xx)

py_ ID should be available under charge if I remember correctly. Let me check

wraith marlin
#

Let me know if there's anything you'd like to paste in, for example the webhook response I'm getting (dev data) so should be safe to post I would think, let me know if I should anonymize anything

fresh hinge
#

Umm actually, can you share the code you're using to create the Account Session?

wraith marlin
#

Yes, no problem.

#

It's says my message is too long, one sec

fresh hinge
#

That's alright, can you check if you're passing destination_on_behalf_of_charge_management parameter?

#

and if so, is it true or false?

wraith marlin
#
Payments = new AccountSessionComponentsPaymentsOptions {
    Enabled = true,
    Features = new AccountSessionComponentsPaymentsFeaturesOptions {
        RefundManagement                      = true,
        DisputeManagement                     = true,
        CapturePayments                       = true,
        DestinationOnBehalfOfChargeManagement = true,
    }
},
#

Yep!

fresh hinge
#

Gotcha. And you're still not seeing the payment details?

wraith marlin
#

Correct

#

I think it's like you said before, I just need to pass in the py_ id but I'm not sure when I am supposed to get it, at least via webhook

fresh hinge
quick pythonBOT
fresh hinge
#

That's where you'd find py_xxx Payment ID

wraith marlin
#

OK, I will try!

#

Any idea if there's a webhook way for me to get that? Would it be in transfer.created?

oak otter
#

๐Ÿ‘‹ stepping in as hanzo had to step away

wraith marlin
#

Hi! No problem

oak otter
#

You could listen for transfer.created yes to then access the destination_payment from there.

wraith marlin
#

Do you know if it's possible to expand my way to the data with a call to PaymentIntentService.Get( pi_... )?

oak otter
#

Yep you expand latest_charge.transfer.destination_payment

wraith marlin
#

Yep! I just got my way there too!

var pmtIntent = svc.Get( pmt.PaymentIntentKey, new() {
            Expand = new() {
                "latest_charge.transfer.destination_payment",
                "latest_charge.payment_method_details.us_bank_account",
                "latest_charge.payment_method_details.card"
            }
        } );
#

That's great!

#

It's a shame we can't put expand opts on our webhook config haha

#

But I get that that's probably a lot of complexity on Stripe's side

oak otter
#

Yeah -- that's been an oft discussed/requested feature but indeed quite complicated.

wraith marlin
#

Understood, I was quite surprised to see expand as a feature in-general, it's very nice

oak otter
#

๐Ÿ™‚

wraith marlin
#

Ok I'm testing this out!

wraith marlin
#

This is working for me, thank you

#

if I only need the id for the destination payment, could I get away with just latest_charge.transfer

oak otter
#

Yep

wraith marlin
#

That's great!

#

This all works for me

#

Thank you very much!