#mxd
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Can you provide more information about this?
What error are you seeing?
i downloaded the app and ran it
i get the following
Not Found
127.0.0.1 - - [25/Oct/2022 09:53:58] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 09:54:01] "GET /create-checkout-session HTTP/1.1" 404 -```
in the browser
this is the route provided by stripe : @app.route('/', methods=['GET']) def get_index(): return current_app.send_static_file('index.html')
but theres not even an index.html file in the public directory
I don't think there's an index.html file in the sample
You may need to create one of your own
yeah so i did that
and it doesn't detect the index
i tried the /checkout route and same thing, 404 error
did you try restarting the server?
yes of course
gotcha. give me a couple minutes, let me see if I can reproduce this behavior
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:4242/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 176-922-053
127.0.0.1 - - [25/Oct/2022 10:17:29] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:17:30] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:17:30] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:17:32] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:19:03] "GET /checkout HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:19:15] "GET /cancel HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:19:26] "GET /create-portal-session HTTP/1.1" 404 -
127.0.0.1 - - [25/Oct/2022 10:19:40] "GET /create-checkout-session HTTP/1.1" 404 -```
can you try going to http://127.0.0.1:4242/checkout.html
I think the example doc needs to call this out explicitly but since there's no index file, the route fails
yes! do you have the power to change it?
and add a ? to checkout.html is the way to make it work?
no sorry, question mark was supposed to be outside the url
/create-checkout-session is a POST path
Checkout.html calls this route and generates a checkout session
yeah that works now, except for when i click checkout, theres the server error
list index out of range
127.0.0.1 - - [25/Oct/2022 10:24:51] "POST /create-checkout-session HTTP/1.1" 500 -```
huh that seems to be coming from your server.js or server.py file.
I don't see an error on my end after downloading the example a few minutes ago
i dont have a server.js, i have a client.js
no im using the python flask app
yeah that's the file I'm referring to.
um
do you think its due to the lookup keys?
that was another thing i found in the quickstart
yeah Idk, im literally using the code provided
Give me a couple of minutes to download and reproduce
Can you open your network console to see if you have any errors there?
all i got was:
can you try adding a print statement in your create-checkout-session method in server.py ?
to see what's exactly causing this 500
i got ```127.0.0.1 - - [25/Oct/2022 10:46:11] "GET /checkout.html HTTP/1.1" 200 -
list index out of range
i created a subscription already and used the correct test_keys but its not picking anything up it looks like
parameter_invalid_empty - lookup_keys[0]
You passed an empty string for 'lookup_keys[0]'. We assume empty values are an attempt to unset a parameter; however 'lookup_keys[0]' cannot be unset. You should remove 'lookup_keys[0]' from your request or supply a non-empty value.
The chart may take some time to update.
Do you see them under subscriptions?
https://dashboard.stripe.com/test/subscriptions
yeah so this is the error i encountered, something is confusing in the lookup docs
Can you look into your logs and share the request ID where you're seeing this error?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
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.
ok so I tried it and still same error
<!-- Add a hidden field with the lookup_key of your Price -->
<input type="hidden" name="lookup_key" value="20.00" />
<button id="checkout-and-portal-button" type="submit">Checkout</button>
</form>```
i added the value 20.00 for the lookup key
idk
what now?
try a bunch of stuff and come back?
That's the point of quickstart guides ๐
You can use it as a reference to build your own integration
i dont have any confidence if I cant get the quickstart to operate ...
We also have step-by-step docs for this
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
NP! ๐ Happy to help
Good luck