#jr-paymentintent-payment
1 messages · Page 1 of 1 (latest)
jr-paymentintent-payment
Creating a PaymentIntent does not, but confirming the PaymentIntent will create a Charge and represent the money moving. So yes. I recommend reading https://stripe.com/docs/payments/accept-a-payment
I have the following case, we are creating a Lyft type app, when the customer requests a trip a charge is made to his credit card for the amount of the trip, but when the trip ends the cost may have gone up due to the time the trip lasted and the kilometers traveled, then what I need is to update the payment intent to change the amount.
You can't do that really, you'd do a new/separate payment/PaymentIntent in that case
But there is an api to update a payment intent, how can it not be possible?
Once you have confirmed the PaymentIntent and taking the money (or hold the funds) you can't change the amount or increase it.
Yes, I know that. That's why I need to update the payment intent, but first I need to separate the amount to confirm that you have the amount on your card.
I'm sorry, you literally said "how can it not be possible" so I explained why it is not possible. What you are trying to do is not possible
You can hold $10, which lets you capture up to $10, not more. You can then do a separate PaymentIntent for the extra amount if it increased for example
Or you don't hold funds and you wait for the ride to be done to charge their card, in which case they might have insufficient funds
Let me explain why I simply can't create a new payment intent, when the client requests a trip a charge is made, then when the trip is over the transfer is made to the driver of his commission, however if the trip increases in price for obvious reasons the commission is the same, but if I don't update the amount of the payment intent, the commission may be higher than the original amount and that will cause me an error.
that doesn't really make sense to me I'm sorry. The commission shouldn't matter in this flow, you can update transfer_data[amount] or application_fee_amount on capture
The other way I can think of to create a new payment intent is to take the commission from the company's account balance instead of the amount of the original payment intent.
I don't understand what most of those words mean sorry. Can you try and write a clear example of who pays what when?
We are not using the transfer data to make the driver commission transfer.
I'm sorry but to be able to help I will need a clear summary of what you are doing in that case because I don't understand
Ok, look, when the client requests a trip you charge him, and when the trip is finished you execute an event that deducts the driver's commission and sends it to the connected account.
So what's the problem then? You did say yourself that the commission changed and it was a problem
To make the transfer to the driver the api asks for the ch_id
So there is already an established amount and if the transfer increases, it may exceed the original amount and that may give me an error.
yes that's what I explained earlier too. If you charge $10, you can't transfer $12.
you have to either refiund $10 and charge $12, or charge the extra $2. There are many ways to do this, it just depends what you really need to do
does that make sense? I'm still struggling to understand what's blocking you
Can I make a transfer to the driver's connected account without having to pass the ch_id ?
What is blocking me is the initial amount of the payment intent.
sure but those are all vague questions I'm sorry. I did ask for a concrete example multiple times. Please try to explain your issue clearly, with a clear example, and then we can help you
Look, again I explain again, when the client requests a trip a charge is made to his card, for example 10 USD, and from that charge the driver's commission is taken, the driver keeps 70% and the platform keeps 30%, the amount of 10 USD arrives first to the platform's account and then when the trip ends then the commission is transferred to the driver's connected account, but when the trip ends the trip may have lasted longer than expected and now he will not be charged 10 USD but 15 USD.
sure but I also explained that is impossible. You can't get $15 if you charged or authorized $10
So either you charge an extra $5 separately, or you refund $10 and charge $15
Yes, I understand that this is not possible
Yes, I understand that, what I need to know is if I can make a transfer to the driver's account without associating the transfer to a ch_id
you can make a transfer to the driver's account without associating the transfer to a ch_id, but it's generally not recommended.
if you don't specify the source_transaction, it'll always try to use the funds from your available balance and if the payment funds is not yet available, and you don't specify the source_transaction then you'll possibly run into the problem of insufficient funds.
using source_transaction also helps to provide another safeguard where you won't be able to transfer more than the payment amount