#Fonseca
1 messages · Page 1 of 1 (latest)
But the charge exists
db.session.commit()
transfer = stripe.Transfer.create(
amount=2995,
currency='brl',
destination=accountId,
transfer_group='{transfer1}',
source_transaction=charge.stripe_id
)```
Heres the code
Can u not do transactions w test charges?
It looks like you supplied the Checkout Session ID (that's the cs_test_ ID from above) instead of a Charge ID. You need to pass in a Charge ID for source_transaction
charge = stripe.checkout.Session.retrieve(session.id, expand=["payment_intent.charges"])
but w this code arent I supposed to get the charge info?
That request should give you back a Checkout Session object with the Charge ID nested under data.payment_intent.charges.id I believe
so i should change the source_transaction=charge.data.payment_intent.charges.id?
now im getting this
outta nowhere, didnt change anything in the checkout session create function
Are you able to log the Checkout Session object so you can see its url field and its payment_intent hash?