# Delete payment method domain DELETE https://api-sandbox.payabli.com/api/PaymentMethodDomain/{domainId} Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level. Reference: https://docs.payabli.com/developers/api-reference/paymentmethoddomain/paymentmethoddomain-delete ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete a payment method domain version: endpoint_paymentMethodDomain.DeletePaymentMethodDomain paths: /PaymentMethodDomain/{domainId}: delete: operationId: delete-payment-method-domain summary: Delete a payment method domain description: >- Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level. tags: - - subpackage_paymentMethodDomain parameters: - name: domainId in: path description: The payment method domain's ID in Payabli. required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success response for a deleted payment method domain. content: application/json: schema: $ref: >- #/components/schemas/type_paymentMethodDomain:DeletePaymentMethodDomainResponse '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_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsedatanonobject: oneOf: - type: string - type: integer type_:ResponseText: type: string type_paymentMethodDomain:DeletePaymentMethodDomainResponse: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseData: $ref: '#/components/schemas/type_:Responsedatanonobject' description: The deleted domain's domain ID. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - isSuccess - pageIdentifier - responseData - responseText ``` ## SDK Code Examples ```python Delete from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.payment_method_domain.delete_payment_method_domain( domain_id="pmd_b8237fa45c964d8a9ef27160cd42b8c5", ) ``` ```typescript Delete import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.paymentMethodDomain.deletePaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5"); ``` ```go Delete 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.PaymentMethodDomain.DeletePaymentMethodDomain( context.TODO(), "pmd_b8237fa45c964d8a9ef27160cd42b8c5", ) ``` ```csharp Delete using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.PaymentMethodDomain.DeletePaymentMethodDomainAsync( "pmd_b8237fa45c964d8a9ef27160cd42b8c5" ); ``` ```ruby Delete require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_b8237fa45c964d8a9ef27160cd42b8c5") 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 Delete HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_b8237fa45c964d8a9ef27160cd42b8c5") .header("requestToken", "") .asString(); ``` ```php Delete request('DELETE', 'https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_b8237fa45c964d8a9ef27160cd42b8c5', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift Delete import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_b8237fa45c964d8a9ef27160cd42b8c5")! 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() ```