Skip to main content

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

ParameterTypeDefaultDescription
limitinteger10Number of results to return per page.
offsetinteger0Number of results to skip before returning results.
searchstringSearch term to lookup results by(`id`, `name`, `description`).
orderingstringorder, -created_atOrder results by (`id`, `name`, `order`, `created_at`, `updated_at`).

Example Requests

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())

Response Fields

FieldTypeDescription
idintegerUnique ID of the payment method.
namestringName of the payment method.
imageObjectRelated image details
descriptionstringDescription of the payment method.

Image Data Structure

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (e.g., image/jpeg)
nameStringOriginal file name
sizeIntegerFile size in bytes
human_readable_sizeStringHuman readable file size (e.g., 2.5 MB)
fStringURL to access the image file
widthIntegerImage width in pixels
heightIntegerImage height in pixels
modeStringColor mode (e.g., RGB, CMYK)
thumbnailsList of thumbnail objectsImgae thumbnails

Thumbnail Data Structure

FieldTypeDescription
idIntegerUnique ID of the thumbnail (unique)
fStringURL to access the thumbnail file
sizeIntegerFile 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": ""
}
]
}