polar-sdk-cancel-subscription

Guide TypeScript developers to use polar.subscriptions.revoke() instead of cancel().

Updated Jan 23, 2026
Ready to run
npx skills add https://github.com/strataga/claude-skill-inception --skill polar-sdk-cancel-subscription
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: polar-sdk-cancel-subscription
Source: https://github.com/strataga/claude-skill-inception/tree/main/polar-sdk-cancel-subscription
Command: npx skills add https://github.com/strataga/claude-skill-inception --skill polar-sdk-cancel-subscription

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When trying to cancel a subscription via the Polar SDK, developers may encounter a TypeScript error because cancel() does not exist on the Subscriptions type. This skill guides you to use revoke() instead to perform cancellation reliably.

Core Features & Use Cases

  • Correct method usage: polar.subscriptions.revoke({ id: subscriptionId }) to cancel subscriptions.
  • Prevents compile-time errors and ensures immediate cancellation.
  • Suitable for TypeScript projects using the Polar JS SDK across node or browser environments.

Quick Start

Use polar.subscriptions.revoke({ id: subscriptionId }) to revoke a subscription. Verify that the operation returns the revoked subscription object and handle any errors as needed.

Frequently Asked Questions about polar-sdk-cancel-subscription

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does cancel() throw a TypeScript error in the Polar SDK?▼

The cancel() method does not exist on the Polar Subscriptions type. To cancel a subscription programmatically in TypeScript, you must use polar.subscriptions.revoke({ id }) instead.

How do I cancel a Polar subscription using the JavaScript SDK?▼

To cancel a Polar subscription, call polar.subscriptions.revoke({ id: subscriptionId }) in your TypeScript project. Verify the operation returns a valid revoked subscription object and handle any API errors as needed.

Does the Polar JS SDK support subscription cancellation in both Node and browser environments?▼

Yes, using polar.subscriptions.revoke({ id }) ensures reliable subscription cancellation across TypeScript projects using the Polar JS SDK in both Node and browser environments.

What is the correct way to handle immediate subscription revocation with Polar?▼

Immediate subscription revocation with Polar requires calling polar.subscriptions.revoke({ id: subscriptionId }). This prevents compile-time errors and ensures the subscription is canceled right away.

What should I check for when revoking a Polar subscription programmatically?▼

When revoking a Polar subscription, verify that polar.subscriptions.revoke({ id }) returns a valid revoked subscription object. Ensure your TypeScript project has the Polar SDK properly imported before making the call.