#jfeezy9997-payout-for-pi

1 messages · Page 1 of 1 (latest)

wary valleyBOT
quartz cobalt
#

Hey there @stuck ibex it is possible if you use automatic payouts, but indirect

#

ie, you cannot go directly from a payment intent id to a payout ID

stuck ibex
#

what's the path?

quartz cobalt
#

Pulling that together for you now, bear with me

#

Alrighty. Here goes.
To find the payout, you first need to know when (what day) the expected payout will be, which you figure out looking at the PI's latest_charge.balance_transaction.available_on via expansion:
https://stripe.com/docs/expand
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
https://stripe.com/docs/api/charges/object#charge_object-balance_transaction
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-available_on

#

This gives you a timestamp that is midnight UTC of the day the funds are going to be available, which is the day you'd expect the automatic payout

#

You might get multiple Payouts

#

And you'd be looking to match a balance transaction ID in that result to the one from the charge you originally expanded, and that payout id is the one you're looking for

stuck ibex
#

lol wow, that's so convoluted.

#

ok thanks for the info!

quartz cobalt
#

I agree its... not obvious 😬

#

NP - happy to help