#voidy_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1271505892877275147
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
please let me know if the question is vague. i will try to clarify
if we can hop on a quick call, i can explain the problem better, that would also be great
You would have to either pre-create Prices/Products for each type of document (https://docs.stripe.com/api/subscriptions/create#create_subscription-items-price), or you can use price_data when creating the Subscription to declare a new Price/Product at creation time (https://docs.stripe.com/api/subscriptions/create#create_subscription-items-price_data)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Since its for enterprise plans,
one customer might pay 10 cents for invoice
but the other might pay 20 cents
Do i precreate pricing plans with 10, 20, 30, ... cents
and can I make use of metadata to differentiate the document type with unique identifier (invoice, bank statement)
or is there a better way?
Also, is there a way a subscription can have limit on amount rather than a product price?
Let's say I want to have a subscription of 1000$ monthly. And I want the pricing plans to have rate $ (10 cents for invoices) and (20 cents for bank statements)
So there are two pricing plans with different rates, but no specific quantity. And the monthly payment is 1000$
10 cents for invoice pricing
20 cents for bank statement pricing
is just for my internal use in backend to deduct credits based on their rates
and can I make use of metadata to differentiate the document type with unique identifier (invoice, bank statement)
or is there a better way?
You would have to create a different Price object for each
In this billing scanrio are you referring to having a one-time payment of $1000 alongside a usage-based plan for $0.10 on Invoices? Or something else?
The monthly bill that the customer would pay is 1000$.
It would be a recurring monthly subscription.
For that customer,
I want to have different pricing rate for invoice (0.1$ per document) and bank statement (0.2$ per document).
Would it be possible to create two pricing plans for thoese.
And have a monthly billing of 1000$ which would be joint amount for invoice, bank statement
without specifying the respective quantities for those document types
for this case, i was personally thinking of creating single pricing plan for 1000$ in monthly subscription
and specifying the pricing rates for invoices and bank statements in the metadata
I guess I'm sort of confused about how the per-invoice price fits into this. Like, that's just for your own internal tracking? Or do you actually want to charge a variable amount based on how many invoices and bank statements they have?
thats just for my internal tracking
I want to consider stripe's subscription as source of truth on the pricing rates for the documents
so that later if someone wants to update the pricing rate, they can update it on stripe and
so that backend can sync with it, and deduct internal credits accordingly
Okay, so you just need some way to communicate to your own server/database that a Subscription for $1000 a month is for invoices + bank statements. There are a couple ways you can do that. You can either include some description in the Price like "invoices and bank statements" or you can use metadata on the Subscription object and have 2 key/value pairs like 1: "invoices, 2:"bank statements" (https://docs.stripe.com/api/subscriptions/update#update_subscription-metadata)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks a lot ๐
i was getting confused on how exactly should I do it,
and wanted to know more about the standard way of doing it
So in conclusion,
- I can either create a subscription for a certain amount (1000$) and have pricing rates on metadata of subscription
- Have separate pricing plans with pricing rates and quantity for subscription (This is when customer decides on how many invoices/bankstatements they want to process in what rate each month)
I just had these two different requirements on the susbcription as our enterprise plan agreement can get very tricky depending on clients
Yup! It sounds like you have it right