#diipak-bt
1 messages · Page 1 of 1 (latest)
hi! depends what the BT relates to. Basically you'd look at the object that the soure field links to. That object might be e.g a Charge object, which has a customer field for the ID of the Stripe Customer the Charge was for.
Yes, but how I will get the cust ID if there is any?
Can I get that by fetching balance_transaction api only?
I am just getting following fields only.
{
"id": "txn_3Ldo9UFEKqyniFlO0ajYfoOX",
"object": "balance_transaction",
"amount": 100,
"available_on": 1662595200,
"created": 1662180017,
"currency": "usd",
"description": "I Love Every Dog | Dog Lovers Phone Backgrounds",
"exchange_rate": null,
"fee": 33,
"fee_details": [
{
"amount": 33,
"application": null,
"currency": "usd",
"description": "Stripe processing fees",
"type": "stripe_fee"
}
],
"net": 67,
"reporting_category": "charge",
"source": "ch_3Ldo9UFEKqyniFlO04Q1tEBi",
"status": "available",
"type": "charge"
}
I think I explained that?
"source": "ch_3Ldo9UFEKqyniFlO04Q1tEBi",
"type": "charge"
so you would use https://stripe.com/docs/api/charges/retrieve to get that charge.
then that response has a customer ID : https://stripe.com/docs/api/charges/object#charge_object-customer
you can use the expand feature for example : https://stripe.com/docs/expand