Skip to content
Payments docs are in beta — the OpenAPI contract is the source of truth.API reference
VortexPayments
Esc
↑↓navigate↵open⌘Jpreview

POST /v1/subscriptions/{subscriptionId}/cancel

POST/v1/subscriptions/{subscriptionId}/cancel
Authorization
x-api-keyAPI key · headerrequired
or
AuthorizationBearer token · headerrequired
Path parameters
subscriptionIdstringrequired
min length 1
Query parameters
environmentstring
Allowed:sandboxproduction
merchantAccountIdstring
min length 1
Header parameters
Idempotency-Keystring

Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.

min length 1
Request body
requiredapplication/json
environmentstring | null
Show properties
Any of:
string
string
null
null
merchantAccountIdstring | null
Show properties
Any of:
string
string
null
null
subscriptionIdstring | null
Show properties
Any of:
string
string
null
null
canceledBystringrequired
Allowed:systemoperatorcustomer
canceledByRefstringrequired
min length 1
cancelAtstring | null
Show properties
Any of:
string
string
null
null
Responses
200

Success

dataobjectrequired
Show properties
subscriptionobjectrequired
Show properties
subscriptionIdstringrequired
min length 1
customerIdstringrequired
min length 1
billingAccountIdstringrequired
min length 1
statusstringrequired
Allowed:draftpendingincompleteincomplete_expiredtrialingactivepast_duepausedcanceled
collectionModestringrequired
Allowed:manualautomatic
metadataobjectrequired
createdAtstringrequired
min length 1
currentPeriodStartAtstring | null
Show properties
Any of:
string
string
null
null
currentPeriodEndAtstring | null
Show properties
Any of:
string
string
null
null
trialEndAtstring | null
Show properties
Any of:
string
string
null
null
cancelAtstring | null
Show properties
Any of:
string
string
null
null
canceledAtstring | null
Show properties
Any of:
string
string
null
null
endedAtstring | null
Show properties
Any of:
string
string
null
null
testClockIdstring | null
Show properties
Any of:
string
string
null
null
itemsobject[]required
Show properties
Array of object
subscriptionItemIdstringrequired
min length 1
subscriptionIdstringrequired
min length 1
priceIdstringrequired
min length 1
quantitynumberrequired
startAtstringrequired
min length 1
metadataobjectrequired
endAtstring | null
Show properties
Any of:
string
string
null
null
requestIdstringrequired
min length 1
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl "https://api.vortex.nyc/v1/subscriptions/{subscriptionId}/cancel?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"canceledBy":"customer","canceledByRef":"bcust_123","cancelAt":"2026-07-01T00:00:00.000Z"}'
Response
{
  "data": {
    "subscription": {
      "subscriptionId": "string",
      "customerId": "string",
      "billingAccountId": "string",
      "status": "draft",
      "collectionMode": "manual",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "createdAt": "string",
      "currentPeriodStartAt": "string",
      "currentPeriodEndAt": "string",
      "trialEndAt": "string",
      "cancelAt": "string",
      "canceledAt": "string",
      "endedAt": "string",
      "testClockId": "string"
    },
    "items": [
      {
        "subscriptionItemId": "string",
        "subscriptionId": "string",
        "priceId": "string",
        "quantity": 0,
        "startAt": "string",
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "endAt": "string"
      }
    ]
  },
  "requestId": "string"
}