This post has been de-listed (Author was flagged for spam)
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So I'm trying to charge a buyer $100.
Proceeds will go to Seller A and Seller B, 50/50, after Stripe fees my application fees (5%).
I don't want to be the merchant of record, so I have to use a direct charge, not destination charge.
This is very important -- I don't want to be liable for anything, I'm just the guy who facilitated the transaction.
I tried creating a direct charge on behalf of Seller A for $100, while setting my app fee as $5 (i.e. 5%):
stripe.PaymentIntent.create(amount = 10000, currency = 'usd', stripe_account = {{ SELLER_A_ACCOUNT_ID }}, application_fee_amount = 500)
So far so good.
Once the payment was made, I tried to transfer $50 from Seller A's connected account to Seller B's connect account by creating a Transfer object:
stripe.Transfer.create(amount = 5000, currency='usd', destination='{{ SELLER_B_ACCOUNT_ID }}', stripe_account = '{{ SELLER_A_ACCOUNT_ID }}')
Doesn't work!
It gave me error:
stripe.error.InvalidRequestError: Request req_BUamIs2khdEsbf: Cannot create transfers between connected accounts. If you're trying to debit a Connected account then you can learn more here https://stripe.com/docs/connect/account-debits. If you require further assistance, please contact us via https://support.stripe.com/contact.
Fine fine fine.
So I decided to take a larger application fee ($55), and then transfer $50 from my platform account to Seller B (using a webhook listening to the payment_intent.succeeded
event), instead of transferring $50 from Seller A to Seller B.
Now it says my account has insufficient funds, even though the application fee of $55 has entered my platform account:
stripe.error.InvalidRequestError: Request req_IYLEYMmcN5E7lF: You have insufficient available funds in your Stripe account. Try adding funds directly to your available balance by creating Charges using the 4000000000000077 test card. See: https://stripe.com/docs/testing#available-balance
What gives?
How do I solve this?
I found the answer after being on live chat with Stripe support.
The key is to use the on_behalf_of
parameter when creating a PaymentIntent
object:
stripe.PaymentIntent.create(amount = 10000, currency = 'usd', on_behalf_of = '{{ SELLER_A_ACCOUNT_ID }}')
This creates a charge on the platform itself, but with Seller A as the Business of Record. This is distinct from creating a PaymentIntent
object using the stripe_account
parameter.
Next, I create separate transfers to Seller A and Seller B (amounts are just illustrative):
stripe.Transfer.create(amount = 5000, currency = 'usd', destination = '{{ SELLER_A_ACCOUNT_ID }}', source_transaction = '{{ LATEST_CHARGE_ID_OF_PAYMENTINTENT }}')
stripe.Transfer.create(amount = 5000, currency = 'usd', destination = '{{ SELLER_B_ACCOUNT_ID }}', source_transaction = '{{ LATEST_CHARGE_ID_OF_PAYMENTINTENT }}')
And voila, it works instantly.
Wouldn't that appear as 2 separate charges on the buyer's credit card statement?
I'm trying to prevent exactly that kind of confusion, especially when they're just buying 1 product (and shouldn't care what happens/what kind of payment split happens on the back-end).
Oh wow, this is probably closest to what I'm looking for.
It's either this, or I charge them twice as u/Newagegin mentioned.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/stripe/comm...
Yeah, apparently Stripe is very versatile.
I was surprised too.