#kylewhittington

1 messages · Page 1 of 1 (latest)

gloomy raftBOT
azure olive
visual trellis
#

Also worth noting this is all on the test environment.

#

Copying this here

#

Hi! Let me help you with this.

azure olive
#

Hey Vanya

visual trellis
#

Could you please share the PaymentIntent ID? pi_xxx

azure olive
#

pi_3MPpZxBDkHs0WaOu0hZiV9Xv

visual trellis
#

I see that this is a destination charge. This might be the reason why it works differently. Let me take a closer look

azure olive
#

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.

visual trellis
#

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.

azure olive
#

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:

visual trellis
#

Could you send me a snippet where you create the payment intent?

azure olive
#

We're using Stripe Checkout to set up the session:

#

Is that what you're after?

visual trellis
#

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.

azure olive
#

OK, makes sense. Will take a look at the docs on how to update the transfer amount.

visual trellis
azure olive
#

"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.

visual trellis
#

I see, let me check.