commerce
POST /v1/orders/{orderId}/refund-request
Request a refund for an order.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.payment.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Où insérer l'ID de votre organisation
Cet endpoint prend org_id comme champ dans le corps JSON.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/refund-request \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
orderId (path) | Uuid | Oui | The order's id. |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
org_id | Uuid | Non | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
reason | string | Non | — |
to_wallet | boolean | Non | 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… |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Oui | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Oui | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Oui | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Oui | 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… |
reason | string | Oui | — |
decided_by | string | Oui | — |
decision_note | string | Oui | — |
decided_at | object | Oui | — |
refund_reference | string | Oui | Set once the refund has been issued (its idempotency key). |
created_at | string | Oui | — |
updated_at | string | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 409 · 422 · 429