#a.reit - Connect and Elements

1 messages · Page 1 of 1 (latest)

atomic pine
#

Hello! Looking at this. Give me a moment to catch up

#

So, creating payment methods and subscriptions with a Standard connect account will pretty much look the same. You will initiate the API request from the platform account, passing in the stripe_account parameter to tell which connected account the payment method should be created on. https://stripe.com/docs/connect/subscriptions#direct

elfin spade
#

Yes that is clear for me, but when using Stripe Elements, you always initilaizing the Stripe.js with an API key (see https://stripe.com/docs/js/initializing). But we will only have the api key of the platform account and not the one of the sub-account?

So basically, stripe js calls the stripe api of the main platform account, validates the payment method and returns a token. This token is then used to created/attach the payment method.

As this token is created in the platform account, it wont be available in the sub-account, right?
Note: We do not create any customers subscriptions in our platform account as we are using direct charges, and therefore, creating all customers/subscriptions etc. directly in the sub-account.

#

So with that you can create the token for the sub-account, right?

atomic pine
#

Yes you're correct