#lmdad-q
1 messages · Page 1 of 1 (latest)
Hey
It's a follow up from an answer given by koopjah
I'll paste the screenshots of the convo here
So you get the context
Ahh, it's disappeared!
😞
Okay, nvm
I'll explain
So we want to implement discount functionality on a service we offer. We don't use products/subscriptions.
Reading Stripe docs, it recommends we implement it ourselves by discounting the amount from the PaymentIntent.
koopjah mentioned the following flow:
- Assuming a payment intent from a Customer -> Connect account of £10, with a discount of 50%. Add the code to charge the reduced £5 with a PaymentIntent
- Initiate a transfer to the Connect account of the remaining £5 so they still receive their full amount
If that makes sense, I can go ahead and follow up with the question I had around this flow?
sure
Okay, so the thing I wasn't sure about is if this process would initiate two payments to the Connect account?
In other words, what I'm trying to avoid is the slightly weird behaviour on our Connect account end where they receive (in the above scenario) two separate payments of £5 to their bank accounts in the payout
it would depend how you build it exactly
it wouldn't create two if you don't pass transfer_data on the PaymentIntent you create for the payment
you'd basically be doing https://stripe.com/docs/connect/charges-transfers where you do a payment, and then separately create a transfer afterwards
Oh, so just had a look at the doc. Assuming we use the same string for the transfer_group , it would group them into one payment?
no it's all separate transfers(or 'payments' as seen from the connected account).
Okay, at the moment we aren't passing transfer_data.
So with that in mind, would the following ensure a single payment of £10 assuming the example above
- Create
PaymentIntentfor £5 - Create separate transfer of £5
hmm, not sure how it would. A payment from whom to whom?
in that example you charge the customer £5 so your platform gets that and then you transfer £5 to the connected account, so they get that. (and your platform loses money since you paid the Stripe fees)
When we create a payment intent, we set the destination as the connect account
then you .. are using transfer_data? I was assuming your example did not , since that's what you said.
We want to charge the Customer £5 (discounted from £10)
We still want the Connect account to get the £10 (total amount before discount)
I understand we need to create a payment intent followed by a transfer. My question is how can we implement this such that the Connect account gets £10?
1/ Create a PaymentIntent for £5 without transfer_data
2/ Create a Transfer for £10
now, it will be hard since 2/ will probably fail, since after all, you don't actually have £10 if we look at this in isolation
so this assumes that for example your platform account is on manual payouts and has accumulated some available balance sufficient to make that transfer
Is there a way around this without manual payouts?
usually you'd use source_transaction to link the transfer to incoming funds (https://stripe.com/docs/connect/charges-transfers#transfer-availability) but it seems you might not have other funds to link to, so if that's the case you probably need to accumulate a balance
Ah okay, so accumulating a balance is the way to do it?
well how do you propose sending money you don't have to the connected account exactly? :p
Yh I get that
It's more just understand what options we have to fix that
In a scalable way
usually it's source_transaction
Ah okay, so if I've understood correctly
Step 2 where we initiate the transfer (after 1 of creating a payment intent)
In that step, we can link the source_transaction to the PaymnetIntent from step 1?
you can but it would still fail
since you're making a transfer of 10 but linking to a payment of 5
makes sense
so it can only work if you have an accumulated balance
or if you link to some other payment that was >=10
Okay, think it sounds better to just ensure we have an accumulated balance at all times.
but AFAIK you shouldn't do that since it makes the funds flow murky from a regulatory perspective since it mixes two transactions, though I'm not sure on that part
Hmm
This feels rather hacky for a discount solution
I think part of the reason is we aren't using Products/Subscriptions which seem to have out of the box functionality for discounts etc.
Do customers tend to use this over PaymentIntents for this reason?
Because implementing this type of discount functionality for PaymentIntets/Transfers feels rather messy
hmm what you're describing is a really advanced usage of Stripe though
it's only complicated because you want the connected account to get the full amount despite the fact you give the customer a discount
yeah, i suppose that as a marketplace that doesn't feel like a big ask though, right?
as in, customer gets a discount (given by platform) and connect still gets their money
perhaps, but it's not something we natively support today
yeah makes sense
out of interest have you experienced a use case like this before
yes, for really large users sometimes
just wondering if instead we should be using Stripe Product for example
I mean you can use Products but that's a higher-level question and we're deep into exploring this option
Yeah it was more of a quesiton
the easiest option would be using Checkout with Destination charges (https://stripe.com/docs/connect/creating-a-payments-page)
Should we have used Products for this?
well there is no easy solution if you have this requirement of transferring the undiscounted amount
Okay so it would still have been complex even if we did use Products
regardless of what you use you would end up needing to accumulate a balance and making separate transfers as far as I know
Fair enough.
I saw Stripe had capability for discounts with Products/Subscriptions
So i just assumed maybe this use case would have been easier
or the right way to go about it/should have gone about it
but if that's what youre saying, i understand
alright, is there anyway to leave this thread open/export without taking screenshots
i just want a way to refer back to the things you mentioned for our dev team
Who can we speak to about this?
As we don't want to implement a solution that we later have to undo for legal reasons...
you could try our support team https://support.stripe.com/email
thanks, also I just realised the step 2 would only be £5. given in step 1 we created a payment intent of £5. That would be £10 in total so it should be fine.
as long as the amount in the transfer doesn't exceed the payment intent amount
which should be the case
if that's that case then you can simply use Destination charges(create the PaymentIntent with transfer_data ) and everything is straightforward
- Charge £5 to
Customer(discounted from £10).
Currently we use PaymentIntent with the amount of £10. So for this use case we adjust to £5
- Now we need to figure out how to send the remaining £5 so that the destination
Connectaccount gets their full amount. With this in mind, we initiate a transfer of £5 (difference) so in total they should receive £10
?
so you do charge £5 then!
when I say "charge" I mean the amount you pass when creating the PaymentIntent, since that's all that matters really
Yup, the amount we would charge is £5.
Does this make it easier 😛
But again, we want to ensure the Connect account gets the remaining £5. So in total they receive £10. In this case that is.
yep so then you need to have £10 in your platform's available balance(by being on manual payouts and accumulating funds over time and/or adding topups to keep your balance sufficient (https://stripe.com/docs/connect/top-ups) )
https://stackoverflow.com/questions/55686949/why-i-am-getting-insufficient-funds-when-trying-stripe-transfers-even-though-i/55687932#55687932 is at least somewhat related(I wrote it) so worth reading as well
Okay, just to be clear the Connect account doesn't need to have manual payments switched on?
no, it's for your platform(since otherwise your platform doesn't accumulate funds as they get paid out automatically)
the connected accounts can use any payout schedule, that's separate
Awesome
Okay this is sounding better
🙌
Hey, just floating an idea.
What if we created a PaymentIntent without transfer_data. This would mean those funds come to our platform account right?
Assuming we ensured that our platform remains topped up with a balance, we can just trigger a transfer directly to the Connect account of the entire amount?
That way we avoid sending part of the payment to the destination account (Customer) directly via the PaymentIntent which we currently do and then also initiate a transfer with the difference.
this is exactly what I've been proposing.
sorry, maybe we were not on the same page, but that's exactly what I was talking about
Oh okay, sorry it's been a complex deep-dive 😅
^^
I'm stepping away for lunch but I think things are fairly clear at the moment?