# Unenroll Payment Method

Unenroll a previously saved payment method for a customer.

To perform this action, provide the `payment_method_id` in the request path. Once the request is successful, the payment method's status will be updated to `UNENROLLED`, making it inactive and no longer available for use in future transactions.

**POST** `/customers/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)

## Path parameters

- `payment_method_id` (string, required)
  The payment method id to unenroll (UUID, 36 chars).

## Responses

### 200

200

- `id` (string)
- `idempotency_key` (any)
- `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": "77ee4a02-da3e-4a11-ac15-ba69e1813475",
  "idempotency_key": null,
  "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:28:57.149530Z",
  "updated_at": "2024-06-06T13:31:13.945554Z",
  "enrollment": {
    "session": "0685f1d6-11ff-4992-abc3-9eea1842205c",
    "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."
  ]
}
```