> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.gomoney.me/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.gomoney.me/_mcp/server.

# Remover customer

DELETE https://gmc-api.gomoney.me/api/customers/{customerId}

Realiza exclusão lógica do customer.
O endpoint exige `Bearer token` e `secret-key`.


Reference: https://docs.gomoney.me/api-reference/open-api-explorer/customers/delete-customer

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: gomoney-docs-postman-collection
  version: 1.0.0
paths:
  /customers/{customerId}:
    delete:
      operationId: delete-customer
      summary: Remover customer
      description: |
        Realiza exclusão lógica do customer.
        O endpoint exige `Bearer token` e `secret-key`.
      tags:
        - customers
      parameters:
        - name: customerId
          in: path
          description: Identificador do customer.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Token retornado pelo endpoint `/auth/login`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Customer removido logicamente com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCustomerResponse'
        '401':
          description: Token ou secret-key inválidos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Customer não pertence ao usuário autenticado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Customer não encontrado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
servers:
  - url: https://gmc-api.gomoney.me/api
    description: Base URL da API da plataforma
  - url: https://api-pix.gomoney.me
    description: Base URL da API PIX
components:
  schemas:
    DeleteCustomerResponse:
      type: object
      properties:
        _id:
          type: string
        deleted:
          type: boolean
      title: DeleteCustomerResponse
    UnauthorizedError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      title: UnauthorizedError
    ForbiddenError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      title: ForbiddenError
    NotFoundError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      title: NotFoundError
  securitySchemes:
    accessTokenBearer:
      type: http
      scheme: bearer
      description: Token retornado pelo endpoint `/auth/login`.
    secretKeyHeader:
      type: apiKey
      in: header
      name: secret-key
      description: Chave Base64 no formato `btoa(clientKey:clientSecret)`.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "_id": "64a7f3d9e4b0c12f9a8d4567",
  "deleted": true
}
```

**SDK Code**

```python success
import requests

url = "https://gmc-api.gomoney.me/api/customers/customerId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript success
const url = 'https://gmc-api.gomoney.me/api/customers/customerId';
const options = {
  method: 'DELETE',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go success
package main

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

func main() {

	url := "https://gmc-api.gomoney.me/api/customers/customerId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby success
require 'uri'
require 'net/http'

url = URI("https://gmc-api.gomoney.me/api/customers/customerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://gmc-api.gomoney.me/api/customers/customerId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://gmc-api.gomoney.me/api/customers/customerId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp success
using RestSharp;

var client = new RestClient("https://gmc-api.gomoney.me/api/customers/customerId");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift success
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://gmc-api.gomoney.me/api/customers/customerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```