#devertry|deepsheep
1 messages · Page 1 of 1 (latest)
What is a 'pay-in'?
the account wich get the fund and then pay out
But what Stripe object/API represents the action you're describing?
??
I don't understand what you're trying to do. You say a 'pay-in', but that's not a concept in Stripe
Are you transferring balance between accounts via the Transfers API?
ok
I have the account platform AA wich get the fund
and B it's a connected account with who would like to transfert
for that I need to get some data, set as metadata in the checkout session
I need to get the metadata in this checkout session forward in B
and I don't know how to et them
I see them in A but not in B
Ok, but how are you transferring the balance from A -> B?
checkout session
Can you share an example cs_xxx?
checkout_session = stripe.checkout.Session.create(
mode="payment",
line_items=[{
"price_data": {
"unit_amount": int(price),
"currency": "eur",
"product_data": {
"name": product_name,
}
},
"quantity": 1
}],
payment_intent_data={
"application_fee_amount": int(price * 0.05),
"transfer_data": {"destination": STRIPE_NOMICA_ID},
"metadata": {
"user_id": user_id,
"session_id": session_id
}
},
metadata={
'user_id': user_id,
'session_id': session_id
},
success_url=env.ORIGIN_FRONT_END + "/payment/success",
cancel_url=env.ORIGIN_FRONT_END,
)
thanks for all !
Hey! Taking over for my colleague. Metadatas doesn't propagate from one object to another. In this request your are passing some metadatas into the PaymentIntent resulting from the Checkout Session.
You can get the source transaction from a transfer to the Connected Account and get the metadata from the PaymentIntent
so from py_1N4LpwL this I can get the metadata ?
You can even start from the transfer (A->B)
https://stripe.com/docs/api/transfers/object
The you refer to the source_Transaction:
https://stripe.com/docs/api/transfers/object#transfer_object-source_transaction
Which is a Charge:
https://stripe.com/docs/api/charges/object
From the charge you get the original PaymentIntent with the metadata that you set in the Checkout Session
https://stripe.com/docs/api/charges/object#charge_object-payment_intent
I use checkout session ....
Yeah, once the Checkout Session is completed, you'll have a PaymentIntent:
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
in the connected account ?
The Platform is the one who created the Checkout Session
What you mean by your question ?
ha ok
so I cannot get the metada from the connected account ?
ok will do by hand at the begining and transfert fund with a script
Don't hesitate to come back if you have any follow up question about this.
ok thanks for all 🙂