#db1900

1 messages ยท Page 1 of 1 (latest)

jade sierraBOT
solar wagon
#

Hello

#

When you say "customer" what do you mean exactly here?

amber folio
#

a Customer object's id like cus_1234

solar wagon
#

Like the Customer object associated with the individual transaction?

amber folio
#

yess

solar wagon
#

Yep okay thanks for clarifying

#

Are you familiar with expansion?

amber folio
#

so when we use the source (which is a payout obj) it doesnt have the customer info on it

jade sierraBOT
solar wagon
#

Sorry, let me clarify

amber folio
#

is there a way to expand it using the Stripe CLI?

#

or would i have to curl it to use "expand"?

little spear
amber folio
#

so that source expands the payout which doesnt have the customer obj/data

little spear
#

What objects are you seeing in the source property when you list the Balance Transactions?

amber folio
#

"data": [
{
"id": "txn_1NmnhIKA296nhejwedsVoq0i",
"object": "balance_transaction",
"amount": -9601,
"available_on": 1693958400,
"created": 1693875891,
"currency": "usd",
"description": "STRIPE PAYOUT",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"net": -9601,
"reporting_category": "payout",
"source": {
"id": "po_1NmnhHKA296nhejwfAe99wWa",
"object": "payout",
"amount": 9601,
"arrival_date": 1693872000,
"automatic": true,
"balance_transaction": "txn_1NmnhIKA296nhejwedsVoq0i",
"created": 1693875891,
"currency": "usd",
"description": "STRIPE PAYOUT",
"destination": "ba_1NiJU7KA296nhejwp5trEcy1",
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"livemode": false,
"metadata": {},
"method": "standard",
"original_payout": null,
"reconciliation_status": "completed",
"reversed_by": null,
"source_type": "card",
"statement_descriptor": null,
"status": "paid",
"type": "bank_account"
},
"status": "pending",
"type": "payout"
},

little spear
solar wagon
#

@amber folio you are mixing up the balance transaction for the Payout itself with the balance transactions that make up the Payout.

amber folio
#

hmm i am using the same info you linked. im calling it like this: curl -G https://api.stripe.com/v1/balance_transactions \ -u sk_test_your_key: \ -d limit=3 -d"expand[]"=source

#

i am seeing multiple balance transactions but the others dont have a valid source so they are not expanded

little spear
amber folio
#

aha, that did it

little spear
#

The code above will list all the charges (charge objects ch_xx) included in the payout.
The charges themselves should have a customer (cus_xx) linked

amber folio
#

the type=charge was the secret ingredient ๐Ÿง‘โ€๐Ÿณ