Repository navigation
feat: Add Stripe provider integration - #6
Conversation
|
@sancho1952007 done with stripe, let me know if you'd like something changed! |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
|
Warning Rate limit exceeded@yashranaway has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 21 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds Stripe as a new provider: docs, README updates, a new docs/stripe guide, package dependency, and a CLI command implementing Stripe→Dodo Payments migrations for products, coupons, and customers with interactive and non-interactive modes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as CLI (stripe command)
participant STR as Stripe API
participant Dodo as Dodo Payments API
User->>CLI: run "migrate stripe" [flags/interactive]
CLI->>STR: auth with provider-api-key
CLI->>Dodo: auth with dodo-api-key
alt Interactive flow
CLI->>User: prompt for Dodo brand & migrate-types
User-->>CLI: selects brand & types
else Non-interactive flow
CLI->>CLI: read brand & types from flags
end
par Products
CLI->>STR: list products + prices
STR-->>CLI: returns products/prices
CLI->>CLI: map to Dodo product payloads
CLI->>User: preview & confirm
User-->>CLI: confirm
CLI->>Dodo: create products/prices (per item)
Dodo-->>CLI: success / error
and Coupons
CLI->>STR: list coupons
STR-->>CLI: returns coupons
CLI->>CLI: map to discounts
CLI->>User: preview & confirm
User-->>CLI: confirm
CLI->>Dodo: create discounts (per item)
Dodo-->>CLI: success / error
and Customers
CLI->>STR: list customers
STR-->>CLI: returns customers
CLI->>CLI: map to Dodo customers (preserve stripe_customer_id metadata)
CLI->>User: preview & confirm
User-->>CLI: confirm
CLI->>Dodo: create customers (per item)
Dodo-->>CLI: success / error
end
CLI-->>User: summary of created items and failures
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
docs/stripe/README.md (1)
4-43: Add languages to fenced code blocksmarkdownlint is flagging the bare fences; adding
bash(or another appropriate identifier) clears the lint errors and renders with proper syntax highlighting.-``` +```bash dodo-migrate stripe</blockquote></details> <details> <summary>README.md (1)</summary><blockquote> `59-118`: **Annotate README code fences with languages** The new fences are missing language hints, triggering `MD040`. Tag them with `bash` so markdownlint (and readers) stay happy. ```diff -``` +```bash dodo-migrate lemonsqueezy@@
-+bash
dodo-migrate stripe@@ -``` +```bash dodo-migrate lemonsqueezy \ --provider-api-key=lsq_XXXXXXXXXXXXXXXX \ --dodo-api-key=dp_XXXXXXXXXXXXXXXX \ --mode=test_mode \ --dodo-brand-id=brand_XXXXXX@@
-+bash
dodo-migrate stripe
--provider-api-key=sk_test_XXXXXXXXXXXXXXXX
--dodo-api-key=dp_XXXXXXXXXXXXXXXX
--mode=test_mode
--dodo-brand-id=brand_XXXXXX
--migrate-types=products,coupons
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
README.md(3 hunks)docs/stripe/README.md(1 hunks)package.json(1 hunks)src/index.ts(2 hunks)src/providers/stripe/index.ts(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md
63-63: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
96-96: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
101-101: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
106-106: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
fixes #5
Summary by CodeRabbit
New Features
Documentation
Chores