> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Customer | Customers API

> Delete customer via the Atoa Customers API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Delete a customer by ID. This also removes all saved payment methods associated with the customer.

### Authorization

Bearer `<accessSecret>`

**Path Parameters**

<ParamField path="customerId" type="string" required>
  The customer's unique identifier (UUID).
</ParamField>

<RequestExample>
  ```bash curl theme={null}
  curl --request DELETE \
    --url https://api.atoa.me/api/customers/{customerId} \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.atoa.me/api/customers/{customerId}"
  headers = {"Authorization": "Bearer <token>"}

  response = requests.delete(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.atoa.me/api/customers/{customerId}",
    {
      method: "DELETE",
      headers: { Authorization: "Bearer <token>" },
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.atoa.me/api/customers/{customerId}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer <token>"
    ],
  ]);

  $response = curl_exec($curl);
  curl_close($curl);
  echo $response;
  ```

  ```go Go theme={null}
  package main

  import (
    "fmt"
    "net/http"
    "io/ioutil"
  )

  func main() {
    url := "https://api.atoa.me/api/customers/{customerId}"

    req, _ := http.NewRequest("DELETE", url, nil)
    req.Header.Add("Authorization", "Bearer <token>")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(string(body))
  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.delete("https://api.atoa.me/api/customers/{customerId}")
    .header("Authorization", "Bearer <token>")
    .asString();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Customer deleted successfully"
  }
  ```

  ```json 404 theme={null}
  {
    "name": "NOT_FOUND",
    "message": "Customer not found",
    "status": 404,
    "errors": []
  }
  ```
</ResponseExample>
