commerce

POST /v1/orders/{orderId}/refund-request

Request a refund for an order.

Tất cả các điểm cuối commerce

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền billing.payment.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

Opens a refund request per the policy: within the 30-day money-back window the refund is issued immediately (status `auto_approved`); otherwise a pro-rata request is recorded `pending` for staff approval (docs/05 §4.13). The amount and approval path come from the server, never the client. Requires `billing.payment.manage`.

Tham số

TênLoạiBắt buộcNội dung này là gì
orderId (path)UuidThe order's id.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
org_idUuidKhôngUUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringKhông
to_walletbooleanKhôngWhere the refund goes. Omit it and the money is returned to the original payment method — the money-back guarantee is money back, and store credit is an opt-in the customer has…

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusA refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassHow the refund policy classified a request (captured at request time).
amountMoneyAmountA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanRefund destination, frozen at request time — `false` (the default) reverses the original payment, `true` credits the account wallet. Any part of the order that was settled from…
reasonstring
decided_bystring
decision_notestring
decided_atobject
refund_referencestringSet once the refund has been issued (its idempotency key).
created_atstring
updated_atstring

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 409 · 422 · 429