Skip to main content

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

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the payment method to retrieve

Example Requests

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

Response Fields

FieldTypeDescription
idIntegerUnique ID of the payment method
backendStringBackend identifier for the payment method
activeBooleanWhether the payment method is active
orderIntegerOrder of the payment method in the list
nameStringName of the payment method
image_dataObjectImage details (read-only)
descriptionStringDescription of the payment method
settingsObjectAdditional settings for the payment method
created_atString (ISO 8601)Timestamp when the payment method was created
updated_atString (ISO 8601)Timestamp when the payment method was last updated

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

{
"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"
}