commerce

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

Request a refund for an order.

Բոլոր commerce վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա billing.payment.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն

Այս վերջնակետը JSON մարմնում որպես դաշտ վերցնում է org_id-ը։

Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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

Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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