Detach a PaymentMethod from a Customer

POST /v1/payment_methods/:id/detach

Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer.

Parameters

No parameters.

Returns

Returns a PaymentMethod object.

curl -X POST https://api.stripe.com/v1/payment_methods/{{PAYMENT_METHOD_ID}}/detach \
-u "sk_test_Hrs6SAopgFPF0bZXSN3f6ELNsk_test_Hrs6SAopgFPF0bZXSN3f6ELN:"
Response
{
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "unchecked"
},
"country": "US",
"exp_month": 8,
"exp_year": 2026,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1679945299,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.