#some1ataplace

1 messages · Page 1 of 1 (latest)

inner portalBOT
queen vessel
unreal topaz
#

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?

queen vessel
#

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"

unreal topaz
#

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"

queen vessel
#

No it's about the customer bank account (who pays the transaction, to both Platform and Connected Account)

unreal topaz
#

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

queen vessel
#

Yes ^ is correct

#

the settlement currencies will be decided by who is the settelemnt merchant (the CA in case of on_behalf_of)

unreal topaz
#

I see thank you for clarifying that to me. How about showing me the expand?

queen vessel
#

Hi, sorry what expand you are referring to?

unreal topaz
#
  1. 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
queen vessel
#

You are already doing it expand=["line_items", "customer"],)

#

you just need to change it to expand=["line_items", "payment_intent.payment_method"])

inner portalBOT
unreal topaz
#

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?

vale tusk
#

Expanding the customer shouldn't be necessary to retrieve the data for what you want. Unless i've overlooked something

unreal topaz
#

makes sense. I could keep it though? I forgot why I ever needed the customer in that array

vale tusk
#

i don't recommend keeping it. It's going to make the request take longer to process

unreal topaz
#

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

vale tusk
#

so what's your issue/question? If you need the customer details, then you should go ahead and expand it too, otherwise, remove it

unreal topaz
#

gotcha thanks going to need to refactor that code later. I think im all good for now

unreal topaz
#

Another question

queen vessel
#

Yes it creates an AccountLink

unreal topaz
#

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

Let Stripe collect identity verification information for your Custom connected accounts.

Learn how to create a page to accept payments for your users.

#

i am going to pass out, feel free to answer and i will check later

queen vessel
#

Looks correct to me. It’s your system design so ultimately up to you though