Search code examples
stripe-payments

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.


Solution

  • 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"