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

Response

subscription cancelled successfully

The response is of type object.