Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add credit card to a managed account on Stripe

I'm working with Stripe managed accounts, I can create and retrieve Accounts without problem, but I can not add credit cards to any Stripe Account. I'm using Stripe.js to deal with the card creation process, so in the views I collect the card fields and let Stripe.js do the dirty job of validation and processing. If everything is ok, I receive a stripeToken from Stripe which is used in my controller to finally associate the managed account and the credit card.

However I receive this error:

Error creating card: (Status 400) You must provide a card that has the 'currency' field set when adding a card to a Stripe account.

Therefore I assumed I needed to add the currency field in the Card form, so I tried again and then I had this error:

This card doesn't appear to be a debit card. (when submitting currency from views)

I already tried to search the error, but somehow there are no real references or previous answers.

Does anyone know how I can resolve this problem?

Thanks in advance!


Details

Since I'm testing on my local machine, I'm using Stripe's test Card number: 4242424242424242 which accepts any expiration date and CVC

Here is some code:

This is how I create my managed account:

def create_account(email)
  Stripe::Account.create(
    {
      :country => "US",
      :managed => true,
      :email => email,
      :default_currency => "USD"
    }
  )
end

This is how I add the card token to the accounts (based on the API docs):

def add_card_to_account(account_id, card_token)
  account = get_account(account_id)
  account.external_accounts.create(:external_account => card_token)
end
like image 463
mcKain Avatar asked Feb 23 '16 05:02

mcKain


People also ask

How do I add a card to my Stripe account?

From the Stripe dashboard side menu, click on Settings and then click on Bank accounts and scheduling. Click + Add bank account. Enter bank account details. Click Add Bank Account to save.

How do I enable payment method on Stripe?

You can view a list of available alternative payment methods that you can accept in your Payments settings dashboard. Click Request Access next to the payment method you want to allow. You may be asked to provide additional information required by the scheme, or agree with a specific addendum to our Services Agreement.

Why is my Stripe account not eligible?

Quite simply, Stripe can't support businesses selling or supporting illegal products or services. Many financial institutions enforce a blanket-ban on products that are legal in some states but not others.

What credit cards work with Stripe?

Supported cards Users in the United States can accept: Visa, Mastercard, American Express, Discover, JCB, Diners Club, China UnionPay, debit cards. Stripe also supports a range of additional payment methods, depending on the country of your Stripe account.


2 Answers

Stripe accounts are payment destinations -- they can receive funds, but not provide them.

(Customers are payments sources, i.e. they provide funds.)

Currently, Stripe accounts can use two different sorts of external accounts as payout methods (i.e. to retrieve their funds):

  • bank accounts
  • debit cards (only in the US)

So you can add a debit card as an external account to a US custom account, but not a credit card as those cannot be used to receive funds.

In order to use a debit card as a payout method, the card token must have been created with Stripe.js, using the currency parameter. Since this is only possible for US accounts at the moment, the value for the currency parameter must be "usd". Here's a simple example of a Stripe.js form that uses the currency parameter: https://jsfiddle.net/ywain/rprufyg5/

In test mode, you would need to use one of the debit testing card numbers, e.g. 4000 0566 5566 5556 or 5200 8282 8282 8210.

like image 147
Ywain Avatar answered Oct 24 '22 03:10

Ywain


I have the same issue. I have contacted them i found some solution for me. I am generating token using iOS Stripe SDK. Its worked for me.

At this time Stripe only supports US-based USD debit cards for card external_accounts. The way you can add the currency parameter to your token is by adding a direct call to

self.paymentTextField.cardParams.currency = @"usd"; 

after initializing the STPPaymentCardTextField in your PaymentViewController, like such:

// Setup payment view
STPPaymentCardTextField *paymentTextField = [[STPPaymentCardTextField alloc] init];
paymentTextField.delegate = self;
paymentTextField.cursorColor = [UIColor purpleColor];
self.paymentTextField = paymentTextField;
self.paymentTextField.cardParams.currency = @"usd";
[self.view addSubview:paymentTextField];
like image 36
Piyushkumar Avatar answered Oct 24 '22 04:10

Piyushkumar