#kylewhittington
1 messages · Page 1 of 1 (latest)
Also worth noting this is all on the test environment.
Copying this here
Hi! Let me help you with this.
Hey Vanya
Could you please share the PaymentIntent ID? pi_xxx
pi_3MPpZxBDkHs0WaOu0hZiV9Xv
I see that this is a destination charge. This might be the reason why it works differently. Let me take a closer look
Thanks!
Our use case is someone authorising a maximum charge, then using our service for the next few hours, after which point we charge them up to that amount when they are finished.
Stripe Connect because people using our platform are the service providers.
I understand. So, if you set the destination[amount] to the amount charge amount initially, you will have to update it to the final amount before capturing.
So to clarify -- we first have to update the payment intent charge amount to the new (lower) value before then capturing?
This is currently what we're doing:
Could you send me a snippet where you create the payment intent?
Yes, thanks. So, you will need to update the PaymentIntentData.TransferData.Amount before capturing the funds.
What happens here is you are promising to transfer more money to the connected account than you capture, that's why it fails.
OK, makes sense. Will take a look at the docs on how to update the transfer amount.
You can probably get the PaymentIntent ID and update it directly: https://stripe.com/docs/api/payment_intents/update
"Some of the parameters you provided (transfer_data) cannot be used when modifying a PaymentIntent that was created by Checkout. You can try again without those parameters."
That's what we get when we try to update the PaymentIntent with a new TransferData.Amount value.
I see, let me check.
You can pass the new transfer amount when capturing the funds: https://stripe.com/docs/api/payment_intents/capture#capture_payment_intent-transfer_data-amount