feat: add stripe_agent for product and price management#127
Open
feat: add stripe_agent for product and price management#127
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/4ea37f1c-005c-44cb-94aa-2c9cd8ec147f Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/4ea37f1c-005c-44cb-94aa-2c9cd8ec147f Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add stripe_agent for product and price management
feat: add stripe_agent for product and price management
Apr 8, 2026
LVT-ENG
approved these changes
Apr 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a standalone
stripe_agent.pymodule for managing Stripe products and prices, complementing the existingapi/stripe_inauguration.pycheckout flow.New module:
stripe_agent.pyensure_product(name, *, description, metadata)— idempotent product creation; searches by name first, falls back to create onInvalidRequestError(test-mode accounts)create_price(product_id, unit_amount, currency, *, recurring, metadata)— one-time or recurring price; validates non-emptyproduct_idandunit_amount >= 0; normalises currency to lowercaselist_active_prices(product_id)— returns all active prices viaauto_paging_iteras plaindictlistAll three functions resolve
STRIPE_SECRET_KEYfrom env via a shared_configure_stripe()helper, consistent withapi/stripe_inauguration.py.Other changes
.gitignore— excludesstripe_agent_*.json/stripe_agent_*.log(local API dumps that may contain sensitive product/price IDs)tests/test_stripe_agent.py— 23 unit tests usingunittest.mock.patch; covers validation errors, search-hit/miss paths, fallback onInvalidRequestError, recurring prices, and paging behaviour