POST
Create a refund reason

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Body

application/json

Adds one entry to the store's refund reason catalogue. code is UNIQUE per store, so re-running an import against the same store is answered 409 refund_reason_exists rather than creating a second entry meaning the same thing. id, store_id, created_by, created_at and updated_at are refused by name rather than ignored: created_by records the merchant user who authored the reason in their own audit trail and is never taken from a body.

label
string
required

What the merchant's staff see when they pick a reason on a refund. Required and trimmed; blank is a 400.

code
string
required

Your stable handle for this reason, unique per store. Required. Match on this rather than on id when reconciling a catalogue, since it is the half you control.

description
string | null

An optional longer note. Omit it or send null for none; there is no other spelling, since an empty string is stored as null.

is_active
boolean

Whether the reason is offered on a new refund. OMITTED MEANS true, which is the only place on this family where it defaults: a merchant adding a reason is adding one they intend to use. It is required on the replace, where an omission would retire a live reason instead.

Response

Created

data
object