#Serdar

1 messages ยท Page 1 of 1 (latest)

cobalt gobletBOT
oak echo
#

Hi i already managed to create custom accounts and also to create products

#

Now i'm wondering, how i can create subscriptions for a product to a custom account

bold sundial
#

๐Ÿ‘‹ Hi there, Happy to help!
Yes you can use Connect with Subscription

oak echo
#

const subscription = await this._stripe.subscriptions.create({
customer: 'acct_1MBxoLRVyaGmD9zr',
items: [{ price: 'price_1MByFzD1fTq5Z6HuS6yKY6BX' }],
expand: ['latest_invoice.payment_intent'],
});

bold sundial
oak echo
#

i tried this code

#

but then i get the message, No such customer: 'acct_1MBxoLRVyaGmD9zr'

#

Do i need to set the account id on another field?

bold sundial
#

Yes because you are passing the AccountId and not the Customer Please check the guide I shared above

oak echo
#

I checked, but i dont get any information to my problem

bold sundial
#

You need to do something like this: for direct charges:

const subscription = await stripe.subscriptions.create(
  {
    customer: '{{CUSTOMER}}',
    items: [{price: '{{PRICE}}'}],
    expand: ['latest_invoice.payment_intent'],
  },
  {stripeAccount: '{{CONNECTED_ACCOUNT_ID}}'}
);

https://stripe.com/docs/connect/subscriptions#use-direct-charges-to-create-a-subscription
Or this if you are using :

const subscription = await stripe.subscriptions.create({
  customer: '{{CUSTOMER}}',
  items: [{price: '{{PRICE}}'}],
  expand: ['latest_invoice.payment_intent'],
  transfer_data: {destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'},
});

https://stripe.com/docs/connect/subscriptions#use-destination-charges-to-create-a-subscription

oak echo
#

Hm

#

But i dont have customer?

#

The customer has a custom account on connect

bold sundial
#

The Connect Account is creating a subscription for whom ?

oak echo
#

I as platform

#

want to create a subscription

#

to custom accounts

#

so as soon as they create a account on my platform, they do the onboarding for custom accounts

#

and after that i want to create a subscription to them

#

that they pay monthly / yearly to use my platform

#

Let me explain again for you

#

So the customer comes to our platform and create an account to manage his events and to sell tickets.

After the creation of the account, we forward him to the onboarding process to create a custom-account on stripe connect.

For the use of our platform, we want to create a subscription him as example 10โ‚ฌ per month.

#

Is that not possible?

#

I think i miss this step can it be:

Create a customer on the platform with the intended payment method for every connected account you want to bill. In the gym management software example, you create a customer for each gym business:

#

So i need to create afterwards a customer for each connected account?

#

Ah ...

#

I think i need to follow this

#

But still my question is

#

Do i need to create a customer for every connected account then?

bold sundial
# oak echo

Exactly, so you need to treat your Connected Account as a Customer for your platform Account not as a partner (Stripe Connected Account Object)

oak echo
#

Yes that we already do ๐Ÿ™‚

oak echo
#

But the Connected Account does not have a Customer ID

#

ah okay ..

#

thank you i will check

bold sundial
#

Np!

oak echo
#

One more question

#

Do you recommend to create the customer before the custom account?

#

is there any possiblity to link customer <-> custom account?

bold sundial
bold sundial
oak echo
#

Hmmm

#

I tried this:

#

And there i pass the account id of the custom account

#

But then it is more like, that i create a customer for the custom account .. which is not what i wanted

#

or do it think wrong?

gleaming lava
#

What are you trying to do?

oak echo
#

This is what i want

#

Therefore your colleague told me, that i need to create a customer to the connected account

#

So i can create a billing for the custom account

#

I have expected, that the customere is shown under my customers, and not the customers of the connected account?

#

Because at the end, i want to make a subscription to that customer with one of my products

gleaming lava
#

Then yes, you'd create the customer on the platform without the stripeAccount parameter. But that Customer object is a representation of a connected account, so you need to add a reference to that account on the customer (e.g. metadata as my colleague suggested).

oak echo
#

Ah okay

#

I thought there was a possible linking between them

#

How does the system understand, that the customer is the representation of the connected account?

#

Because the banking details are in the connected account ..

#

Or how do i bill then the customer when there is no direct connection? ๐Ÿ˜„

gleaming lava
#

For example, you might store a metadata field on the Customer object that maps to the related connected account:

account: "acct_xxx"
oak echo
#

Yes i understood that

#

Can i somehow use the banking data from the connected account for the customer?

#

Because imagine the flow would be:

  1. Customer makes Onboarding for the Custom Account and provides his banking data
  2. Customer needs to provide again his banking data for the customer account?
#

That would be not so nice

gleaming lava
#

One for payouts, one for payments?

oak echo
#

Payments

#

Let me explain again our usecase

#

We are Platform x

#

Customer Y comes to our platform and creates an account. He wants to sell tickets for his event.

Our system creates now for his account a custom account on stripe. He is doing the onboarding process and also provides banking data for the payouts.

But to use our platform, we have different products. We want as example subscription 10โ‚ฌ per month from him.

#

How to handle this case?

#

As i understood, we need to create a customer on stripe for him, so we can make subscription to him. And we "link" them over metadata. Ok but how can our customer now provide his banking details, so stripe nows where to get the 10โ‚ฌ per month from?

gleaming lava
gleaming lava
oak echo
#

So the customer needs to two times Stripe-Link stuff?

  1. Onboarding for the Custom Account
  2. Subscription
gleaming lava
#

The APIs/objects used for collecting payments and payout out money are different, and can't really be used interoperable

oak echo
#

Hmm ok

#

Thats sad

gleaming lava
oak echo
#

For what exactly?

#

The payment methods are not the problem

#

Use flow the user has to go through is not nice

#

He first would do the onboarding for the custom account

#

And afterwards he would need to go to a checkout page to make the subscription

gleaming lava
#

I'm trying to understand what banking rails you want to leverage for your customer to pay you, form the options we support

oak echo
#

Ah

#

SEPA as example or credit card

gleaming lava
#

Well, credit card is entirely different then

oak echo
#

Yeah i see ..

#

Ok we need to overthink how we can use stripe connect then

#

Seems like its not that easy how we thought

gleaming lava
#

They're 2 entirely separate entities. You shouldn't assume that the bank account that I want to deposit proceeds from my tickets sales into is the same account I want to pay my subscription from

#

Equally, there's often additional requirements for banking mechanisms to make payments from (e.g. authentication)

oak echo
#

Yeah you are right

#

Thank you for all the information

gleaming lava
#

np!