reseller
POST /v1/reseller/client-wallets/top-ups/{topUpId}/refunds
Send a deposit back to the card it came from.
การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ reseller.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
พอยต์ข้อมูลนี้รับ org_id เป็นพารามิเตอร์คิวรี หากเว้นว่างไว้ การเรียกใช้งานจะครอบคลุมย่อยของเทแนนท์ทั้งหมดของคุณ แต่หากระบุค่า จะช่วยจำกัดขอบเขตการเรียกให้เหลือเพียงองค์กรเดียว
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X POST https://api.zinndigital.com/v1/reseller/client-wallets/top-ups/{topUpId}/refunds \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
⛔ **Back the way it came.** There is deliberately no "refund to wallet" option: a top-up already *is* wallet credit, so crediting it again would be a no-op wearing the name of a remedy, and wallet credit is an opt-in under consumer law rather than something silence can agree to. The balance is debited first and the gateway refund taken second; if the client has already spent the deposit the refund is refused with 422, and if the gateway declines it the balance is put back. Requires `reseller.manage`.
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
topUpId (path) | Uuid | ใช่ | — |
org_id (query) | Uuid | ไม่ใช่ | Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r… |
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
amount_minor | integer | ไม่ใช่ | Omit to refund everything still refundable on the deposit. |
reason | string | ไม่ใช่ | — |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
quoted_minor | integer | ไม่ใช่ | What the customer asked to add, and what the screen promised them. |
settled_minor | integer | null | ไม่ใช่ | What actually arrived. **`null` = not known yet**, never zero. |
fee_minor | integer | null | ไม่ใช่ | What the provider kept out of the settlement. **`null` = not known**, never zero — recording an unknown as `0` would credit the customer the shortfall. |
credited_minor | integer | ไม่ใช่ | What went into the balance — `settled_minor - fee_minor`. |
shortfall_minor | integer | null | ไม่ใช่ | `quoted_minor - credited_minor`. `null` until the top-up settles. Derived rather than stored: it is a difference between two recorded facts, and a stored copy is a second source… |
purpose | string<general, ai> | ไม่ใช่ | — |
is_auto | boolean | ไม่ใช่ | Whether a standing instruction created this, rather than a person. |
action_url | string | ไม่ใช่ | Where the customer must go to finish paying — a crypto pay-link or an SCA challenge. Losing it strands a pending top-up with no way to complete it. |
id | Uuid | ใช่ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
amount_minor | integer | ใช่ | — |
currency | string | ใช่ | — |
status | string<pending, requires_action, captured, failed> | ใช่ | ⛔ Credit is written on `captured` only. `pending` (a crypto invoice confirming) and `requires_action` (3-D Secure) both mean the money has not arrived yet. |
refunded_minor | integer | ใช่ | — |
refundable_minor | integer | ใช่ | What is left to send back to the card. Zero unless it captured. |
gateway | string | ไม่ใช่ | The provider's driver — `stripe`, `paypal`, `nowpayments`. ⛔ Never a credential and never a merchant-account reference: which account your provider banks with is their commercia… |
error | string | ไม่ใช่ | The gateway's refusal, in words the customer can act on. |
created_at | string | ใช่ | — |
captured_at | string | null | ไม่ใช่ | — |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 422 · 429