简体   繁体   中英

Stripe Payout - How to match statement text on bank account to Payout?

I have a case where I should check the Stripe Payouts API if a new Stripe Payout received at my bank account. The statement text at the bank is in this format:

STRIPE Y1O2A2

or

STRIPE A7O4X2

It is "STRIPE" + a random string.

The Stripe Payouts API result object has a field called "statement_descriptor", but it is empty. I don't know how to assign the the payout received at my bank to a result of the payout API.

Any ideas or suggestions?

Thanks to the advice of @karllekko's command in my question I solved it this way:

    $date_money_arrived_at_bank = strtotime('2020-08-31 02:00:00');
    $amount_arrived_at_bank_in_cents = 2939;

    $x = $stripe->payouts->all(
        [
            'status' => 'paid',
            'arrival_date' => $date_money_arrived_at_bank
        ]
    );

    if($x->date[0]->amount == $amount_arrived_at_bank_in_cents) {

        // this is your payout

    }

I'm am in CET time so I had to set the time UTC+2.

EDIT: This don't work if you have 2 payouts at the same day with the same amount.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM