# Delete customer DELETE https://api-sandbox.payabli.com/api/Customer/{customerId} Delete a customer record. Reference: https://docs.payabli.com/developers/api-reference/customer/delete-customer-record ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete customer record version: endpoint_customer.DeleteCustomer paths: /Customer/{customerId}: delete: operationId: delete-customer summary: Delete customer record description: Delete a customer record. tags: - - subpackage_customer parameters: - name: customerId in: path description: >- Payabli-generated customer ID. Maps to "Customer ID" column in PartnerHub. required: true schema: type: integer - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: >- #/components/schemas/type_:PayabliApiResponse00Responsedatanonobject '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:Responsecode: type: integer type_:PageIdentifier: type: string type_:IsSuccess: type: boolean type_:ResponseText: type: string type_:Responsedatanonobject: oneOf: - type: string - type: integer type_:PayabliApiResponse00Responsedatanonobject: type: object properties: responseCode: $ref: '#/components/schemas/type_:Responsecode' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' roomId: type: integer format: int64 description: >- Describes the room ID. Only in use on Boarding endpoints, returns `0` when not applicable. isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseText: $ref: '#/components/schemas/type_:ResponseText' responseData: $ref: '#/components/schemas/type_:Responsedatanonobject' required: - responseText ``` ## SDK Code Examples ```python DeleteCustomer from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.customer.delete_customer( customer_id=998, ) ``` ```typescript DeleteCustomer import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.customer.deleteCustomer(998); ``` ```go DeleteCustomer import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Customer.DeleteCustomer( context.TODO(), 998, ) ``` ```csharp DeleteCustomer using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Customer.DeleteCustomerAsync(998); ``` ```ruby DeleteCustomer require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Customer/998") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java DeleteCustomer HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/Customer/998") .header("requestToken", "") .asString(); ``` ```php DeleteCustomer request('DELETE', 'https://api-sandbox.payabli.com/api/Customer/998', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift DeleteCustomer import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Customer/998")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers 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() ```