#akshay-santoki_api

1 messages ¡ Page 1 of 1 (latest)

dawn canopyBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1311931304241004605

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

daring estuary
#

Could you share the use case why your transfer amount is more than the charge amount?

dawn canopyBOT
topaz helm
#

in my project refer and earn through customer get real amount in wallet. when customer charge payment then he was subtract wallet amount and after charge payment.

For ex.

Customer project (need to pay) amount = $550
Customer wallet amount = $50

Now customer was charge $500 ($500 real payment + $50 wallet payment)
but i nned to transfer $550 in connected account because connected account and wallet no connection in my project.

payment amount $550
customer wallet amount $50

Customer paid amount $500 (which was available in stripe main account)

Now after some time, i nned to transfer $550 in connected account. So, how manage this case?

fickle wolf
#

you can transfer without a source_transaction, i'll recommend that you wait for the original payment funds to become available first though - e.g. listen for the payment_intent.succeeded event. Upon receipt of that event, make a request to retrieve the latest_charge [0][1] and expand [1] the response to include balance_transaction. The corresponding Balance Transaction in the response will contain available_on [2] which shows when the funds will be available to be paid out

[0] https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges-data
[1] https://stripe.com/docs/api/charges/retrieve
[2] https://stripe.com/docs/api/expanding_objects
[3] https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-available_on

topaz helm
#

i have full idea about amount and balance availability but without source_transaction i am not able to transfer amount to connected account

fickle wolf
#

why can't you transfer without source_transaction? have you tried based off what I just mentioned?

fickle wolf
topaz helm
#

req_2TqwvhIvjPQYYQ

fickle wolf
topaz helm
#

then return this error:-

#

{
"error": {
"code": "balance_insufficient",
"doc_url": "https://stripe.com/docs/error-codes/balance-insufficient",
"message": "You have insufficient available funds in your Stripe account. Try adding funds directly to your available balance by creating Charges using the 4000000000000077 test card. See: https://stripe.com/docs/testing#available-balance",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_eHso6u68OsGrno?t=1732860592",
"type": "invalid_request_error"
}
}

Learn more about error codes and how to resolve them.

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

#

in my stripe main account funds available

fickle wolf
#

that's why i said you need to wait for the original payment funds to become available first

#

if you want to test this out, then like what the error message said,

Try adding funds directly to your available balance by creating Charges using the 4000000000000077 test card

#

what this really boils down to is that, when creating the Transfer, if you don't specify the source_transaction, it'll always try to use the funds from your available balance. You need to check to ensure that you have sufficient available card balance - https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types-card before making a transfer

#

I'll also recommend that you change your automatic payout schedule to a non-daily flow, otherwise you will never have enough funds in your balance to transfer