#theproofficial

1 messages ยท Page 1 of 1 (latest)

long sageBOT
ember ibex
frosty hare
#

is this it? req_ms7XahJ3GrtE3z

ember ibex
#

Yep ๐Ÿ‘€

#

You're passing the wrong ID to the account parameter. Expects a acct_xxx ID, but you're sending a cus_xxx ID (Customer object)

frosty hare
#

// If the user doesn't have a connected Stripe account, create one for them
if (!user.connectedStripeAccountId) {
const account = await stripe.accounts.create({
type: "express",
// Add additional details for the account, if needed
});

      user.connectedStripeAccountId = account.id;
      await user.save();

      if (user.stripeCustomerId) {
        // Create an Account Link for the user
        const accountLink = await stripe.accountLinks.create({
          account: user.connectedStripeAccountId,
          refresh_url: "https://your-website.com/refresh",
          return_url: "https://your-website.com/return",
          type: "account_onboarding",
        });
#

Any idea where I went wrong?

#

I seem to be passing the connected account ID but that's not what it receives ๐Ÿค”

ember ibex
#

I would suggest logging user.connectedStripeAccountId to ensure it is what you think it is

frosty hare
ember ibex
#

Hmm, the logs of the API request you shared suggest otherwise

#

Are you sure that's the code that triggers that request? Can you attempt it again and re-share the req_xxx?

sweet vector
#

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

frosty hare
#

I currently get this error: Error processing withdrawal: Your destination account needs to have at least one of the following capabilities enabled: transfers, crypto_transfers, legacy_payments

#

How do I enable them programmatically?

#

Nevermind, I think I got it, but now it told me to contact you: Your platform needs approval for accounts to have requested the transfers capability without the card_payments capability. If you would like to request transfers without card_payments, please contact us via https://support.stripe.com/contact.

sweet vector
#

do you know what type of charges are you going to use?

frosty hare
#

Separate charges and transfers

sweet vector
#

if you only wish to give your accounts the transfer capability without the card_payments, then as the message says you need to contact support https://support.stripe.com/?contact=true and ask whether you are eligible for this

#

otherwise you need to give both capabilities

frosty hare
#

With paymentIntent, I can use "confirm" to make sure that I have received the payment: const paymentIntent = await stripe.paymentIntents.create({
amount: amountInCents,
currency: "usd",
payment_method: paymentMethod.id,
customer: user.stripeCustomerId,
confirm: true,
});

#

Can I do the same when doing transfers?

#

I know "confirm" doesn't work, so I am asking if there is another method of checking whether the funds have been transferred