1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill useautumn/skills --skill add-payments- SKILL.md3.3 KB
Overview
This skill adds Stripe checkout and payment flows using Autumn to handle subscriptions, upgrades, downgrades, cancellations, and prepaid seat/credit purchases. It provides client and server helpers to create checkout sessions, attach saved cards, and retrieve product scenarios so you can present accurate UI and finalize purchases cleanly.
How this skill works
The skill exposes checkout and attach endpoints: checkout returns a Stripe URL for new customers or preview data for returning customers; attach confirms a purchase when a card is already on file. It also lists products with scenario metadata (new, active, upgrade, downgrade, scheduled, renew) so your UI can render correct actions and button text. Backend helpers accept optional quantities and feature overrides for seat-based or prepaid products.
When to use it
- Implement Stripe checkout flows for subscriptions or one-time purchases.
- Support returning customers who already have a card on file (attach flow).
- Show accurate UI states like upgrade, downgrade, scheduled renewal, or current plan.
- Handle seat-based or prepaid pricing with quantity/feature options.
- Automatically manage proration and renewal behavior without custom billing logic.
Best practices
- Always use products.list to get scenario and properties instead of reinventing logic.
- Check data.url from checkout: redirect when present, otherwise prompt user to confirm attach.
- Pass a success_url to checkout so Stripe redirects back on completion.
- Prefer attaching a free plan to cancel instead of doing a hard cancellation when appropriate.
- For prepaid/seat pricing, pass options with feature_id and quantity to checkout to ensure correct invoicing.
Example use cases
- React pricing table that shows Subscribe/Start Trial/Upgrade/Downgrade buttons based on product.scenario.
- Backend endpoint that creates a Stripe checkout session and redirects users when data.url is returned.
- Flow for returning customers that shows a confirmation dialog and calls attach to finalize purchase with card on file.
- Seat-based purchase screen that passes quantity or credits options to checkout for bulk credit packs.
- Cancellation UI that either schedules cancellation or attaches a free plan depending on product properties.
FAQ
checkout returns data.url when Stripe needs a hosted checkout session; redirect there. If url is null you receive preview data so you should confirm and call attach to finalize with a saved card.
How do I handle upgrades and proration?
Autumn computes scenarios and handles proration automatically. Use products.list to detect an upgrade scenario and let Autumn manage proration rather than implementing custom logic.