Skip to main content
POST
/
subscriptions
/
{id}
/
cancel
Cancel subscription
curl --request POST \
  --url https://api.funnelfox.io/public/v1/subscriptions/{id}/cancel \
  --header 'Content-Type: application/json' \
  --header 'Fox-Secret: <fox-secret>' \
  --data '{
  "reason": "<string>"
}'
{
  "id": "<string>",
  "psp_id": "<string>",
  "status": "created",
  "profile": {
    "id": "<string>",
    "email": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "preview": true
  },
  "funnel": {
    "id": "<string>",
    "title": "<string>",
    "alias": "<string>",
    "type": "default"
  },
  "funnel_version": 123,
  "funnel_locale": "<string>",
  "experiment": {
    "id": "<string>",
    "title": "<string>",
    "alias": "<string>",
    "enabled": true
  },
  "session": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "locale": "<string>",
    "user_agent": "<string>"
  },
  "product_id": "<string>",
  "product": {
    "id": "<string>",
    "name": "<string>",
    "status": "active"
  },
  "price": 100,
  "currency": "<string>",
  "price_usd": 100,
  "billing_interval": "day",
  "billing_interval_count": 123,
  "trial_offer": "free",
  "trial_transaction_id": "<string>",
  "payment_provider": "stripe",
  "renews": true,
  "sandbox": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "period_starts_at": "2023-11-07T05:31:56Z",
  "period_ends_at": "2023-11-07T05:31:56Z",
  "paused_at": "2023-11-07T05:31:56Z",
  "cancelled_at": "2023-11-07T05:31:56Z",
  "cancellation_reason": "<string>",
  "renewed_at": "2023-11-07T05:31:56Z",
  "upgrades_to": "<string>",
  "custom_entitlement": "<string>"
}
You can provide a reason for cancellation in the request body. If no reason is provided, a default reason will be used: “User requested cancellation”. If a subscription has been deleted or already canceled, a corresponding error will be returned. Supported PSPs:
  • Stripe
  • Paddle
  • Paypal
  • FunnelFox Billing

Headers

Fox-Secret
string
required

Project Secret Key

Example:

"secret_"

Path Parameters

id
string
required

Subscription ID

Body

application/json
reason
string

Cancellation reason

Response

subscription cancelled successfully

id
string
required
psp_id
string
required
status
enum<string>
required
Available options:
created,
trialing,
active,
paused,
cancelled,
expired,
unpaid
profile
object
required
funnel
object
required
funnel_version
integer
required
session
object
required
price
integer
required

Monetary amount in cents (e.g., $1.00 = 100 cents)

Example:

100

currency
string
required
price_usd
integer
required

Monetary amount in cents (e.g., $1.00 = 100 cents)

Example:

100

billing_interval
enum<string>
required
Available options:
day,
week,
month,
year
billing_interval_count
integer
required
payment_provider
enum<string>
required
Available options:
stripe,
paddle,
paypal,
braintree,
solidgate
renews
boolean
required
sandbox
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
period_starts_at
string<date-time>
required
funnel_locale
string
experiment
object
product_id
string
product
object
trial_offer
enum<string>
Available options:
free,
paid
trial_transaction_id
string
period_ends_at
string<date-time>
paused_at
string<date-time>
cancelled_at
string<date-time>
cancellation_reason
string
renewed_at
string<date-time>
upgrades_to
string
custom_entitlement
string
I