# deleteCustomer

Mutation · GraphQL API

Delete a customer, breaking association between any of the customer's transactions. Will not delete if the customer has existing payment methods.

## Authentication

- SERVER

## Input

- `input` (`DeleteCustomerInput!`) — required

## Returns [DeleteCustomerPayload](/braintree/graphql/reference/types/delete-customer-payload)

Top-level output field from deleting a customer.

### Returned fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.

## Examples

### Delete customer

Top-level input fields for deleting a customer.

```graphql
mutation deleteCustomer($input: DeleteCustomerInput!) {
  deleteCustomer(input: $input) {
    clientMutationId
  }
}
```

### Delete a customer

Deletes a customer by ID. Demonstrates a mutation with minimal input and a minimal response (only clientMutationId).


```graphql
mutation deleteCustomer($input: DeleteCustomerInput!) {
  deleteCustomer(input: $input) {
    clientMutationId
  }
}
```

#### Variables

```json
{
  "input": {
    "clientMutationId": "delete-cust-001",
    "customerId": "Y3VzdG9tZXJfYWxpY2U"
  }
}
```

#### Response

```json
{
  "data": {
    "deleteCustomer": {
      "clientMutationId": "delete-cust-001"
    }
  },
  "extensions": {
    "requestId": "delete-cust-request-id"
  }
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)