Retrieve Payment Method
Retrieves a specific payment method by its unique ID.
HTTP Request
GET/api/payment/methods/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with PaymentMethodPermission or Admin
- Permission Code: 2402
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | Unique ID of the payment method to retrieve |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3response = requests.get('http://www.example.com/api/payment/methods/123',
4 headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.json())1curl "http://www.example.com/api/payment/methods/123" \
2-H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the payment method |
| backend | String | Backend identifier for the payment method |
| active | Boolean | Whether the payment method is active |
| order | Integer | Order of the payment method in the list |
| name | String | Name of the payment method |
| image_data | Object | Image details (read-only) |
| description | String | Description of the payment method |
| settings | Object | Additional settings for the payment method |
| created_at | String (ISO 8601) | Timestamp when the payment method was created |
| updated_at | String (ISO 8601) | Timestamp when the payment method was last updated |
Image Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the image |
| type | String | File type (e.g., image/jpeg) |
| name | String | Original file name |
| size | Integer | File size in bytes |
| human_readable_size | String | Human readable file size (e.g., 2.5 MB) |
| f | String | URL to access the image file |
| width | Integer | Image width in pixels |
| height | Integer | Image height in pixels |
| mode | String | Color mode (e.g., RGB, CMYK) |
| thumbnails | List of thumbnail objects | Imgae thumbnails |
Thumbnail Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the thumbnail (unique) |
| f | String | URL to access the thumbnail file |
| size | Integer | File size in bytes (nullable) |
Example Response
{
"id": 1,
"active": true,
"backend": "pay-on-delivery",
"order": null,
"name": "پرداخت در مخل",
"image_data": null,
"description": "",
"settings": {},
"auto_approve_payments": true,
"created_at": "2025-12-20T17:54:59.658436Z",
"updated_at": "2025-12-20T17:54:59.658441Z"
}