#Aleks Farkov
1 messages · Page 1 of 1 (latest)
Thanks
So what's the issue you're having with the transfers api?
I am getting the following error when making the transfer inside a webhook
invalid_request_error - source_transaction
Transfers using this transaction as a source must not exceed the source amount of €180.00. (There is already a transfer using this source, amounting to €180.00.)
Do you have the request ID that I can take a look at?
that works
I just don't get why the error is occuring since none of the 2 statements in it are true. Additional information which I can give is that the transfer is made to an Express account
It is the only transfer
The only other action is a payment intent
Which has succeeded
And the amount is way above the Transfer amount
It is in Test mode
And happens every time I try to make a transfer
If you look at your request that created the payment intent (https://dashboard.stripe.com/test/logs/iar_eAYxAuHF3OT63Z) you set transfer_data.destination to a connected account, but didn't set anything for transfer_data.amount. As we mention in the API reference (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-transfer_data-amount) if you don't set an amount then we'll default to transferring the full amount to the connected account
If you don't want to automatically transfer anything as part of the payment intent and do the transfer separately then you need to remove transfer_data.destination
Or see if setting transfer_data.amount: 0 will work
Okay, do I need to keep the Payment Intent Amount
What do you mean by that?
Yes, you need to keep setting that - that's a required field to create a payment intent
Okay, thanks, that was an interesting thing I have missed
But the problem is I want the full amount to be transferd
I mean the connected account needs the same amount of money as the amount of the payment intent
But also add additional with the Transfer I am trying to make
Why do you want to make the additional transfer? If you're already transferring the full amount to the connected account, there's no more for you to transfer?
The transfer is from the platform account
The system is using vouchers
And i want to transfer the discount from the voucher
If you want to transfer ADDITIONAL funds (so more than the original payment intent charged for) then you should create the transfer and not set source_transaction
Yea, it seems like this field is not usable in this case
Do you know how to ensure the money from the payment intent(charge) are available for payout
Because either way the connected account will receive the ADDITIONAL funds before the other money are availabe;
That is why I was trying to use the source_transaction option
You can check the Balance Transaction (https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-available_on) to see when those funds should be available
and you can get to the balance transaction from the charge (https://stripe.com/docs/api/charges/object#charge_object-balance_transaction)
Oh okay this might help
Do you think this is a reliable flow
To use transfer to send money to the connected account when a customer uses a voucher to give the rest of the money to the seller
And then make this transfer only when the balance transaction is available
yeah that sounds like it would work
One last question
Can this balance transaction available be tracked with webhook
Since that is when the transfer should happen
There's the balance.available webhook event, but that only notifies you when your overall available balance has changed - it doesn't notify you about individual transactions