Skip to main content

Retrieve Order Payment

Retrieve a specific order payment by its unique ID.

HTTP Request

GET/api/orders/:id/payments/:payment_id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with OrderPaymentPermission or Admin
  • Permission Code: 2242
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the order to retrieve
payment_idIntegerYesUnique 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())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the order payment
payment_method_dataObjectPayment method details (read-only)
approvedBooleanWhether the payment is approved
amountIntegerPayment amount (in smallest currency unit)
transaction_idStringExternal transaction identifier
notesStringAdditional notes about the payment
created_atString (ISO 8601)Timestamp when payment was created
updated_atString (ISO 8601)Timestamp when payment was last updated

Payment Method Data Fields:

FieldTypeDescription
idIntegerUnique ID of the payment method
nameStringName of the payment method
imageObjectImage details for 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

{
"id": 1,
"payment_method_data": {
"id": 1,
"name": "پرداخت در مخل",
"image": null
},
"approved": true,
"amount": 500000,
"transaction_id": "1589800",
"notes": "",
"created_at": "2025-12-28T10:43:38.509103Z",
"updated_at": "2025-12-28T10:43:38.509107Z"
}