Skip to content

feat: add subscribe command for plan management and discount coupons#391

Open
gulshngill wants to merge 1 commit into
mainfrom
feat/ecint-6533-subscribe-command
Open

feat: add subscribe command for plan management and discount coupons#391
gulshngill wants to merge 1 commit into
mainfrom
feat/ecint-6533-subscribe-command

Conversation

@gulshngill
Copy link
Copy Markdown
Contributor

@gulshngill gulshngill commented Apr 4, 2026

Summary

  • New command: nansen subscribe with subcommands: plans, promo-code, create, cancel, status
  • Subscription backend: Targets app.nansen.ai via new appBaseUrl on NansenAPI (env: NANSEN_APP_URL)
  • Payment providers: Stripe (default), Coinbase, Moonpay — with optional --promo-code for discount coupons

New files

  • src/commands/subscribe.js — command handler, table formatters
  • src/__tests__/subscribe.test.js — 20 unit tests (help, plans, promo-code, create, cancel, status, formatters)

Modified files

  • src/api.jsappBaseUrl property, appRequest() helper, 7 new API methods
  • src/cli.js — import + register subscribe command, table formatting for subscribe subcommands, HELP string
  • src/schema.json — subscribe command schema

Test plan

  • npm test passes (all 24 test files, 1299 tests)
  • Manual test: nansen subscribe plans --table
  • Manual test: nansen subscribe promo-code TESTCODE
  • Manual test: nansen subscribe create --price-id <id> --promo-code <code>
  • Manual test: nansen subscribe status
  • Manual test: nansen subscribe cancel

@gulshngill gulshngill force-pushed the feat/ecint-6533-subscribe-command branch from 2d94f42 to 0fc46fc Compare April 6, 2026 08:32
@gulshngill gulshngill force-pushed the feat/ecint-6533-subscribe-command branch from 0fc46fc to 5bacb9c Compare April 6, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant