#eze-sub-product

1 messages ยท Page 1 of 1 (latest)

obsidian wolf
#

๐Ÿ‘‹ do you have any examples I can take a look at?
Also, are you using Stripe Checkout to create subscriptions or are you using the API?

magic topaz
#

Im using the API.

#

{
id: 'txn_1LQDWGRRNGyVGJzsWIsqpUhH',
object: 'balance_transaction',
amount: 60000,
available_on: 1659484800,
created: 1658940936,
currency: 'usd',
description: null,
exchange_rate: null,
fee: 0,
fee_details: [],
net: 60000,
reporting_category: 'charge',
source: 'py_1LQDWGRRNGyVGJzsg2x3AB6g',
status: 'pending',
type: 'payment'
}

#

from this txn, I need to know the product originated this movement

obsidian wolf
#

how are you getting to balance transaction?
Can you explain a little bit more about the flow you're integrating?

magic topaz
#

const balanceTransactions = await stripe.balanceTransactions.list(
{
payout: payoutId
},
{
stripeAccount: accId,
},
);

#

from the payout.paid hook

obsidian wolf
#

Gotcha.

#

py_ object represents a charge

magic topaz
#

ok, and can I will go to the product?

obsidian wolf
#

just curious, what's your uscase here?

magic topaz
#

yes, but I need the subscription id or product asociated. A customer can have a lot subscriptions

#

in my App the users can create groups and another users can subscribe it.

obsidian wolf
magic topaz
#

I receive the payouts hooks and I need know from what group cames

obsidian wolf
magic topaz
#

that is a good option

#

I'll try to implement on this way

obsidian wolf
#

NP! ๐Ÿ™‚ Good luck

magic topaz
#

I need expand the txn to get the charges, true?

#

const balanceTransactions = await stripe.balanceTransactions.list(
{
payout: payoutId,
type: 'payment',
expand: ['data.source.source_transfer.source_transaction'],
},
{
stripeAccount: accId,
},
);