Payments
Owner-authorized refund
Owner-authorized refund. Requires the OWNER role. Idempotent: send an Idempotency-Key.
__Host-qm_session<token>
Session cookie set by sign-in on HTTPS deployments (the hosted demo).
In: cookie
Path Parameters
id*string
Resource id (UUID).
Format
uuidHeader Parameters
X-Requested-With*string
CSRF guard: must be quartermaster on every mutation.
Idempotency-Key*string
A unique key per user action; retries with the same key return the first result.
Length
8 <= length <= 128Request Body
application/json
Refund part or all of a captured payment.
Refund part or all of a captured payment.
amount_minor?integer
Amount, in minor units (cents).
Range
1 <= value <= 9007199254740991reason*string
Reason given by the person making the change.
Length
1 <= length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/payments/0f8fad5b-d9cb-469f-a165-70867728950e/refund" \ -H "X-Requested-With: quartermaster" \ -H "Idempotency-Key: 3b8c2c1e-6f6d-4a59-9a43-8f0c2a9e1d22" \ -H "Content-Type: application/json" \ -d '{ "reason": "Damaged on arrival" }'{ "payment": { "id": "string", "intent_id": "string", "purchase_order_id": "string", "status": "CREATED", "paypal_order_id": "string", "paypal_capture_id": "string", "amount_minor": 0, "currency": "string", "captured_amount_minor": 0, "refunded_amount_minor": 0, "failure_code": "string", "failure_message": "string", "created_at": "string", "updated_at": "string", "completed_at": "string" }}