Delete Order Payment
Delete an existing order payment.
HTTP Request
DELETE/api/orders/:id/payments/:payment_id
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | Unique ID of the order to delete |
| payment_id | Integer | Yes | Unique ID of the order payment to delete |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3response = requests.delete('http://www.example.com/api/orders/123/payments/456',
4 headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.status_code) # Should be 204 for successful deletion1curl -X DELETE "http://www.example.com/api/orders/123/payments/456" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 204 | Order Payment deleted successfully |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 404 | Not found — order payment does not exist |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| None | None | No content returned on successful deletion |