#dadahumpa_code

1 messages · Page 1 of 1 (latest)

uncut wingBOT
#

👋 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/1356643249959469266

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

glass tide
#

Hello, this is likely happening because of how balances work. Basically, because it takes a few days for the funds from a payment to land in Stripe, funds from a payment initially go to your pending balance. When the funds arrive they move to your available balance. Transfers come out of your available balance, but we have a parameter that can help you here. If you specify source_transaction as the ID of the successful charge here, you can initiate the transfer now, but we will wait for the funds from that payment to become available before actually transferring them.
https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-availability

lime zodiac
#

Where do I get the data from to do the source_transaction?

glass tide
#

The successful payment intent's latest_charge field will have the charge ID that you can pass as a source transaction

lime zodiac
#

i got this error is fixable?

Type 'string | Charge | null' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.ts(2322)

const transfer = await stripe.transfers.create({
amount: paymentIntent.amount,
currency: paymentIntent.currency,
destination: connectedAccountId,
transfer_group: paymentIntent.id,
source_transaction: paymentIntent.latest_charge,,
});

glass tide
#

It is, but I'm not the most familiar with typescript so I'm not immediately sure on the cleanest fix. As long as the payment intent is in a succeeded state that field won't be null, and if you didn't pass latest_charge as an expand parameter, that value will always be a string.

#

So you may be able to do something to remove the charge and null types as a possibility there

lime zodiac
#

Okay so by adding transfer_group I should solve it?

glass tide
#

Correct

lime zodiac
#

However, this way it takes into account my main account times not the connect times?

glass tide
#

Can you tell me more about what you mean by that?
If you are talking about the time that the funds settle, that is based on the payment method and when the payment is initiated, it shouldn't be effected by an account's timezone.

lime zodiac
#

I didn't mean from the time zone, then on another stripe account where I have 3-day payments when I make the transfer it gives me them immediately available in the connect.
Whereas now with this modification it gives them to me in 7 days

uncut wingBOT
glass tide
lime zodiac
#

So in this case I could put on_behalf_of in 3 days?

"payouts": {
"debit_negative_balances": true,
"schedule": {
"delay_days": 3,
"interval": "manual"
},
"statement_descriptor": null
},

worthy holly
#

Hi hi! I’m going to be taking over for my colleague here.

#

That might be possible, but it depends on a lot of factors. What exactly are you trying to do here?

lime zodiac
#

this account also has instant payout but I don't see it from the query

#

I didn't mean from the time zone, then on another stripe account where I have 3-day payments when I make the transfer it gives me them immediately available in the connect.
Whereas now with this modification it gives them to me in 7 days

worthy holly
#

Can you share the Request ID where you saw that error please?

lime zodiac
#

No it is not a error, what I am saying is something else.
I'm saying I have a stripe account with the same connect I make a payment I transfer it and I get the funds right away.
I have this other stripe account connected with the same connect and when I send a payment I receive it in 7 days.
I can't understand how this is possible....

#

Same credit card same everything, one instant the other 7 days

worthy holly
#

We are talking about multiple different things at the same time here. Payouts and Transfers are different.

Please share the Request ID for the request where you saw that error.

lime zodiac
#

I transfer the funds, to an account and that one as it sees that I transferred the funds tells me that they are coming right away.
This other account I transfer the funds and it tells me they arrive in 7 days

worthy holly
#

Cool. Can you share a Request ID with me please? Or a Payment Intent ID?

lime zodiac
#

yes

#

pi_3R973ALC99Fjeqf11HpiDyWk

worthy holly
#

You can't test in livemode, it's a violation of Stripe's Terms of Service.

lime zodiac
#

How do you mean?

#

I did not know this

worthy holly
#

You need to use your Test API Keys and therefore testmode while you're testing.

lime zodiac
#

Ok

#

How do I test this though in the test environment?
Here we are talking about a practical thing and then I don't need to test it I was just seeing that all the code was working correctly as I expected.

worthy holly
#

That ... is testing.

lime zodiac
#

Yes but this solution doesn't work for me, because these payment links I can't put in the checkout as I didn't write it.
I can't use a payment link for example inside shopify

worthy holly
#

I don't understand what you mean.

#

Can you explain to me what your application does?

lime zodiac
#

I rely on a saas solution not owned by me where I don't have access to the code.
So when a payment comes in I need to move it to the connect.
That's why I can't use the payment links.

worthy holly
#

I think you should reach out to support and talk about what you're trying to do and make sure that Stripe can actually support it; I'm not sure what exactly you are trying to do here but I'm not sure it's something that's going to work.