Preo API
string · required string · enum · requirednumber | null · doublestringstring | nullstring · readOnly · requiredstring · readOnly · requirednumber · double · requiredstring · date-time · readOnly · requiredstring · date-time · readOnly · requiredstring · readOnly · requiredstring · readOnly · requiredstring | nullstring · enumstring · enumstring | nullstring | null · date-time
Individual purchase details and refund initiation.
Create refund request for purchase
POST
https://api.preo.dev
/v1/purchases/{id}/refund
Create a new refund request for this purchase. Reason is required; scope is auto-derived from reason but can be overridden if allowed.
path Parameters
idA unique value identifying this purchase.
Create refund request for purchase › Request Body
Serializer for creating refund requests via purchase context.
Used with: POST /api/backoffice/purchases/{purchaseId}/refund/
The API is reason-driven:
- reason is REQUIRED
- scope is auto-derived from reason, but can be overridden (if allowed)
- amount is auto-calculated for non-custom scopes
reasonBusiness reason for the refund (REQUIRED)
deposit_reclaim- Deposit reclaimedsold_out- Item sold outevent_cancelled- Event cancelledproduct_defect- Product defectiveduplicate_purchase- Duplicate purchasecustomer_request- Customer requestedcompensation- Customer compensationovercharge- Customer overchargedother- Other reasonrental_return- Rental returned
Enum values:
deposit_reclaim
sold_out
event_cancelled
product_defect
duplicate_purchase
customer_request
compensation
overcharge
Scope of refund (optional - auto-derived from reason, can be overridden if allowed)
purchase_price- Price onlypurchase_deposit- Deposit onlypurchase_full- Full purchase (incl. fees)purchase_custom- Custom purchase amounttransaction_full- Full transactiontransaction_custom- Custom transaction amount
amountRefund amount (required for CUSTOM scope, calculated automatically for others)
commentOptional comment explaining the refund reason
Default:
pickup_point_idPickup point where refund is processed
Create refund request for purchase › Responses
idedition_idreadOnly · required
readOnly · required
amountobject · readOnly · required
Staff user serializer for nested representations
object · readOnly · required
Simple pickup point serializer for nested representations
createdmodifiedcan_approvecan_rejectorganizationscopepurchase_price- Price onlypurchase_deposit- Deposit onlypurchase_full- Full purchase (incl. fees)purchase_custom- Custom purchase amounttransaction_full- Full transactiontransaction_custom- Custom transaction amount
Enum values:
purchase_price
purchase_deposit
purchase_full
purchase_custom
transaction_full
transaction_custom
statusrequested- requestedready- readyprocessing- processingawaiting_gateway- awaiting gatewayprocessed- processedfailed- failedrejected- rejectedinvalid- invalid
Enum values:
requested
ready
processing
awaiting_gateway
processed
failed
rejected
invalid
commentComment added upon custom refund
service_responserefund_dateDate when refund was successfully processed

