# Unenroll Payment Method

Unenroll a saved payment method for the user. Once you've done the POST to the unenrollment endpoint, the payment method status will be changed to UNENROLLED.

<Note>
**Unenrollment Information**

To unenroll the payment method, you need to provide the `payment_method_id`, which is the `vaulted_token` received when using the [Enroll Payment Method](/reference/enroll-payment-method-api) endpoint.
</Note>

**POST** `/customers/{customer_id}/payment-methods/{payment_method_id}/unenroll`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Unenroll Payment Method

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)
- X-Idempotency-Key (apiKey in header)

## Path parameters

- `customer_id` (string, required)
  The unique identifier of the customer (UUID, 36 chars).
- `payment_method_id` (string, required)
  The unique identifier of the payment method. This is the `vaulted_token` received when enrolling a payment method using [Enroll Payment Method](/reference/enroll-payment-method-api) (UUID, 36 chars).

## Responses

### 200

200

- `id` (string)
- `account_id` (string)
- `name` (string)
- `description` (string)
- `type` (string)
- `category` (string)
- `country` (string)
- `status` (string)
- `created_at` (string)
- `updated_at` (string)
- `enrollment` (object)
  - `session` (string)
  - `sdk_required_action` (boolean)
- `provider` (object)
  - `id` (string)
  - `type` (string)
  - `provider_status` (any)
- `verify` (object)
  - `vault_on_success` (boolean)
  - `payment` (any)
- `preferred` (any)

Example:

```json
{
  "id": "cbdcc878-ceb4-4dd8-b0f0-49d444855de0",
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "name": "VISA ****1111",
  "description": "VISA ****1111",
  "type": "CARD",
  "category": "CARD",
  "country": "US",
  "status": "UNENROLLED",
  "created_at": "2024-06-06T13:32:49.715656Z",
  "updated_at": "2024-06-06T13:37:38.891106Z",
  "enrollment": {
    "session": "",
    "sdk_required_action": true
  },
  "provider": {
    "id": "YUNO",
    "type": "YUNO",
    "provider_status": null
  },
  "verify": {
    "vault_on_success": false,
    "payment": null
  },
  "preferred": null
}
```

### 400

400

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "INVALID_REQUEST",
  "messages": [
    "Invalid request"
  ]
}
```

### 401

401

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "INVALID_CREDENTIALS",
  "messages": [
    "Invalid credentials"
  ]
}
```

### 403

403

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "AUTHORIZATION_REQUIRED",
  "messages": [
    "The merchant has no authorization to use this API."
  ]
}
```