not_permitted HTTP 402 Stripe Declines

Stripe Error: not_permitted –

The Stripe not_permitted error occurs at the API level when a payment attempt is made for an account that does not have permission to process transactions. This can happen due to various reasons such as incorrect account information, insufficient funds, or account restrictions. It's essential to note that this error does not indicate a technical issue with the payment gateway itself but rather a problem with the account's permissions.

Official documentation ↗

Root Causes

1.

Incorrect Account Information

Provided account details may be incorrect or outdated.

2.

Insufficient Funds

The account does not have sufficient funds to process the transaction.

3.

Account Restrictions

The account is restricted from processing transactions due to various reasons.

Resolution

1.Verify Account Information

Check if the provided account details are correct and up-to-date.

2.Update Account Funds

Ensure the account has sufficient funds to process the transaction.

Code Examples


            stripe.api_key = 'YOUR_TEST_SECRET_KEY'
charge = stripe.Charge.create(amount=100, currency='usd', source='tok_visa')
          

            const stripe = require('stripe')('YOUR_TEST_SECRET_KEY');
const charge = await stripe.charges.create({ amount: 100, currency: 'usd', source: 'tok_visa' });
          

            Stripe\Stripe::setApiKey('YOUR_TEST_SECRET_KEY');
$charge = Stripe\Charge::create(['amount' => 100, 'currency' => 'usd', 'source' => 'tok_visa']);
          

            curl -X POST https://api.stripe.com/v1/charges \
-H 'Authorization: Bearer YOUR_TEST_SECRET_KEY' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'amount=100&currency=usd&source=tok_visa'
          

FAQ

What does Stripe's not_permitted error mean?

The not_permitted error indicates that the payment attempt was made for an account without permission to process transactions.

How do I resolve the not_permitted error?

To resolve this issue, verify your account information and update it if necessary. Ensure your account has sufficient funds to process the transaction.

Independent reference. Always verify against the official Stripe Declines documentation.