Get All Payment Methods
Retrieves a list of all available payment methods.
HTTP Request
GET/api/shop/payment/methods
Authorization
Authorization
- Required: No
- Permission: Public
- Authentication: None
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Number of results to return per page. |
| offset | integer | 0 | Number of results to skip before returning results. |
| search | string | — | Search term to lookup results by(`id`, `name`, `description`). |
| ordering | string | order, -created_at | Order results by (`id`, `name`, `order`, `created_at`, `updated_at`). |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2response = requests.get('http://www.example.com/api/shop/payment/methods', params={
3 'limit': 5,
4 'ordering': 'name',
5 'search': 'credit'
6})
7print(response.json())1curl "http://www.example.com/api/shop/payment/methods?limit=5&ordering=name&search=credit"Response Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Unique ID of the payment method. |
| name | string | Name of the payment method. |
| image | Object | Related image details |
| description | string | Description of the payment method. |
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
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"name": "زرین پال",
"image": {
"id": 5,
"type": "image",
"name": "keyboard",
"size": 2131742,
"human_readable_size": "2.03 MB",
"f": "http://127.0.0.1:8000/media/core_media/2025/11/29/Fantasticheskie_kartinki_dlja_monitora_68_96.jpg",
"width": 2560,
"height": 1600,
"mode": "RGB",
"thumbnails": [
{
"id": 213,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_64x64.jpg",
"size": 64
},
{
"id": 214,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_128x128.jpg",
"size": 128
},
{
"id": 215,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_512x512.jpg",
"size": 512
},
{
"id": 216,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_1080x1080.jpg",
"size": 1080
}
]
},
"description": "پرداخت با درگاه آنلاین زرین پال"
},
{
"id": 1,
"name": "پرداخت در مخل",
"image": null,
"description": ""
}
]
}