Split payment for subscriptions on Stripe platform account - stripe-payments

The stripe api documentation doesn't seem to cover a specific case I'm looking for:
Subscribe someone to a plan on the platform account, and automatically send a portion of their monthly dues to a second account:
I have two accounts:
Platform
Service
I have a plan, platformplan on the Platform account.
I want to subscribe someone to that plan, but send a portion of that cost to the Service account.
A similar, but not applicable request is covered by their documentation:
A serviceplan on the Service account can be subscribed to and an application fee taken via:
application_fee_percent: 10,
stripe_account: "{CONNECTED_STRIPE_ACCOUNT_ID}",
This works (and very helpfully shows the Service account the fee breakdown and total cost), but requires I have access to the Service account if I want to change the plans, which is not ideal. I am trying to set it up so I can have separate plans on the platform (which I control) connected to payable service accounts.
You can split a charge via the destination field:
destination: {
amount: 877,
account: "{CONNECTED_STRIPE_ACCOUNT_ID}",
},
but is there a way to do something similar with a subscription/plan?

The idea is to create the plan, customer and subscription on the connected account instead. This ensures that the owner of the account get their share of the funds. You would take the platform's share via an application fee. This is outlined here.
Another solution is to charge on the platform instead and after the fact, transfer funds to one (or multiple) connected accounts while linked the transfer to that billing cycle's charge. This approach is documented here.

Related

How to test Stripe Connect connected account creations

I want to use Stripe Connect to provide multiparty payments, in my website.
I have a platform. User A (customer) will pay User B (which is the service provider) on the platform and as a platform, I want to get some amount percentage in the middle.
So, I'm following this guide
https://stripe.com/docs/connect/collect-then-transfer-guide
But, when it comes to testing creating those standard connected accounts, I need to fill real information like phones and emails.
However, I found this guide to fullfill my problem:
https://stripe.com/docs/connect/testing#using-oauth
But, I'm not sure how can I use this guide?
How can I create a stripe account for my user B (who will accept payment through my platform) and got that account_id in testing (and later production)?
There are multiple points to clear:
There are Standard, Express and Custom account types. There are also
3 fund flows of Direct Charge, Destination Charge, or Separate
Charges and Transfers. See comparison from Stripe Doc (this is important)
If you decide to use Standard Account, you should go with Direct
Charges
There are 2 ways to onboard a Standard Account. OAuth is a
legacy integration. Account Link is preferable.
But really, Express + Destination Charge would be easier. You should also use Account Link to create express accounts

Share Customer and its PaymentMethods with Connected Accounts

I'm building a platform where content creators can setup a subscription service of which I'll take a fee (think Twitch.tv, Substack, OnlyFans, etc.)
Content creators will setup a Stripe Connected Account on the platform. I'll operate the Platform Account.
Customers that subscribe to a content creator might want to subscribe to others so it makes sense to keep both Customers and their PaymentMethods on the Platform Account. Customers must be able to manage all their subscriptions and have their credit card details pre-filled, if already available.
I can't, for the life of me, understand how to share these Customers and their PaymentMethods with the content creator's Connected Accounts.
I followed the clone customers across accounts guide unsuccessfully. It errors out while creating the Token, saying that the Customer must have an active payment source. I read somewhere that this guide doesn't work with PaymentMethods but I don't really know if that's true.
Then I found this other guide. It seems, though, that I would have to create a Customer, per User, per Connected Account which will make me duplicate information and make subscription management harder.
Could anyone, who has experience building a similar service, give me some pointers?
Thanks
Instead of cloning PaymentMethods to your connected accounts (for which this guide is the correct one) you could create subscriptions using destination charges. The idea being that the customers and payment methods stay on your platform account. When an invoice is paid its funds (minus an application fee set by you) are automatically transferred to the connected account.

Creating subscription plans charging connected accounts using stripe

I basically want to create subscription plans where I can charge the connected accounts and give them additional benefits on the platform in return. Because the connected accounts are businesses, they are not registered as customers on the platform. Is there a proper way to do this through stripe?
Your options here basically are to either register them as Customers as well and use Subscriptions, or potentially use Account Debits and your own recurring mechanism.

Migrating stripe subscription to be SCA compliant

I have a subscription, I collect card details on signup with a 7 day trial, after which the subscription bills monthly.
From what I understand the subscription API is not SCA compliant. Instead
An off_session payment Intent must first be setup when collecting card details.
At the end of each month a scheduler must be triggered to attempt to charge the registered card.
Is this the case? Am I now responsible for scheduling payments?
Update
For those who want some starter code, I created a working playground here with subscriptions, frontend (react) and backend (express) on glitch.
It's not true that Stripe's Subscription API is not SCA-ready, it is, and you don't have to set up your own scheduling like that. The docs you linked to are generally aimed at processing one-off payments(like saving a customer's details and then allowing them to use them again when they re-visit your site to purchase something new, for example) as opposed to recurring ones.
https://stripe.com/docs/billing/subscriptions/payment describes how to set up a subscription in a way that is SCA-ready. While the customer is on-session on your payment page, you collect card details and create a subscription for the customer, which will generally attempt a payment for the first billing period. You then check the status of the subscription after it's created, and handle the outcomes:
the subscription is active and the payment was successful, so you can proceed with provisioning your service to the customer.
the subscription is incomplete — for SCA purposes, let's say this is because 3D Secure authentication was required for that first payment. In this case, the latest_invoice of the subscription exposes a PaymentIntent property, and you use that PaymentIntent in conjunction with your frontend code using stripe.js to walk the customer through authenticating the payment, and that activates the subscription.
the subscription is trialing — if the subscription doesn't involve an initial payment, like when using a trial period for example, you can also check if the subscription has a pending_setup_intent. You can use this on your frontend to have the customer complete a 3D Secure authentication, so that future payments(like the first one after the trial) are more likely to successfully claim an exemption and not require having the user authenticate at that point.
You can also instead use Stripe Checkout to easily collect payment details and set up a customer and subscription for you, while also handling any initial authentication that's needed : https://stripe.com/docs/payments/checkout/server#create-subscriptions
As for the recurring payments, Billing can handle that for you. You can configure you settings to automatically email the customer to complete 3D Secure if it's encountered on a recurring payment. So you can absolutely build an SCA-ready solution with the subscriptions API on Stripe.

How to charge fee on stripe api using c#

I am using Stripe Api to create a customer and then charge it.
What i wanted is to charge my customer whenever it create a sell or charge.
I want 7% of total amount to be credited in my stripe account.
I have tried the Application fee when creating charge with customer Id , but it requires destination to be passed, which requires merchant ID, which always throws error that "No Merchant Found with provided ID".
How the documentation say, there are two way to create a charge: Charging directly and Charging through the platform.
Which of these are you using? (Can I suppose the second since you were talking about the "destination"? ).
They both require connected accounts to do charge, ect.
In the case of Charging through the platform, you need that the account is connected to the platform to be visible from the "destination" (Connecting_Account_Documentation).
If it is not so, explains better the situation in which you find.
application_fee:
A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account, using the Stripe-Account header, an OAuth key, or the destination parameter. For more information, see the application fees documentation.
destination:
An account to make the charge on behalf of. If specified, the charge will be attributed to the destination account for tax reporting, and the funds from the charge will be transferred to the destination account. The ID of the resulting transfer will be returned in the transfer field of the response. See the documentation for details.

Resources