#antoine-step_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1423429333082705993
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- antoine-step_api, 11 hours ago, 27 messages
Please check my previous thread for some context
We cannot use dashboard links. Please just provide the ID
pi_3SDuNpCYBsZmZGQE0Vp8muPS
In the previous thread, we told you not to use 4242
Use one of the cards that bypasses the pending balance, like 4000000000000077
"You can use the card 4242 then for that" is what the moderator said
no i don't want. to bypass the pending baalnce
i want for the transfer to wait till money becomes availble
i don't the transfer to work directly
here is teh transfer ID: tr_1SDuTBCYBsZmZGQEf7PzSBb6
the case i am trying to test:
customer buys a subscription (money needs 2 to 7 business days to become available)
i create a transfer that is 70% of the subscription
I don't want the transfer to happen from the already available balance, I want the transfer to wait and be executed after the 2 to 7 business days
i was under teh impression that specifying the 'source_transaction' attirbute does that
but it is not working like that
You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available
The funds are transfered immediately but not available until the source transaction is available
Which is what we show in our docs: https://docs.stripe.com/api/transfers/create?api-version=2025-09-30.clover&rds=1#create_transfer-source_transaction
but the money was taken out from my available balance
i had 23.70 now i have 20.20
while the pending balance increased
can you make sure if the source_transaction attribute is proparly set in the transaction tr_1SDuTBCYBsZmZGQEf7PzSBb6 ?
maybe i am missing somethign
no, the docs say that money will be taken out from teh pending balance
until the charge is completed
nope you are missing the source_transaction param
In this request: https://dashboard.stripe.com/test/logs/req_rtAnqj1pDHXSr5
source_transaction: null, in the response
You didn't link it to any charge
then there is a mistake from my end
but can you confirm to me that if i fill it, i will reach my goal ?
It looks like you are providing a sub ID and invoice ID in the metadata
I recommend testing this end to end to be 100% certain it behaves how you expect. It shouldn't be difficult
alright i will see why the source_transaction is not properly set and then test
if it doesn't work i'll contact you again
For this particular transfer, it looks like you need to use this Charge ID: ch_3SDuNpCYBsZmZGQE0SKVNlJJ
From the Invoice
so i need to expand the invoice object to get the charge?
For your API version, if you add expand=['latest_invoice.payment_intent',] to your Subscripton API request: https://dashboard.stripe.com/test/logs/req_8tNtcUOfrlGPjD
You will be able to get the Charge ID from the sub.latest_invoice.payment_intent.charge property
and when i am getting the invoice itself through stripe.invoices.retrieve
i can do somethign like this:
const invoice = await stripe.invoices.retrieve(invoiceId, {
expand: ['subscription', 'charge'],
});
?
and then invoice.charge,id ?
I think you want expand: ['subscription', 'payment_intent']
And then get invoice.payment_intent.charge which will be the ID
alright thank you!