#dadahumpa_code
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/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.
- dadahumpa_oath-connect-onboarding, 15 hours ago, 53 messages
- dadahumpa_connect-payments-apis, 22 hours ago, 80 messages
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
Where do I get the data from to do the source_transaction?
The successful payment intent's latest_charge field will have the charge ID that you can pass as a source transaction
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,,
});
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
Okay so by adding transfer_group I should solve it?
Correct
However, this way it takes into account my main account times not the connect times?
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.
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
If you use on_behalf_of, we use the setting from the connected account. If you don't, we use the setting from your platform account https://docs.stripe.com/connect/manage-payout-schedule#delay_days
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
},
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?
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
Can you share the Request ID where you saw that error please?
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
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.
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
Cool. Can you share a Request ID with me please? Or a Payment Intent ID?
You can't test in livemode, it's a violation of Stripe's Terms of Service.
You need to use your Test API Keys and therefore testmode while you're testing.
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.
That ... is testing.
Your Payment Link wasn't created for Connect: https://dashboard.stripe.com/logs/req_2NnhLraof9GaNG
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
I don't understand what you mean.
Can you explain to me what your application does?
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.
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.