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
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.
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.
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.
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.
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):
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
.
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];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With