#antoine-step_api

1 messages ¡ Page 1 of 1 (latest)

raven pewterBOT
#

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

solid tundra
#

Please check my previous thread for some context

cyan wasp
#

We cannot use dashboard links. Please just provide the ID

solid tundra
#

pi_3SDuNpCYBsZmZGQE0Vp8muPS

cyan wasp
#

In the previous thread, we told you not to use 4242

#

Use one of the cards that bypasses the pending balance, like 4000000000000077

solid tundra
#

"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

cyan wasp
#

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

solid tundra
#

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

cyan wasp
#

This is also expected, at least from my read of the docs

#

Oh wait

solid tundra
#

no, the docs say that money will be taken out from teh pending balance

#

until the charge is completed

cyan wasp
#

nope you are missing the source_transaction param

#

source_transaction: null, in the response

#

You didn't link it to any charge

solid tundra
#

then there is a mistake from my end

#

but can you confirm to me that if i fill it, i will reach my goal ?

cyan wasp
#

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

solid tundra
#

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

cyan wasp
#

For this particular transfer, it looks like you need to use this Charge ID: ch_3SDuNpCYBsZmZGQE0SKVNlJJ

#

From the Invoice

solid tundra
#

so i need to expand the invoice object to get the charge?

cyan wasp
solid tundra
#

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 ?

cyan wasp
#

I think you want expand: ['subscription', 'payment_intent']

#

And then get invoice.payment_intent.charge which will be the ID

solid tundra
#

alright thank you!