revocation_of_authorization HTTP 402 Stripe Declines Stripe Error: revocation_of_authorization –
When the card was declined for an unknown reason, it indicates that the payment gateway has revoked the authorization for the transaction. This error does not mean that the card is invalid or that there are insufficient funds; rather, it signifies a problem with the payment processing flow.
Root Causes
Authorization Revocation
The payment gateway has revoked the authorization for the transaction due to various reasons such as security concerns or account issues.
Insufficient Information
There might be a lack of necessary information provided by the customer during the payment process.
Resolution
1.Verify Payment Method
Check if the card details are correct and up-to-date.
2.Retry Transaction
Attempt to process the payment again with the same card details.
Code Examples
stripe.api_key = 'YOUR_STRIPE_API_KEY'
try:
charge = 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);
}
<?php
$stripe = array('secret_key' => 'YOUR_STRIPE_API_KEY', 'publishable_key' => 'YOUR_PUBLISHABLE_KEY');
try {
$charge = \
Stripe\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 \
-H 'Authorization: Bearer YOUR_STRIPE_API_KEY' \
-d 'amount=100¤cy=usd&source=tok_visa'
FAQ
What does 'revocation of authorization' mean? ▾
It means that the payment gateway has revoked the authorization for the transaction due to various reasons such as security concerns or account issues.
How do I resolve this error? ▾
You can try verifying the payment method and retrying the transaction.
Independent reference. Always verify against the official Stripe Declines documentation.