#some1ataplace
1 messages · Page 1 of 1 (latest)
- https://stripe.com/docs/connect/destination-charges#settlement-merchant
- To find which one the customer used, you would want to look at the
payment_intentfield (expand it!) and look at itspayment_method. Like expandingpayment_intent.payment_method
Can you provide me a little more detail on both answers? I am really confused about on_behalf_of. It sounds like a no brainer to enable it? Why is that not the default or am I missing something? Can you provide / describe an example use case of where and when I wouldn't use it. For 2, can you show me how to expand it?
The Doc would explain better than me:) It's to decide the settlement merchant. Some platform want they to be the settlement merchant (appear on customer bank ), some platform want the Connected Account to be the settle merchant
ie if Uber is a platform, each driver is Connected Account. If they use obo, each of the customer will see their credit card statement as "Charge by driver X". But if they don't, customer will see "Charge by Uber"
Oh so when a destination payment gets transferred to the connected account, the connected account bank account can say "you got paid on behalf of my website"
No it's about the customer bank account (who pays the transaction, to both Platform and Connected Account)
ooh wow so it looks like i should not use on behalf of. But then what happens with the settlement currencies if I do not use on behalf of?
So I have my platform, customer, connected account. Customer pays platform. Connected account gets percentage of payment. Platform gets rest of payment. On behalf of says to the customer, Charge by connected account. If I do not use on behalf of, customer sees charged by platform
Yes ^ is correct
the settlement currencies will be decided by who is the settelemnt merchant (the CA in case of on_behalf_of)
This Doc can explain https://stripe.com/docs/connect/currencies
I see thank you for clarifying that to me. How about showing me the expand?
Hi, sorry what expand you are referring to?
- To find which one the customer used, you would want to look at the payment_intent field (expand it!) and look at its payment_method . Like expanding payment_intent.payment_method
Ah, that's expanding object, example here https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You are already doing it expand=["line_items", "customer"],)
you just need to change it to expand=["line_items", "payment_intent.payment_method"])
The same exact stripe.checkout.Session.retrieve?
checkout_session = stripe.checkout.Session.retrieve(event.data.object.id, expand=["line_items", "customer", "payment_intent.payment_method"],)
Why would customer be removed?
Expanding the customer shouldn't be necessary to retrieve the data for what you want. Unless i've overlooked something
makes sense. I could keep it though? I forgot why I ever needed the customer in that array
i don't recommend keeping it. It's going to make the request take longer to process
checkout_session = stripe.checkout.Session.retrieve(event.data.object.id, expand=["line_items", "customer"],)
checkout_session_id = checkout_session.id
customer_email = checkout_session.customer_details.email
payment_mode = checkout_session.mode
stripe_checkout_session_one_time_payments = stripe.checkout.Session.retrieve(checkout_session_id,expand=['payment_intent'])
Seems like I have multiple calls to it
so what's your issue/question? If you need the customer details, then you should go ahead and expand it too, otherwise, remove it
gotcha thanks going to need to refactor that code later. I think im all good for now
Another question
This code creates an onboarding connect link?
stripe.AccountLink.create
(
account
='{{CONNECTED_ACCOUNT_ID}}'
,
refresh_url
="https://example.com/reauth",
return_url
="https://example.com/return",
type
="account_onboarding",
collect
="eventually_due",
)
I cannot just give my website users this? -> https://dashboard.stripe.com/register/connect
Sign up to quickly create a new Stripe account today and get started accepting payments in minutes.
Yes it creates an AccountLink
So every connect account needs their own specialized onboarding link through the API?
There is no way to do this on the stripe dashboard?
Or like customer portal?
Am I on the right track with how to setup connect on my site?
Step 1:
Create a connect account id for each user via django signal (like customer id)
Step 2:
Make an onboarding URL for the user
https://stripe.com/docs/connect/custom/hosted-onboarding
Step 3 (wonder how to do this via the API to see if a user finished onboarding):
Once onboarded, hide onboarding URL for that user or say "you already are onboarded"
Step 4:
Change checkout code to reward connected accounts a percentage of new customer payments with destination charges and express account
https://stripe.com/docs/connect/creating-a-payments-page
i am going to pass out, feel free to answer and i will check later
Looks correct to me. It’s your system design so ultimately up to you though