commerce

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

Request a refund for an order.

Όλα τα τελικά σημεία commerce

Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα billing.payment.manage· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.

Πού μπαίνει το αναγνωριστικό του οργανισμού σας

Αυτό το endpoint δέχεται το πεδίο org_id στο σώμα JSON.

Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

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

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
orderId (path)UuidΝαιThe order's id.

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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…

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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