Skip to main content

Delete Payment Method

Deletes an existing payment method permanently.

HTTP Request

DELETE/api/payment/methods/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Admin or Staff
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the payment method to delete

Example Requests

1import requests
2
3response = requests.delete('http://www.example.com/api/payment/methods/123', 
4  headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.status_code)  # Should be 204 for successful deletion

Status Codes

CodeDescription
204Payment method deleted successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — payment method does not exist
500Internal server error

Response Fields

FieldTypeDescription
NoneNoneNo response body returned for successful deletion
    • This operation permanently deletes the payment method and cannot be undone
    • A successful deletion returns HTTP status code 204 with no response body
    • Make sure the payment method is not being used in any active transactions before deletion
    • Consider deactivating the payment method instead of deleting it if you want to preserve historical data