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: Staff with PaymentMethodPermission or Admin
  • Permission Code: 2404
  • 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

Response Fields​

FieldTypeDescription
NoneNoneNo response body returned for successful deletion

Notes​

  • 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