# Delete payment link DELETE https://api-sandbox.payabli.com/api/PaymentLink/{payLinkId} Deletes a payment link by ID. Reference: https://docs.payabli.com/developers/api-reference/paymentlink/delete-payment-link ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete payment link version: endpoint_paymentLink.deletePayLinkFromId paths: /PaymentLink/{payLinkId}: delete: operationId: delete-pay-link-from-id summary: Delete payment link description: Deletes a payment link by ID. tags: - - subpackage_paymentLink parameters: - name: payLinkId in: path description: ID for the payment link. required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: >- #/components/schemas/type_paymentLink:PayabliApiResponsePaymentLinks '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_:ResponseText: type: string type_paymentLink:PayabliApiResponsePaymentLinks: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseData: type: string description: >- If `isSuccess` = true, this contains the payment link identifier. If `isSuccess` = false, this contains the reason of the error. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - isSuccess - responseText ``` ## SDK Code Examples ```python from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.payment_link.delete_pay_link_from_id( pay_link_id="payLinkId", ) ``` ```typescript import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.paymentLink.deletePayLinkFromId("payLinkId"); ``` ```go 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.PaymentLink.DeletePayLinkFromId( context.TODO(), "payLinkId", ) ``` ```csharp using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.PaymentLink.DeletePayLinkFromIdAsync("payLinkId"); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/PaymentLink/payLinkId") 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 HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/PaymentLink/payLinkId") .header("requestToken", "") .asString(); ``` ```php request('DELETE', 'https://api-sandbox.payabli.com/api/PaymentLink/payLinkId', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentLink/payLinkId")! 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() ```