#cory_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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
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
Umm actually, can you share the code you're using to create the Account Session?
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?
Payments = new AccountSessionComponentsPaymentsOptions {
Enabled = true,
Features = new AccountSessionComponentsPaymentsFeaturesOptions {
RefundManagement = true,
DisputeManagement = true,
CapturePayments = true,
DestinationOnBehalfOfChargeManagement = true,
}
},
Yep!
Gotcha. And you're still not seeing the payment details?
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
Okay! In order to get py_xxx ID, what you can do is retrieve the charge or PaymentIntent using the API and expand transfer .. The transfer object should have a property called destination_payment - https://docs.stripe.com/api/transfers/object#transfer_object-destination_payment
That's where you'd find py_xxx Payment ID
OK, I will try!
Any idea if there's a webhook way for me to get that? Would it be in transfer.created?
๐ stepping in as hanzo had to step away
Hi! No problem
You could listen for transfer.created yes to then access the destination_payment from there.
Do you know if it's possible to expand my way to the data with a call to PaymentIntentService.Get( pi_... )?
Yep you expand latest_charge.transfer.destination_payment
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
Yeah -- that's been an oft discussed/requested feature but indeed quite complicated.
Understood, I was quite surprised to see expand as a feature in-general, it's very nice
๐
Ok I'm testing this out!
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
Yep