#Mahesh K
1 messages · Page 1 of 1 (latest)
Can you share the request ID (req_xxx) where you faced the error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_A1H48OA9gy2cSx
what i am doing is,
i am trying to create an invoice in an account
and gave the transfer destination as the same account id.
is it possible or is there another way to do that.
cus_Ng1cxkJBb7uWcp belongs to acct_1MtmZ0Qwx0sqePgh whereas you're trying to access from the API key of acct_1MlDrrJFyf0NJAEU. You should use the API key of acct_1MtmZ0Qwx0sqePgh instead
sorry it has solved
i think i have sent you the wrong request id.
wait a sec...
req_O8uIyv3KiaiM8S
this is the request id, that i am getting the above error
river are you there??
and provide me a solution for the above error
You use Stripe-Account header in the request which means that request is directly made on the connected account instead of platform
Can you share what you're trying to do?
i am trying to create an invoice in the connect accounts.
instead in the main account
and i gave the transfer destination to the same account.
is it possible to do like that?
did you got my point?
What do you want to create to create the invoice on the connected account and transfer the fund to itself?
Yup! I'm here. Discord is shared public channel, so it can get busy
If you create an invoice directly on the connected account, you don't have to make a transfer destination since this is a Direct Charge [0]. Fund will go to connected account by default.
then how to transfer the charges amount to my platform?
You can set application_fee_amount in the invoice creation request: https://stripe.com/docs/api/invoices/create#create_invoice-application_fee_amount
You may refer to the doc here: https://stripe.com/docs/invoicing/connect#collecting-fees
could you share the charges that will cut for my connected accounts.
on a successful collecting amount and transfer to their bank account
application_fee_amount is the amount that will be received by the platform. The remaining amount after deducting the application_fee_amount is the amount that the connected account will received.
ok river.
Then, no need to carry out the payout soon after the direct charges, right?
here in my scenario.
Payout is from the connected account's balance to its bank account. Payout speed depends on the connected account's payout schedule. You can use the default payout schedule unless there's other requirements
is it required to do payout using payout api , our the stripe attomatically sends the amount to connected bank accounts.
It depends on the payout schedule set on the connected account: https://stripe.com/docs/connect/manage-payout-schedule
By default, the payout schedule is automatic unless you set it to manual payout
req_dSzW5lEjutapC0
can you check with this request.
await stripe.invoiceItems.create(
{
customer: stripe_customer_details.id,
invoice: stripe_invoice_details.id,
price_data: {
currency: 'USD',
unit_amount: items.si_price * 100,
tax_behavior: 'exclusive',
product: stripe_product_details.id,
},
quantity: items.si_qty,
stripeAccount: accountID
},
)
this is the code i wrote.
From https://dashboard.stripe.com/test/logs/req_dSzW5lEjutapC0, your request body is empty
yes
you can see my code in the above
is there any changes need to be done for the above.
You should create an invoice first, then add invoice items to the invoice as described here: https://stripe.com/docs/invoicing/integration
invoice: stripe_invoice_details.id,
Your code looks correct. Can you share the full code from creating the invoice?
yes
Can you double check if the above code is indeed executed? Your stripeAccount seems to be at the wrong place. It should be something like:
stripe.invoiceItems.create(
{
customer: stripe_customer_details.id,
invoice: stripe_invoice_details.id,
price_data: {
currency: 'USD',
unit_amount: items.si_price * 100,
tax_behavior: 'exclusive',
product: stripe_product_details.id,
},
quantity: items.si_qty,
}, {
stripeAccount: accountID
}
)
Glad to hear that it works!
stripe_product_details = await stripe.products.create(
{
name: items.si_part_num,
},
{
stripeAccount: accountID
}
i am trying to create a product in connected account
is it the way to create a product in the connected account
You can create a product with additional stripeAccount header: https://stripe.com/docs/products-prices/manage-prices?dashboard-or-api=api#create-product
For example,
const product = await stripe.products.create({
name: 'Basic Dashboard',
default_price_data: {
unit_amount: 1000,
currency: 'usd',
recurring: {interval: 'month'},
},
expand: ['default_price'],
}, {
stripeAccount: accountID
});
let me check..
No problem! Happy to help 😄
may i know how to add multiple bank account to connect account
Do you mean payout bank on the standard connected account?
For standard connected account, each currency settlement can only have one payout bank account. Standard connected account user is able to set the payout bank account in https://dashboard.stripe.com/settings/payouts