invalid_account HTTP 402 Stripe Declines Stripe Error: invalid_account –
When the card or its associated account is invalid, Stripe returns an invalid_account error. This occurs when the payment method's details do not match any existing account in Stripe's system. It does not mean that the account is locked or suspended.
Root Causes
Invalid Card Details
The card number, expiration date, or CVV may be incorrect.
Account Not Found
The account associated with the card is not found in Stripe's system.
Resolution
1.Verify Card Details
Check that the card number, expiration date, and CVV are correct.
2.Update Account Information
Ensure that the account associated with the card is up-to-date in Stripe's system.
Code Examples
stripe.api_key = 'YOUR_STRIPE_API_KEY'
try:
stripe.Charge.create(amount=100, currency='usd', source='tok_visa')
except stripe.error.CardError as e:
print(e)
const stripe = require('stripe')('YOUR_STRIPE_API_KEY');
try {
const charge = await stripe.charges.create({ amount: 100, currency: 'usd', source: 'tok_visa' });
} catch (err) {
console.log(err);
}
require_once('vendor/autoload.php');
use Stripe\Stripe;
use Stripe\Charge;
try {
$charge = Charge::create(array(
"amount" => 100,
"currency" => "usd",
"source" => "tok_visa"
));
} catch (Exception $e) {
echo $e->getMessage();
}
curl -X POST https://api.stripe.com/v1/charges \
-u YOUR_STRIPE_API_KEY: \
-d "amount=100¤cy=usd&source=tok_visa"
FAQ
What does an invalid_account error mean? ▾
An invalid_account error occurs when the card or its associated account is invalid.
How do I resolve an invalid_account error? ▾
Verify the card details and update the account information in Stripe's system.
Independent reference. Always verify against the official Stripe Declines documentation.