commerce

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

Request a refund for an order.

จุดสิ้นสุด commerce ทั้งหมด

การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ billing.payment.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

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

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API

รายละเอียด

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`.

พารามิเตอร์

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
orderId (path)Uuidใช่The order's id.

เนื้อหาคำขอ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
org_idUuidไม่ใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
reasonstringไม่ใช่
to_walletbooleanไม่ใช่Where 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…

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
order_idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
statusRefundRequestStatusใช่A refund request's lifecycle state (docs/05 §4.13).
policy_classRefundPolicyClassใช่How the refund policy classified a request (captured at request time).
amountMoneyAmountใช่A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
to_walletbooleanใช่Refund 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_referencestringใช่Set once the refund has been issued (its idempotency key).
created_atstringใช่
updated_atstringใช่

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 404 · 409 · 422 · 429