अवलोकन
जब भी 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या उससे अधिक।
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 के माध्यम से संभालना बेहतर होता है।
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 देखें।
Related
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।