मुख्य सामग्री पर जाएं
DELETE
JavaScript
ग्राहक के खाते से एक सहेजा गया भुगतान विधि हटा दें। पुराने या अवांछित भुगतान विधियों को साफ करने के लिए इसका उपयोग करें।
आप किसी active subscription द्वारा उपयोग की जा रही payment method को delete नहीं कर सकते। API 409 Conflict को Payment method is in use by an active subscription के साथ लौटाता है। पहले Payment Method अपडेट करें का उपयोग करके subscription को किसी अन्य payment method पर ले जाएँ, फिर पुरानी payment method को delete करें।
सफल delete करने पर 204 No Content लौटता है।

उपयोग के मामले

  • Customer request: वह payment method हटाएँ जिसे customer अब रिकॉर्ड में नहीं रखना चाहता
  • Expired cards: समाप्त हो चुके card विवरण वाली payment methods को साफ़ करें
  • Security: compromised payment methods को तुरंत हटाएँ

प्राधिकरण

Authorization
string
header
आवश्यक

Send your API key as a bearer token: Authorization: Bearer <api_key>. A test mode key starts with dodo_test_, for example dodo_test_AbCd1234EfGh5678.<secret>. A live mode key starts with dodo_live_. Use a test mode key on test.dodopayments.com and a live mode key on live.dodopayments.com. Keys from before these tags have no tag and operate as before.

पथ पैरामीटर

customer_id
string
आवश्यक

Customer Id

payment_method_id
string
आवश्यक

Payment Method Id

प्रतिक्रिया

Payment method deleted successfully

अंतिम संशोधन 6 अगस्त 2026