#feni-patel_api

1 messages ¡ Page 1 of 1 (latest)

oblique totemBOT
#

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

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

boreal merlin
#

@next fern Hello

#

I have set up one main account into stripe. but when i try to create the payment intent into test mode,it is creating and getting payment intent id. but when i am trying to transfer the money into multiple accounts then i am getting below error.
"Payment Failed: You have insufficient available funds in your Stripe account. Try adding funds directly to your available balance by creating Charges using the 4000000000000077 test card. See: https://stripe.com/docs/testing#available-balance"

next fern
boreal merlin
#

const merchantTransfer = await stripe.transfers.create({
amount: Math.round(paymentDetails.merchantAmount.totalAmount * 100),
currency: 'usd',
destination: paymentDetails.merchantAmount.acountId,
transfer_group: bookingDetails._id.toString(),
//source_transaction: stripePaymentId
});
this is how i transfering the amounts into connected account from main account

next fern
#

Why have you commented out the source_transaction?

boreal merlin
#

bcz i am confused should i use or not ? so can you explain what does this flag do ?

next fern
#

source_transaction allows you to specify a successful Charge to draw the funds from for the Transfer. This allows you to make the Transfer even if your Stripe balance is still pending.

boreal merlin
#

Okay, go it let me try with use of source_transaction

boreal merlin
#

I am using the saparet charge and transfer method where first transcation goes to the main account, then from main account it will goes to connected account, so what should i write in source_transaction?

next fern
#

You should get the ID of the successful Charge and use it for source_transaction

#

How are you charging the customer in the first place?

oblique totemBOT
boreal merlin
lusty palm
#

hi! I'm taking over this thread.

boreal merlin
#

I have used two apis for stripe, one is create payment intenet and second is transfer.

const response = await stripe.paymentIntents.create({
amount:finalAmountWithTax * 100,
currency: 'usd',
payment_method_types: ['card'],
description: Payment for booking ID: ${bookingDetails._id.toString()},
transfer_group: bookingDetails._id.toString()
});

#

I am not using any cutomer thing

lusty palm
#

so just use the PaymentIntent ID for the source_transaction when creating the Transfer.

boreal merlin
#

so my next question is do i need to use the customer data?