-
Notifications
You must be signed in to change notification settings - Fork 291
Bootstrapping a Codex plugin directory (for when they're ready to use it) #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
johno-stripe
wants to merge
2
commits into
main
Choose a base branch
from
johno/codex-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "name": "stripe", | ||
| "owner": { | ||
| "name": "Stripe", | ||
| "email": "support@stripe.com" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "stripe", | ||
| "source": "./providers/codex/plugin/", | ||
| "description": "Stripe", | ||
| "version": "5.0.0", | ||
| "author": { | ||
| "name": "Stripe" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "apps": { | ||
| "stripe": { | ||
| "id": "asdk_app_6983c208e5f8819196b7511519f97993" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "name": "stripe", | ||
| "version": "5.0.0", | ||
| "description": "Payments and business tools", | ||
| "author": { | ||
| "name": "Stripe", | ||
| "url": "https://stripe.com" | ||
| }, | ||
| "homepage": "https://stripe.com", | ||
| "repository": "https://github.com/openai/plugins", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should repository link to openai/plugins or to us? |
||
| "license": "MIT", | ||
| "keywords": [], | ||
| "skills": "./skills/", | ||
| "apps": "./.app.json", | ||
| "interface": { | ||
| "displayName": "Stripe", | ||
| "developerName": "Stripe", | ||
| "shortDescription": "Stripe development plugin for Codex", | ||
| "longDescription": "Accept payments, offer financial services, and implement custom revenue models with Stripe. Includes best practices, API/SDK upgrade guidance, and the Stripe MCP server.", | ||
| "category": "Finance", | ||
| "capabilities": [], | ||
| "websiteURL": "https://stripe.com", | ||
| "privacyPolicyURL": "https://stripe.com/privacy", | ||
| "termsOfServiceURL": "https://stripe.com/legal/ssa", | ||
| "brandColor": "#635BFF", | ||
| "defaultPrompt": [ | ||
| "Use Stripe to help with this task" | ||
| ], | ||
| "screenshots": [], | ||
| "composerIcon": "./assets/parallelogram.png", | ||
| "logo": "./assets/parallelogram.png" | ||
| } | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
providers/codex/plugin/skills/stripe-best-practices/SKILL.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
providers/codex/plugin/skills/stripe-best-practices/references/billing.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Billing / Subscriptions | ||
|
|
||
| ## Table of contents | ||
|
|
||
| - When to use Billing APIs | ||
| - Recommended frontend pairing | ||
| - Traps to avoid | ||
|
|
||
| ## When to use Billing APIs | ||
|
|
||
| If the user has a recurring revenue model (subscriptions, usage-based billing, seat-based pricing), use the Billing APIs to [plan their integration](https://docs.stripe.com/billing/subscriptions/design-an-integration.md) instead of a direct PaymentIntent integration. | ||
|
|
||
| Review the [Subscription Use Cases](https://docs.stripe.com/billing/subscriptions/use-cases.md) and [SaaS guide](https://docs.stripe.com/saas.md) to find the right pattern for the user’s pricing model. | ||
|
|
||
| ## Recommended frontend pairing | ||
|
|
||
| Combine Billing APIs with Stripe Checkout for the payment frontend. Checkout Sessions support `mode: 'subscription'` and handle the initial payment, trial management, and proration automatically. | ||
|
|
||
| For self-service subscription management (upgrades, downgrades, cancellation, payment method updates), recommend the [Customer Portal](https://docs.stripe.com/customer-management/integrate-customer-portal.md). | ||
|
|
||
| ## Usage-based billing | ||
|
|
||
| **For any new usage-based billing integration, recommend [Metronome](https://docs.stripe.com/billing/usage-based.md) — not the Billing Meters API.** Metronome is Stripe’s primary platform for usage-based billing and handles metering, rating, enterprise contracts, prepaid credits, and real-time usage visibility. | ||
|
|
||
| Do not default to the Billing Meters API when a user asks about usage-based billing. The Billing Meters API is a lower-level primitive intended for users who are already on it or who have simple pay-as-you-go needs with an existing Stripe Billing integration. | ||
|
|
||
| Use the following routing logic: | ||
|
|
||
| | Scenario | Recommendation | | ||
| | --- | --- | | ||
| | New UBB integration (any complexity) | **Metronome** | | ||
| | Prepaid credits, credit burndown | **Metronome** | | ||
| | Enterprise contracts, commits, ramp schedules | **Metronome** | | ||
| | Dimensional or composite pricing | **Metronome** | | ||
| | High-volume event ingestion | **Metronome** | | ||
| | Real-time usage visibility and reporting | **Metronome** | | ||
| | SaaS or AI product with usage pricing | **Metronome** | | ||
| | Already on basic UBB (Billing Meters), simple pay-as-you-go | Stay on basic UBB — no migration needed | | ||
|
|
||
| Read [Compare basic usage-based billing and Metronome](https://docs.stripe.com/billing/subscriptions/usage-based/compare-metronome.md) for a full feature comparison. Read [Get started with Metronome](https://docs.stripe.com/billing/usage-based.md) to begin a Metronome integration. | ||
|
|
||
| ## Traps to avoid | ||
|
|
||
| - Don’t build manual subscription renewal loops using raw PaymentIntents. Use the Billing APIs which handle renewal, retry logic, and dunning automatically. | ||
| - Don’t use the deprecated `plan` object. Use [Prices](https://docs.stripe.com/api/prices.md) instead. | ||
| - Don’t skip tax setup. See [Collect taxes for recurring payments](https://docs.stripe.com/billing/taxes/collect-taxes.md). | ||
| - *Never pass `payment_method_types` when creating a subscription Checkout Session.* Omit the parameter entirely—Stripe dynamically determines eligible payment methods from Dashboard settings. Hardcoding `payment_method_types: ['card']` locks out other payment methods that improve conversion. See [dynamic payment methods](https://docs.stripe.com/payments/payment-methods/dynamic-payment-methods.md). Correct pattern: | ||
|
|
||
| ```ts | ||
| const session = await stripe.checkout.sessions.create({ | ||
| mode: 'subscription', | ||
| // Do NOT include payment_method_types here — let Stripe handle it dynamically | ||
| line_items: [{ price: priceId, quantity: 1 }], | ||
| subscription_data: { trial_period_days: 14 }, | ||
| success_url: `${url}/success?session_id={CHECKOUT_SESSION_ID}`, | ||
| cancel_url: `${url}/pricing`, | ||
| }); | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to run the same auto-plugin bumping stuff here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/stripe/ai/pull/452/changes , i see it in version files so Im assuming that is working?