> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fedapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a customer



## OpenAPI

````yaml delete /customers/{id}
openapi: 3.0.0
info:
  title: Customer API
  version: v1
servers:
  - url: https://sandbox-api.fedapay.com/v1
  - url: https://api.fedapay.com/v1
security: []
paths:
  /customers/{id}:
    delete:
      summary: Delete a customer
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: Customer ID.
      responses:
        '204':
          description: Customer deleted successfully.
        '401':
          description: Unauthorized. Provide a valid secret key.
        '404':
          description: Customer not found.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          label: NodeJs
          source: >-
            const { FedaPay, Customer } = require('fedapay');

            /* Replace YOUR_SECRETE_API_KEY with your real API key */

            FedaPay.setApiKey("YOUR_SECRETE_API_KEY");

            /* Specify whether you want to run your query in test or live mode
            */

            FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');

            /* Delete customer */

            const customer = await Customer.delete(ID, params = {}, headers =
            {});
        - lang: PHP
          source: |-
            \FedaPay\Fedapay::setApiKey(MY_API_KEY);
            \FedaPay\Customer::delete(ID);
        - lang: Ruby
          source: |-
            require 'fedapay';
            # configure FedaPay library
            FedaPay.api_key = '' # Your secret api key
            FedaPay.environment = '' # sandbox or live
            customer.delete;
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````