#son-connect-accounts

1 messages · Page 1 of 1 (latest)

sharp willow
#

Hi there

zinc olive
#

Hi @sharp willow, thanks for reponse

sharp willow
#

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.

zinc olive
#

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?

sharp willow
#

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?

zinc olive
#

I just need the standard and direct charge

sharp willow
#

Got it

#

Then yes, you onboard the account with an Account Link before you create the Subscription

zinc olive
#

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

sharp willow
#

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

zinc olive
#

Yes, the stripe checkout subscription

sharp willow
#

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?

zinc olive
#

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?

sharp willow
#

Customers and Connected Accounts are completely separate.

#

You can't use information from a Customer object to onboard a Connected Account.

zinc olive
#

Understood! So i just need to create new account for my merchant and use it to initiate the checkout

sharp willow
#

Yep

zinc olive
#

Sorry, one more quick question. Do i need to create price object in stripe everytime my merchant has a new price ?

sharp willow
#

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.

zinc olive
#

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();

sharp willow
#

Yeah I'm not super familiar with Java

#

Let me check

#

.setPriceData() I believe

zinc olive
#

Yep, thanks man. You gave a big help today