#feni-patel_api

1 messages ยท Page 1 of 1 (latest)

winter ravineBOT
#

๐Ÿ‘‹ 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/1306592278629978163

๐Ÿ“ 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.

frozen tangle
#

Hello @analog shadow

#

I am using saparate charge and transfer method. first i have created payment intent id. and used that id for transfering the amount into connected accounts. but for transfering the amount i am getting the error like "Payment Failed: No such charge: 'pi_3QL1mfFhYfQgOdcB0YUs8Yrs'" and below is my payload.
{
"bookingId": "6735e74a708aa460a84e1c2b",
"paymentIntentId": "pi_3QL1mfFhYfQgOdcB0YUs8Yrs",
"paymentMethodId": "pm_card_visa"
}

analog shadow
#

hi! what's the request ID req_xx from the error?
what's the actual API call/code used? (what you shared looks like a payload you sent to some service/wrapper on your side that then calls the API, I need to see your actual code that calls our API, not that).

frozen tangle
#

Okay sure,

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()
});
console.log("response",response)

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: paymentIntentID
});

#

req_4ZrYsRDAceASZy this is the req id

analog shadow
#

source_transaction: paymentIntentID
that's not corrrect. It would be paymentIntent.latest_charge , assuming you have a variable paymentIntent that is the successful PaymentIntent.

frozen tangle
#

pi_3QL1mfFhYfQgOdcB0YUs8Yrs this is the payment intent id

analog shadow
#

did you see and understand my answer above? that's the solution to your problem.

winter ravineBOT
fringe temple
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!