POST
/
api
/
v1
/
subscriptions
/
{id}
/
cancel
curl --request POST \
  --url https://app.flowglad.com/api/v1/subscriptions/{id}/cancel \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cancellation": {
    "timing": "at_end_of_current_billing_period"
  }
}'
{
  "subscription": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "livemode": true,
    "customerId": "<string>",
    "organizationId": "<string>",
    "status": "trialing",
    "defaultPaymentMethodId": "<string>",
    "backupPaymentMethodId": "<string>",
    "trialEnd": "2023-11-07T05:31:56Z",
    "currentBillingPeriodStart": "2023-11-07T05:31:56Z",
    "currentBillingPeriodEnd": "2023-11-07T05:31:56Z",
    "metadata": {},
    "canceledAt": "2023-11-07T05:31:56Z",
    "cancelScheduledAt": "2023-11-07T05:31:56Z",
    "priceId": "<string>",
    "runBillingAtPeriodStart": true,
    "interval": "day",
    "intervalCount": 123,
    "billingCycleAnchorDate": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "current": true
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Body

application/json
cancellation
object
required

Response

200
application/json
Successful response
subscription
object
required