#Rishikesh
1 messages ยท Page 1 of 1 (latest)
Sure how can we help?
i am trying to create transfer
from my stripe account to another stripe account
but its giving me No such destination: 'acct_1MqUJqF482Ubl4mG' errir
error
await stripe.transfers.create(
{
amount: 2100, // Amount in cents
currency: "usd", // Currency code
destination: 'acct_1MqUJqF482Ubl4mG',
},
async function (err, transfer) {
if (err) {
console.log(err, "transition error");
}
if (transfer) {
console.log("transfer created");
console.log(transfer, "transfer");
}
}
);
anyone here ??
๐ taking over for my colleague. Let me catch up.
ok
what is your platform account?
@onyx dock please also provide the request id req_xxx
req_JUo5fw1tLE8Mo6
thanks taking a look
ok
ok so what you're doing here is that you're creating a transfer with the platform API keys and a Stripe-Account header meaning you, as a platform, are creating the transfer on behalf of your connected account
but the problem is that the destination is the same connected account
so basically the account acct_1MqUJqF482Ubl4mG (your connected account) doesn't have a connected account with the same ID that's why the API is returning a "missing resource" error
i did not get it
i am trying to transfer amount one account to another account
what is the process for that
the same thing you're doing but you need to remove the Stripe-Account header
ohh ok
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can you provide me some code snippets
so by adding stripe.charges.retrieve('ch_3MtQJeF482Ubl4mG0Q9R7ckP', {
stripeAccount: 'acct_1MqUJqF482Ubl4mG'
});
this to my code my issue will be solve?
no
the problem is in the transfer code
not here
Oh wait!
how are you initializing the stripe variable?
are you passing stripeAccount to the stripe.transfers.create function?
i was but it was not showing in my portal
but in main account its showing successful
but in my account no amount is getting displayed
this was creating new account id every time for same user
you shouldn't be passing the stripeAccount
otherwise it would fail the same way it did with the request you shared
if i wont pass then how to provide destination account?
in the parameters
you're already passing
please keep on using this thread for your messages
ok what changes i have to made
await stripe.transfers.create(
{
amount: 2100, // Amount in cents
currency: "usd", // Currency code
destination: 'acct_1MqUJqF482Ubl4mG',
},
async function (err, transfer) {
if (err) {
console.log(err, "transition error");
}
if (transfer) {
console.log("transfer created");
console.log(transfer, "transfer");
}
}
);
to work this
nothing
sorry had n/w issue
then why transfer is not showing in my account
actually you only need to use
{
amount: 2100, // Amount in cents
currency: "usd", // Currency code
destination: 'acct_1MqUJqF482Ubl4mG',
});```
yes using the same
what's the generated request ID? when you run this code
wait ill genrate it once more
req_s9w7FpMYM1MxJs
No such destination: 'acct_1MqUJqF482Ubl4mG'
error
there's somewhere in your code where you're adding the StripeAccount header
with what you're sharing I'm not seeing it
but please try to look at anywhere in your code where you have stripeAccount: "acct_1MqUJqF482Ubl4mG"
ok just min
no
i have searched in project there is nothing stripeAccount
ok will it reflect immidately ? or will take some time to reflect?
I'm not sure I understand
would you mind sharing your whole code please?
how?
console.log("in api call");
let stripeConfig = Payments.app.get("stripe");
var stripe = require("stripe")(stripeConfig.secretKey);
// const accountLink = await stripe.accountLinks.create({
// account: 'acct_1MqUJqF482Ubl4mG',
// refresh_url: 'https://example.com/reauth',
// return_url: 'https://example.com/return',
// type: 'account_onboarding',
// });
// console.log(link.url);
const accounts = await stripe.accounts.list();
console.log(accounts);
console.log("COM");
await stripe.transfers.create(
{
amount: 2100, // Amount in cents
currency: "usd", // Currency code
destination: 'acct_1MqUJqF482Ubl4mG',
});
this is the function i am using
this is the only code i am using
would you mind sharing the request ID generated from this call
const accounts = await stripe.accounts.list(); ?
Find help and support for Stripe. Our support center 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.
on your dashboard
i dont have access to the dashbard
without that request ID I don't really know how may I help you
you need to ask for a developer user on the dashboard
so you can look at the logs and events