#ykuro
1 messages · Page 1 of 1 (latest)
sure, it should be possible if you make the necessary modifications. What have you tried to debug so far? do you see 3 Prices being returned to your frontend?
do you see 3 Prices being returned to your frontend?
I was able to only see 2 Prices on the front end page. Also, I'm a junior engineer so I've barely tried debugging...
The contents of the ".env" file are irrelevant this case, right?
not at this point i guess
your frontend should be making a request to your backend to retrieve the list of Prices to be displayed
what's the response?
what's the response?
Can you tell me how to check the response? I would like to share what you expect.
in the developer tools in your browser, there's a network tab. Identify the request that retrieved the list of Prices and check the response : https://developer.chrome.com/docs/devtools/network/#details
Thank for sharing info, is this right?
no, it's the one named config
Check the response tab
{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}
There seems to be no information on the product I created
I created a file named seed_moribus.json and created a plan with the command "stripe fixtures seed_moribus.json".
i don't understand how the fixture file is related to what you're doing?
I could not judge whether I had created the product correctly to start with so I shared with you how to create it.
for reference
The article I referred to used a fixture file when creating products.
can you ensure you create a Price via the API with that lookup key?
can you paste the Price id here?
sure
price_1MZU8sKhZM6vApyYDjGa9dLL
okay, so if you refresh the page and check the response again, do you see the new price being returned?
{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}
I can not confirm the new price.
what does 'confirming' the price mean?
New Price information was not returned.
did you restart the .NET server so it's running the new code?
ah sorry, Java(screenshots reminded me Visual Studio)
Its ok. I only updated line 128 in Server.java (adding .addLookupKeys("sample_moribus") ), do I need to update anything else?
if you did that, and you have a Price object on your account that has that lookup_key, it should be returned in the prices variable
Yes, I agree with you, but for some reason it is not returning information on new products. Do you have any advices?
I'd add some code to debug it, so for example log what actual parameter you're passing directly from the running code and check your Stripe API logs
for example the most recent request you made, 10 minutes ago, https://dashboard.stripe.com/test/logs/req_Xy0PBuyonCMcO7 , only passed the two lookup_keys and not the third one
so I'm going to say again that you probably didn't save the file or restart the server after changing it.
so I'm going to say again that you probably didn't save the file or restart the server after changing it.
Sorry, I could not restart the server properly.
The third price information was returned and displayed correctly on the screen.
Thank you for your support, @vast echo @drowsy linden
{"publishableKey":"pk_test_51MRAwhKhZM6vApyY8gPUikER1zfc8j2kcAqWm4ESsu8Z4U8RodU8UbsaM4tdtTJ8WhmzytPvgU2QqLTHPfcLAODu00CAeWFTcF","prices":[{"active":true,"billing_scheme":"per_unit","created":1675823061,"currency":"usd","id":"price_1MZ3KbKhZM6vApyYFYrSiDlQ","livemode":false,"lookup_key":"sample_basic","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiqSUEw0ZCjy"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":500,"unit_amount_decimal":500},{"active":true,"billing_scheme":"per_unit","created":1675926122,"currency":"usd","id":"price_1MZU8sKhZM6vApyYDjGa9dLL","livemode":false,"lookup_key":"sample_moribus","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NK8PcV3RlFB1C6"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":14000,"unit_amount_decimal":14000},{"active":true,"billing_scheme":"per_unit","created":1675823062,"currency":"usd","id":"price_1MZ3KcKhZM6vApyYh3mtYH9c","livemode":false,"lookup_key":"sample_premium","metadata":{"sample":"fixed-price"},"object":"price","product":{"id":"prod_NJgiYNUuwVW3Qm"},"recurring":{"interval":"month","interval_count":1,"usage_type":"licensed"},"tax_behavior":"unspecified","type":"recurring","unit_amount":1400,"unit_amount_decimal":1400}]}
If I want to add the price name in each price plan/box, what should I do? I would like to edit the information in each box in various ways for customers.
the name is price.product.description (https://stripe.com/docs/api/products/object#product_object-description)
so you have to modify the code to 'expand' data.product when calling the List Prices API (https://stripe.com/docs/expand#lists) so you can access the Product field of each Price
I suggest you spend some time playing around with that and getting familiar with the code and trying things out , and let us know when you have some code that you've tried and need help with