meds
meds

Reputation: 22956

Is there a way to determine if a payment intent's charge has been successfully transferred into your stripe account?

I'm adding a payout to connected partner accounts through stripe, while I can easily get if they have a payment intent and check if it has succeeded I can't determine if that succeeded payment intent is in the stripe account for payout yet.

I tried using stripe.balance.retrieve(); but this doesn't tell me which payment intents have succeeded and transferred into the stripe account balance for payout.

Upvotes: 0

Views: 536

Answers (2)

yuting
yuting

Reputation: 1694

This is possible by looking at Balance Transaction status of a Charge. If the status is available, it means the fund is ready in account balance for payout.

To retrieve the Balance Transaction status of a Charge, you can expand the latest_charge.balance_transaction field using Payment Intent Retrieval API. For example,

curl https://api.stripe.com/v1/payment_intents/pi_xxx \
  -u sk_test_xxx: \
  -d "expand[]"="latest_charge.balance_transaction"

Upvotes: 1

Quintoche
Quintoche

Reputation: 50

Basically, you can't.

After all, you can with some alternatives ways.

If you put in payment intents metadata the date where payments will be available (the date depend of Stripe configuration, 7 or 3 days), you'll be able to know which payments is in your Stripe balance.

Thanks to metadata, you can edit them manually or with an API call when creating payment intent.

Upvotes: -2

Related Questions