#voidy_best-practices

1 messages ยท Page 1 of 1 (latest)

grim gorgeBOT
#

๐Ÿ‘‹ 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.

forest robin
#

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

pure lake
#

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)

forest robin
#

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

pure lake
#

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

pure lake
forest robin
#

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

pure lake
#

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?

forest robin
#

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

pure lake
#

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)

forest robin
#

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,

  1. I can either create a subscription for a certain amount (1000$) and have pricing rates on metadata of subscription
  2. 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

pure lake
#

Yup! It sounds like you have it right