Retrieve a specific order payment by its unique ID.
HTTP Request
GET/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 retrieve |
| payment_id | Integer | Yes | Unique ID of the payment to retrieve |
Example Requests
1import requests
2
3response = requests.get('http://www.example.com/api/orders/123/payments/456',
4 headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.json())
1curl "http://www.example.com/api/orders/123/payments/456" -H "Authorization: Token <your_api_key>"
Status Codes
| Code | Description |
|---|
| 200 | Order Payment retrieved successfully |
| 400 | Bad request — invalid parameters |
| 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 |
|---|
| id | Integer | Unique ID of the order payment |
| payment_method | Integer | ID of the payment method (write-only) |
| payment_method_data | Object | Payment method details (read-only) |
| approved | Boolean | Whether the payment is approved |
| amount | Integer | Payment amount (in smallest currency unit) |
| transaction_id | String | External transaction identifier |
| notes | String | Additional notes about the payment |
| created_at | String (ISO 8601) | Timestamp when payment was created |
| updated_at | String (ISO 8601) | Timestamp when payment was last updated |
Payment Method Data Fields:
| Field | Type | Description |
|---|
| id | Integer | Unique ID of the payment method |
| name | String | Name of the payment method |
| image | Object | Image details for the payment method |
Image Data Fields:
| Field | Type | Description |
|---|
| id | Integer | Unique ID of the image |
| width | Integer | Width of the image in pixels |
| height | Integer | Height of the image in pixels |
| mode | String | Color mode of the image (e.g., RGB, RGBA) |