Skip to main content
curl -X POST https://api.chargeapi.co/v1/payment_methods/pm_CjymBtwzVrngUAFDpo8uzVZSCG60GbqE/detach \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "fleet": "flt_SgU5VcjfHfnyMvuic6QP3n8LCRzuBshb"
}'
{
    "id": "pm_CjymBtwzVrngUAFDpo8uzVZSCG60GbqE",
    "object": "payment_method",
    "bank_account": null,
    "billing_details": {
        "address": {
            "city": "Paris",
            "country": "FR",
            "line1": "10 Rue de la Paix",
            "line2": "Batiment A",
            "postal_code": "75002",
            "state": "Ile-de-France"
        },
        "email": "example@example.com",
        "name": "Example",
        "phone": "+33189000023"
    },
    "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "fingerprint": "fp_card_example",
        "last4": "4242"
    },
    "created": "2026-04-01T00:28:29.791Z",
    "driver": null,
    "fleet": null,
    "type": "card",
    "wallet": null
}
Detaches a payment method from a driver or fleet. Provide either driver or fleet in the request body.
curl -X POST https://api.chargeapi.co/v1/payment_methods/pm_CjymBtwzVrngUAFDpo8uzVZSCG60GbqE/detach \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "fleet": "flt_SgU5VcjfHfnyMvuic6QP3n8LCRzuBshb"
}'
{
    "id": "pm_CjymBtwzVrngUAFDpo8uzVZSCG60GbqE",
    "object": "payment_method",
    "bank_account": null,
    "billing_details": {
        "address": {
            "city": "Paris",
            "country": "FR",
            "line1": "10 Rue de la Paix",
            "line2": "Batiment A",
            "postal_code": "75002",
            "state": "Ile-de-France"
        },
        "email": "example@example.com",
        "name": "Example",
        "phone": "+33189000023"
    },
    "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "fingerprint": "fp_card_example",
        "last4": "4242"
    },
    "created": "2026-04-01T00:28:29.791Z",
    "driver": null,
    "fleet": null,
    "type": "card",
    "wallet": null
}

Parameters

driver
string
Driver to use for this request.
fleet
string
Fleet to use for this request.

Returns

Returns the payment method.