#jose cerrejon-balance-transactions

1 messages · Page 1 of 1 (latest)

thin crag
solid perch
#

I don't understand... For example, I have po_1LDI63RbOMwHsfy7Vn8vWdnz with 7 payments (in the Dashboard, I can see in a section called Transactions. I need all those payments included in a Payout

thin crag
#

Sorry, maybe I misunderstand, are you trying to retrieve a list of all payments that are included in a Payout? Or are you trying to trigger a Payout and control what payments are included in it?

solid perch
#

the first one

thin crag
#

Okay, and you're using automatic payouts?

solid perch
#

yes, set to daily

thin crag
#

Alright, so then you pass the ID of the Payout that you want to retrieve the related transactions for and pass that into the payout field of the first function that I linked.

solid perch
#

so for example, using the cli: stripe payouts retrieve po_1LDI63RbOMwHsfy7Vn8vWdnz --stripe-account acct_1L5Po0RbOMwHsfy7

send me:

{
    "id": "po_1LDI63RbOMwHsfy7Vn8vWdnz",
    "object": "payout",
    "amount": 1100,
    "arrival_date": 1655856000,
    "automatic": true,
    "balance_transaction": "txn_1LDI64RbOMwHsfy7qx3CJ3o0",
    "created": 1655860267,
    "currency": "eur",
    "description": "STRIPE PAYOUT",
    "destination": "ba_1L5WnmRbOMwHsfy7Hqm25gQ2",
    "failure_balance_transaction": null,
    "failure_code": null,
    "failure_message": null,
    "livemode": false,
    "metadata": {},
    "method": "standard",
    "original_payout": null,
    "reversed_by": null,
    "source_type": "card",
    "statement_descriptor": "HAMAEL PAY",
    "status": "paid",
    "type": "bank_account"
}
#

I can't see the 7 payments, only the txn_xxx

thin crag
#

That's the function to retrieve a single payout, not the one to list balance transactions that I linked to previously.

solid perch
#

so that txn_ is the ID you mention, right?

thin crag
#

The ID of a Balance Transaction has the txn_ prefix, but I think what you're looking for is in the source field on those objects.

solid perch
#

So What's the ID you mention: po_ or txn_?

#

`stripe balance_transactions retrieve txn_1LDI64RbOMwHsfy7qx3CJ3o0 --stripe-account acct_1L5Po0RbOMwHsfy7``

{
    "id": "txn_1LDI64RbOMwHsfy7qx3CJ3o0",
    "object": "balance_transaction",
    "amount": -1100,
    "available_on": 1656288000,
    "created": 1655860267,
    "currency": "eur",
    "description": "STRIPE PAYOUT",
    "exchange_rate": null,
    "fee": 0,
    "fee_details": [],
    "net": -1100,
    "reporting_category": "payout",
    "source": "po_1LDI63RbOMwHsfy7Vn8vWdnz",
    "status": "pending",
    "type": "payout"
  }
#

the source po here is the same that the command stripe payouts retrieve send me

thin crag
#

Did you try listing balance transactions using the payout ID as a filter? Command would look something like:
stripe balance_transactions list --payout=po_1LDI63RbOMwHsfy7Vn8vWdnz

solid perch
#

that's it!! You are awesome!!

#

thank you, Toby. Send you a gift next Christmas