#Fattmonstoer-Node
1 messages · Page 1 of 1 (latest)
Hi , i basically just want to initiaite a simple test of data going from my usage record script to the the usage of the particular customer for a subscription in the stripe dashboard
how would i setup my code and which files do i need to have. the documentation as detail as it is (which i appreciate) got me a little overwhelmed
What's your current project setup?
Not really a robust setup , our product is running in a different environment running on MERN tech stack
I wanted to test out the Stripe API's and created a landing page on a no code landing page creator (i can add custom code there) and have added a pricing table (subscriptions) . I now want to start sending customer usage data to the stripe dashboard from my end which i need help setting up
im also getting a 401 error while trying to retrieve customers
https://stripe.com/docs/api/usage_records/create?lang=node this is the API you shall call to create a usage record.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Let me help you with the 401 error. Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
Aaah , error message is saying that my api key is not defined but as you can see above (blackened out i have provided it)
they were created from the pricing table component added to my landing page)
You should check your API key and make sure it's valid.
Did you pass in a key that starts with pk_ or sk_ ?
Ah I know the problem. You've created two stripe instance in your code, and you didn't pass API key in the second instance
aah
yes
commenting out the second one works for me
thanks
i will try updating the usage now
if i face any issues will start a new thread
thanks a lot though jack really appreciate it
( also i dont know if this is intentional , but all support threads are public i can see all other support threads which have been created here)
Yes all threads are public. If you prefer to have private discussions, you can send an email to Stripe support https://support.stripe.com/contact and ask them to route to support engineering.
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
HI @lofty harbor i need some clarity on setting up the pricing for my usage based subscriptions
i have a plan setup which is charging this amount per month, i need to enabled usage based billing. Usage will be sent to Stripe via our buisness logic but i need to be able to change the price. the price for usage quantity can be same as the price for the plan subscription which i am unable to find through the dashboard
one work around which i found was creating the plan with multiple prices , but when it appears in the pricing table only 1 price comes up, and i need to add the usage based pricing manually through the dashboard (can this be done through an api?) which then goes ahead and meets my requirement. in the second image the 0.05 is my price per usage for the plan
I don't entirely understand you pricing model here. You are change the price and at the same time you are also reporting usage? Can I suggest you to go through this doc https://stripe.com/docs/products-prices/pricing-models first and see which model suites your business?
So basically there would be 1 Subscription Fee (recurring payment monthly) + a fee on usage (different price than that of the subscription fee) . For example $100 per month to subscribe to the plan and $0.01 per email sent through our platform. What would be the best way to setup this subscription in my pricing model where I am sending the amount of emails sent by my users to the stripe api