Skip to Content

Cancel a subscription

POST/subscriptions/{subscriptionId}/cancel

Cancel an active subscription as the merchant via a signed request. Exodus submits the on-chain cancelWithSig transaction and pays the gas. The subscription transitions to cancelling immediately, then to cancelled once the on-chain event is indexed.

Headers

HeaderDescriptionRequired
AuthorizationBearer token with your secret API keyyes

Path Parameters

NameTypeRequiredDescription
subscriptionIdstringyes

Request Body

FieldTypeRequiredDescription
deadlineintegeryes

Example Request

Request

const response = await fetch('https://checkout-api.exodus-int.com/subscriptions/<subscriptionId>/cancel', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "deadline": 0
  }),
});

Responses

StatusDescription
200The cancelled subscription.
400Validation error
401Missing or invalid authentication
404Resource not found

Response body

FieldTypeRequiredDescription
objectenum: subscriptionyes
idstringyes
subscriberstringyes
assetstringyes
token_symbolstringyes
token_decimalsnumberyes
cap_amountstringyes
pricestringyes
price_currencystring | nullyes
period_durationnumberyes
last_charged_atstring | nullyes
next_charge_atstring | nullyes
charge_noncenumberyes
statusenum: active | cancelling | cancelledyes
pausedbooleanyes
flaggedbooleanyes
budgetstring | nullyes
spent_this_periodstring | nullyes
remaining_budgetstring | nullyes
created_atstringyes

Example Response

{
  "object": "subscription",
  "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
  "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "token_symbol": "USDC",
  "token_decimals": 6,
  "cap_amount": "120000000",
  "price": "9990000",
  "price_currency": null,
  "period_duration": 2592000,
  "last_charged_at": "2026-04-19T12:02:18Z",
  "next_charge_at": "2026-05-19T12:02:18Z",
  "charge_nonce": 3,
  "status": "active",
  "paused": false,
  "flagged": false,
  "budget": "300000000",
  "spent_this_period": "29970000",
  "remaining_budget": "270030000",
  "created_at": "2026-02-19T12:02:18Z"
}

Error Response

Error (e.g. 400)

{
  "error": {
    "type": "validation_error",
    "message": "amount must be a positive number",
    "param": "amount"
  }
}

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help