Skip to main content
POST
/
api
/
v1
/
cancellation-policies
Create Policy
curl --request POST \
  --url https://api.example.com/api/v1/cancellation-policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "name": "<string>",
  "refund_type": "none",
  "refund_percentage": 123,
  "refund_window_days": 0,
  "prorate_refund": false,
  "cancellation_fee": 0,
  "apply_to_existing": true,
  "is_default": false,
  "extra_data": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "refund_type": "<string>",
  "refund_percentage": 123,
  "refund_window_days": 123,
  "prorate_refund": true,
  "cancellation_fee": 123,
  "apply_to_existing": true,
  "is_default": true,
  "created_at": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-api-key
string
required

Body

application/json
name
string
required
refund_type
string
default:none
refund_percentage
number | null
refund_window_days
integer
default:0
prorate_refund
boolean
default:false
cancellation_fee
number
default:0
apply_to_existing
boolean
default:true
is_default
boolean
default:false
extra_data
Extra Data · object | null

Response

Successful Response

id
string<uuid>
required
name
string
required
refund_type
string
required
refund_percentage
number | null
required
refund_window_days
integer
required
prorate_refund
boolean
required
cancellation_fee
number
required
apply_to_existing
boolean
required
is_default
boolean
required
created_at
string<uuid>
required