#Kryptman-charge-BT
1 messages ยท Page 1 of 1 (latest)
Sure
const balanceTransaction = await stripe.charges.retrieve(
txn, {
expand: ['payment_intent.source'],
}
);
}```
I know this charge has 100% some tax amount of 690 => ch_3LRdX9A2IeyTC3z31PtKjlV1
but I can't retrieve it
๐ stepping in here for hanzo as they needed to step away.
For tax with Checkout you would find this based on the Checkout Session itself and the total_amount hash: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-total_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yep
and how do I connect my charge with the checkout session object ?
or with the balance transaction? is there any way ?
maybe throught the payment_intent ?
but according to the documentation
I can't retrieve the session from the PaymentIntent https://stripe.com/docs/api/payment_intents/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
or am I doing something wrong ?
I can only think on querying the checkoutsession with
const sessions = await stripe.checkout.sessions.list({
payment_intent: myPaymentIntent,
});
And from there retrieve the information
Yep you would need to go Session --> PaymentIntent here.
Really the recommended route is that you store this in your own database
thank you so much bismarck