Delete a payment method
DELETE /api/financial/payment-methods/{id}
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The 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 -X DELETE '{base_url}/api/financial/payment-methods/{id}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | Payment 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. |
404 | Not found | Payment method {id} does not exist — no payment method exists with that id, including because a previous call already deleted it. |
409 | Conflict | Cannot delete payment method because sales have been generated using it. — sales have been recorded against the payment method. Deactivate it instead of deleting. |
500 | Internal server error | An unexpected server-side failure, including the delete being blocked by something other than recorded sales. The response body is empty. |