#shaharyar-ilyas_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/1229926645515812996
đ 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.
- shaharyar-ilyas_code, 1 day ago, 6 messages
Code when i charge fee from connected account for each manul payout:
const application_fee_amount =
calculatePayoutApplicationFeeAmount(amountInCents);
const fund_received = amountInCents - application_fee_amount;
const charge = await stripe.charges.create({
amount: application_fee_amount,
currency: CURRENCY,
source: account_id,
metadata: {
payment_source: account_id,
payment_reason: "instant-payout-fee",
description: `Collect instant payout fee from - ${account_id}`,
},
});
const payout = await stripe.payouts.create(
{
currency: CURRENCY,
amount: fund_received,
method: "instant",
metadata: {
user_id,
account_id,
application_fee_amount,
instant_payout_fee_charge_id: charge.id,
},
},
{
stripeAccount: account_id,
}
);```
Hi there! Have you considered charging the payout fee only after the payout has succeeded?
The issue here is that your platform's balance is currently negative
So you can only refund this charge when your balance in GBP is positive
can i add amount in platform which will available to withraw instantaly
Sure, you can either add to your platform balance from the Dashboard: https://docs.stripe.com/connect/testing#testing-top-ups
or you can create charges with these test card numbers, where funds bypass your pending balance: https://docs.stripe.com/testing#available-balance
i have instant_available balance is 200 pound but still can't able to refund
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
{
"amount": 26701,
"currency": "usd",
"source_types": {
"card": 26701
}
},
{
"amount": 0,
"currency": "gbp",
"source_types": {
"card": 0
}
}
],
"connect_reserved": [
{
"amount": 0,
"currency": "usd"
},
{
"amount": 3774,
"currency": "gbp"
}
],
"instant_available": [
{
"amount": 20073,
"currency": "gbp",
"source_types": {
"card": 20073
}
}
],
"livemode": false,
"pending": [
{
"amount": 0,
"currency": "usd",
"source_types": {
"card": 0
}
},
{
"amount": 20567,
"currency": "gbp",
"source_types": {
"card": 20567
}
}
]```
i think have enough
"amount": 0,
"currency": "gbp",
"source_types": {
"card": 0
}
}```
can i instant amount to be available for testing
I recommend creating a GBP charge with these test card numbers, where funds bypass your pending balance and go immediately to your available balance: https://docs.stripe.com/testing#available-balance
Thanks a lot it will helpfull
const charge = await stripe.charges.create({
amount: application_fee_amount,
currency: "gbp",
source: accountId,
metadata: {
payment_source: accountId,
payment_reason: "instant-payout-fee",
description: Collect instant payout fee from - ${accountId},
},
});
const refund = await stripe.refunds.create({
amount: charge.amount,
charge: charge?.id,
});
i'm using this code it work perfectly
but when i manually refund charge amount from dashboard it will throw error
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hi, @left igloo I'm facing issue on refund charge
what error are you seeing?
The recipient of this transfer does not have sufficient funds in their Stripe balance to reverse this amount.
this charge is created using below code:
amount: application_fee_amount,
currency: "gbp",
source: accountId,
metadata: {
payment_source: accountId,
payment_reason: "instant-payout-fee",
description: `Collect instant payout fee from - ${accountId}`,
},
}); ```
@left igloo
are you there?
so you're trying do refund an account debit?
i'm still looking into this
hrm, pretty certain it's because the connected account doesn't have sufficient funds in it's balance at the moment
I need to refund this amount to that connected account
i understand you need to refund this amount to that connected account, maybe just try adding funds immediately to the connected account using the test card that bypasses the pending balance, then try refunding again to see what happens
Okay
Can I use the transfer api for payout fee to the platform account and then reverse that transfer if needed
Could you please share the doc
I saw the transfer api using for payout fee
But now I didn't find that doc
since you're using instant payouts, i suggest you reach out via https://support.stripe.com/contact/email to see if you can use this beta : https://docs.stripe.com/connect/platform-pricing-tools
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Use platform pricing tools to create pricing schemes.
that way you can automatically collect the instant payout fees