Delete a payment method

DELETE /api/financial/payment-methods/{id}

Overview

Permanently removes a payment method. This is a hard delete — the record is removed, there is no soft delete and no undo.

In practice you can only delete a payment method that has never been used. The moment a sale has been recorded against it the delete is refused, and the call comes back 409 Conflict with Cannot delete payment method because sales have been generated using it. For anything that has seen live traffic, use Update a payment method with isActive: false instead; that withdraws it from use while leaving the sales history intact.

On success you get 204 No Content, and List all payment methods reflects the removal on the next read.

Endpoint

DELETE {base_url}/api/financial/payment-methods/{id}

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
idstringYesThe payment method to remove, as returned in id by List all payment methods. Maximum 15 characters. An id with nothing behind it returns 404 — the call is not idempotent in the sense of returning 204 for an already-deleted id.

Sample request

cURL
curl -X DELETE '{base_url}/api/financial/payment-methods/{id}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Errors

StatusMeaningWhen
400Bad requestPayment method ID must be specified — the path id is empty. In practice an empty segment usually fails to match the route and returns 404 first.
404Not foundPayment method {id} does not exist — no payment method exists with that id, including because a previous call already deleted it.
409ConflictCannot delete payment method because sales have been generated using it. — sales have been recorded against the payment method. Deactivate it instead of deleting.
500Internal server errorAn unexpected server-side failure, including the delete being blocked by something other than recorded sales. The response body is empty.

This page as markdown · All pages · llms.txt