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 or Admin
  • 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())

Status Codes

CodeDescription
200Order Payment retrieved successfully
400Bad request — invalid parameters
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — order payment does not exist
500Internal server error

Response Fields

FieldTypeDescription
idIntegerUnique ID of the order payment
payment_methodIntegerID of the payment method (write-only)
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 Fields:

FieldTypeDescription
idIntegerUnique ID of the image
widthIntegerWidth of the image in pixels
heightIntegerHeight of the image in pixels
modeStringColor mode of the image (e.g., RGB, RGBA)