#lewisd - marketplace discounts
1 messages · Page 1 of 1 (latest)
Good question. Thinking on this a bit
Do you know what the balances on your platform account will look like? In broad strokes, I think you will either need to transfer these funds from your Stripe account to theirs, or - kind of like you said - you can create another payment intent and charge that to some payment method that you have.
Also for context, do you know what your charge flow is in Stripe terms? Are you using direct charges, destination charges, or separate charges and transfers?
Thanks for the quick reply!
I believe I am using destination charges
On the backend, i create payment intents like so:
const paymentIntent = await stripe.paymentIntents.create({
payment_method_types: ['card'],
customer: request.body.buyerCustomerID,
amount: total,
currency: 'gbp',
description: stripeDescription,
application_fee_amount: Math.round(
itemPrice * sellerUserData.sellingFee.percentage
),
receipt_email: buyerAuth.email,
transfer_data: {
destination: sellerUserData.stripeConnectAccountID,
},
});
Thank you, definitely a destination charge.
On the platform account, the balance is just 0 i suppose. We could buff it out with some funds so it can handle the passing around of funds if that seems like a good method?
perhaps we could create a webhook that will use a company card to pay the seller the full amount
and the discounted amount will just go to our platform account
I think that that might have to be it. Unfortunately I am a bit fuzzy on the details of how platforms typically make sure that they have enough funds on hand to do that. I will reach out to my colleagues and ask. At a high level, I think it basically means you would make sure that all of your money doesn't get paid out to your bank or you can create a top up to put funds in your platform balance to be disbursed.
Company card also makes sense. You would then basically make sure that you don't do a destination charge when this happens.
I'm also trying to think of what the implications here for refunds would be
Yep, so those are the two basic options.
- You can buff out your account balance. This would consist of shifting to manual payouts[1], and some combination of topping up you account with your own funds[2], and making sure to not transfer all of your funds away when paying yourself out to your bank account. Then, when the customer makes a payout with a discount code, you can simply transfer the extra funds to your user's account.
[1] https://stripe.com/docs/connect/manual-payouts
[2] https://stripe.com/docs/connect/top-ups
- Alternatively, you can make a second payment intent that points to their account and have your company card pay for it.
Both have their complexities but from what I understand either could be workable depending on what makes sense to you.
I wonder what you mean by "...buyers are sellers and sellers are buyers..." - in Stripe, buyers (customers) and sellers (connected accounts/users) are completely separate...
i.e. (sellers/connected accounts) are NOT able to be (buyers/make purchases) unless you set them up separately. There is no concept of a "Connected Account Purchase"
When that comes up, it most often means that one user will have both a Customer and Account object related to them. Here, we are almost exclusively talking about interacting with the Account side of it though as this is what goes in to their balance
Sorry i should of been more clear. Users on my marketplace can buy and they can sell. Every user has a stripe customer ID and a connect express account ID assigned to them. I suppose i meant "...buyers are sellers and sellers are buyers..." from a high level view on my platform, rather than on stripe itself
All good - I've seen many come here with VERY preliminary questions that hadn't grasped that yet...
Awesome thanks @grand ermine , I think im going to try option 2, using a company card to pay the difference. Seems to make the most sense to me.
Now the question is how do you confirm 2 payment intents on the front end, or will I be confirming this 2nd business paid for payment intent on the backend?... 🤔
Am i going to need this: https://stripe.com/docs/payments/finalize-payments-on-the-server
That all depends on what you're wanting to use to transition the payment through its lifecycle. I would recommend using the tried and true method of client-side confirmation using Elements: https://stripe.com/docs/payments/quickstart
Ok cool, im used to using Elements to confirm payments, but in terms of confirming the 2nd payment intent that us, the business will pay for, I can do that on the front end as well?
As there will be no need for elements. I'll be using the business card to pay for the 2nd payment intent
I don't understand. What is the point of the 2nd Payment Intent?
So i want to give users coupons on my marketplace but I am not using Stripe Checkout, i have a fully custom backend/frontend/checkout
me and @grand ermine above said one way of creating my own custom version of coupons would be to create a 2nd payment intent and pay for the difference with our business card
Therefore the buyer gets a discount, the seller gets the full amount they were expecting and we, the marketplace business, can cover the coupon amount
AH, I see. Okay. If you create the Payment Method before the 2nd Payment Intent is created then you can do either client or server side handling of the Payment Intent itself. It will kind of depend on the payment flow you're imagining
Ah ok, so i can save the users payment method if its a new one, then send it to the server and confirm it with the 2nd one.