Skip to main content

अवलोकन

जब भी payment attempt असफल होता है, Dodo Payments failure reason का विस्तृत विवरण लौटाता है। ये reasons सभी payment methods और providers में standardized हैं, इसलिए आप अपने application में consistent handling लागू कर सकते हैं। जब payment fail होता है, तो payment.failed webhook और payment object ये जानकारी उपलब्ध कराते हैं:
  • error_code — नीचे दी गई तालिका से एक standardized failure reason।
  • error_messageआप, यानी merchant, के लिए लिखा गया human-readable explanation। जब error_code नीचे दिए गए standardized codes में से एक होता है, तो यह payment processor के raw text के बजाय headline और recommended action होता है।
  • retry_attempt — मूल charge के लिए 0, और प्रत्येक scheduled subscription renewal retry के लिए 1 या उससे अधिक।
इन failure reasons को समझने से आप customers को स्पष्ट feedback दे सकते हैं, तय कर सकते हैं कि retry करना उचित है या नहीं, और अधिक revenue recover कर सकते हैं।

Merchant Copy बनाम Customer Copy

हर standardized failure code दो अलग-अलग messages से जुड़ा होता है, ताकि सही audience को सही स्तर की जानकारी दिखाई दे:
Customer Portal customer-facing wording को error_message में लौटाता है, जबकि merchant API उसी payment के लिए merchant wording लौटाता है। दोनों में error_code समान होता है।

Handle Payment Failures

webhooks और API से इन codes को पढ़ने, customers को दिखाने और retry कब करना है यह तय करने के लिए step-by-step developer guide।

Soft बनाम Hard Declines

हर failure code दो categories में से एक में आता है। यह distinction तय करता है कि आपको उसी payment method को retry करना चाहिए या customer से नया method मांगना चाहिए। Subscription renewals के लिए Dodo Payments इस distinction को automatically लागू करता है: soft declines को Subscription Payment Retries द्वारा फिर से attempt किया जाता है, जबकि hard declines retry chain को तुरंत समाप्त कर देते हैं और इन्हें Subscription Dunning के माध्यम से संभालना बेहतर होता है।
STOLEN_CARD, LOST_CARD, PICKUP_CARD या FRAUDULENT का वास्तविक कारण customer को कभी न बताएं। इन्हें दिखाने से fraudulent actor को संकेत मिल सकता है। Customer को हमेशा generic decline message दिखाएं (उदाहरण के लिए, “आपका card decline हो गया। कृपया अपने bank से संपर्क करें या दूसरा card इस्तेमाल करें।”) और specific code को केवल internally log करें।Dodo Payments अपने नियंत्रण वाले surfaces पर इसे पहले से लागू करता है: इन चार codes के लिए checkout, Customer Portal और dunning emails हमेशा generic decline message दिखाते हैं, जबकि आपकी अपनी copy में वास्तविक कारण रहता है। Merchant API से प्राप्त error_message को customer को दिखाने वाली हर जगह यही नियम लागू करें।

Transaction Failure Reasons

नीचे दी गई तालिका में हर failure code, उसका decline type, customer इसे resolve कर सकता है या नहीं, description और recommended action दिया गया है।
User Error बताता है कि payment decline को customer resolve कर सकता है या नहीं। जब Yes हो, तो customer issue ठीक करने के लिए कार्रवाई कर सकता है (उदाहरण के लिए, सही card details दर्ज करना)। जब No हो, तो decline system-level issues या bank restrictions के कारण है, जिन्हें customer सीधे resolve नहीं कर सकता।
Issuing bank का अपना risk engine cardholder को high-risk customer के रूप में flag करने पर भी card decline हो सकता है — merchant या transaction details से स्वतंत्र रूप से। ऐसे declines आमतौर पर generic codes जैसे DO_NOT_HONOR, GENERIC_DECLINE, CARD_DECLINED, TRANSACTION_NOT_APPROVED या FRAUDULENT के रूप में दिखाई देते हैं। इन मामलों में bank specific reason साझा नहीं करता, और न ही Dodo Payments या merchant इस decision को override कर सकते हैं। Customer से flag resolve करने के लिए अपने bank से संपर्क करने या अलग card अथवा payment method इस्तेमाल करने को कहें।

Programmatically Handling Failures

error_code को payment.failed webhook या payment object से पढ़ें, इसे ऊपर दिए गए recommended action से map करें और तय करें कि retry करना है या नहीं। Subscription renewals के लिए soft declines आपके लिए automatically retry किए जाते हैं — Subscription Payment Retries देखें। API-level और business-logic errors (जैसे PAYMENT_NOT_SUCCEEDED या REFUND_WINDOW_EXPIRED), जो card declines नहीं हैं, उनके लिए Error Codes reference देखें।

Handle Payment Failures

Failed payments का पता लगाने, उन्हें दिखाने और retry करने की end-to-end guide।

Error Codes

Non-decline failures के लिए API और business-logic error codes।

Subscription Payment Retries

Subscription renewals पर soft declines को recover करने वाले automatic retries।

Subscription Dunning

Payment method update का prompt देकर hard declines को recover करने वाले email sequences।

Support

Transaction failures या integration issues में अतिरिक्त सहायता के लिए support@dodopayments.com पर हमारी support team से संपर्क करें।
अंतिम संशोधन 8 अगस्त 2026