#son-connect-accounts
1 messages · Page 1 of 1 (latest)
Hi @sharp willow, thanks for reponse
So what you are referencing in step 2 is a "Connected Account". This is another merchant that is Connected to your platform. It is not the end-customer who would be paying you (or your Connected Account), which is who the Customer would be.
I didn't mean the end-customer. So in order the merchant to accept payments, i need to create an account link and redirect them to their on stripe account for setting up their profile. So in the 'AccountLinkCreateParams' i need to insert 'setAccount' id. Instead of creating a new account as in step 2, can i just use account id when i query from stripe subscription id?
I don't really understand the last part there. If you are creating a Subscription for your Connected Account, the Connected Account has to be onboarded first.
Let's back up a second.
Have you decided on which type of Connected Accounts and which type of charge flow you want to utilize?
https://stripe.com/docs/connect/accounts discusses the different account types and https://stripe.com/docs/connect/charges has the different charge flows
I just need the standard and direct charge
Got it
Then yes, you onboard the account with an Account Link before you create the Subscription
Ok so when the merchant subscribe with my platform previously which we don't have the plan on allowing them to accept payments yet, i save the stripe subscription id. And i believe in the subscription object will have customer id
So do i still need to create an an account again? Can i just use the account id in the subscription object for onboarding
Oh, sorry. My context is for existing users
There is no account ID in a Subscription object.
I'm sorry, I'm really confused.
You have previous users.
They are customers that are paying you?
Using Subscriptions
Yes, the stripe checkout subscription
So you are representing those previous users with a Customer object, correct?
Now you want to allow those previous users to also be Connected Accounts. And for them to accept payments themselves.
Is that correct?
Yess
So my concern is, I don't want create multiple stripe accounts for the exactly same account in my platform.
Do you mean, when they made a subscription payment in checkout previously stripe didn't create an account internally?
Customers and Connected Accounts are completely separate.
You can't use information from a Customer object to onboard a Connected Account.
Understood! So i just need to create new account for my merchant and use it to initiate the checkout
Yep
Sorry, one more quick question. Do i need to create price object in stripe everytime my merchant has a new price ?
You can create prices during the Checkout Session creation by using line_items.price_data
So you don't have to create it ahead of time.
Otherwise, you can always re-use prices if one has been created for the amount you want already.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data is what I'm talking about for line_items.price_data
Ok, so i just ignore this part right?
SessionCreateParams.LineItem.builder()
.setPrice("{{PRICE_ID}}")
.setQuantity(1L)
.build()
Sorry it is inside this object
SessionCreateParams params =
SessionCreateParams.builder()
.addLineItem(
SessionCreateParams.LineItem.builder()
.setPrice("{{PRICE_ID}}")
.setQuantity(1L)
.build())
.setMode(SessionCreateParams.Mode.PAYMENT)
.setSuccessUrl("https://example.com/success")
.setCancelUrl("https://example.com/cancel")
.setPaymentIntentData(
SessionCreateParams.PaymentIntentData.builder()
.setApplicationFeeAmount(123L)
.build())
.build();
Yep, thanks man. You gave a big help today