Danzzz
Danzzz

Reputation: 535

Stripe Payouts API, how to get the transactions?

With the Stripe Payout API you can list your payouts, for example to your bank account:

https://stripe.com/docs/api/payouts/retrieve

The returning object don't includes the individual transactions, just the total amount of all transactions and some other data.

I want to find out which transactions a certain payout includes, to mark them as "paid_to_bank" in my database.

What ist the best practice in such a case?

I'm working with PHP.

Upvotes: 1

Views: 1609

Answers (1)

Danzzz
Danzzz

Reputation: 535

I solved this issue, as @karllekko recommended with the balanceTransactions API, but this way:

$a = $stripe->balanceTransactions->all(
    [
        'limit' => 10, 
        'payout' => 'po_xxxxxx'
    ]
);

var_dump($a->data); // contains all transactions in po_xxxxxx

Upvotes: 3

Related Questions