简体   繁体   中英

Stripe account capabilities set but still throws an error

I did create Stripe Account using the following parameters:

stripe.accounts.create({
      type: 'custom',
      business_type: 'individual',
      individual: {
        email: user.email,
        first_name: user.firstName,
        last_name: user.lastName
      },
      requested_capabilities: ['card_payments', 'transfers'],
      email: user.email,
      tos_acceptance: {
        date: Math.floor(Date.now() / 1000),
        ip: user.ip
      }
      })

But if I am trying to create transfer, I get the following error:

Your destination account needs to have at least one of the following capabilities enabled: transfers, legacy_payments

This is how I create the transfer:

stripe.transfers.create({amount, currency, destination, transfer_group})

It seems weird because the required capabilities are set as you can see. I do not know how to debug further. Any help is appreciated!

The reason the transfer is failing is that onboarding is not complete - there are requirements for the "transfer" capability to be enabled. When creating the account you have only "requested" the correct capabilities but they are not yet granted.

Simply fetch the account based on the id and see what fields are are required and provide them - either on your end by updating the account through the API or in the Stripe web admin if you only want to quickly provide everything so you can test. (The stripe web admin has all the fields required for full onboarding of an account)

Once the transfers capability requirements are fulfilled, it will be granted and it will turn green. After that transfers will be allowed. (Similar thing goes for the "card payments" capability. Regarding the "legacy" capability you should not use that anymore since it will become deprecated in March 31 2020)

(you might even need to supply an external bank account, you can get that here )

I had the same problem and i added this code if you are using python:

stripe.Account.modify(
               "acct_1JKoh0PpggScpyQX", //this is the account id
                tos_acceptance={
                    'date': int(time.time()), //import time
                    'ip': '8.8.8.8', // Depends on what web framework you're using
                }
            )

else other language check this link https://stripe.com/docs/connect/updating-accounts#tos-acceptance

this code indicate to Stripe that a connected account accepted the Stripe Connected Account Agreement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM