Skip to content
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

Create pricing.yml #65

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions source/examples/Pricing/pricing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
pricingPlans:
declarative:
en:
- name: Premium subscription 1 month
priceCurrency: EUR
price: 50.00
billingDuration: month
unit: recurring
maxTransactionQuantity: 200000
offering:
- High Quality Pets data
- High amount of transactions
- Billed monthly
executable:
- name: Premium subscription 1 year
type: Stripe
# On Stripe to get started with Payment Links, create a product, then use that product to create a price.
reference: https://prometheus.io/docs/prometheus/latest/querying/basics/

# CREATE: Here we want to provide YAML or alike as code in order to create the product in Stripe
# Stripe supports standard pricing (charging the same price for each unit—either
# one time or recurring) and Customer chooses price (letting your customer specify
# the price). It doesn’t support advanced options like package pricing, graduated
# pricing, or volume pricing. Additionally, Customer choose prices currently doesn’t
# support recurring payments or donations. https://docs.stripe.com/payment-links/api

create:
spec: |-
stripe products create \
--name="Premium subscription 1 year"

stripe prices create \
--currency=eur \
--unit-amount=50 \
-d "recurring[interval]"=month \
-d "product_data[name]"="Premium subscription 1 year"

# MODIFY: Here we want to provide YAML or alike as code in order to modify the product in Stripe

update:
spec: |-
- update the product
- update the price

# RETIRE: Here we want to provide YAML or alike as code in order to retire the product in Stripe

retire:
spec: |-
- retire the product

# PURCHASE: Here we want to generate active link or other information
# to ignite the purchase on Stripe

purchase:
spec: |-
- generate or get the link in order to provide method for client to ignite purchase process


Loading