Closed cho-amh-programmerExpert closed 1 month ago
hey there, is there a good reason why you're using a restricted stripe api key? Can you show me a screenshot of your permissions setup?
I can show it, But even when using a standard key, I still have the same issue.
Note that Im in test mode.
Got it, it seems like you have a permissions issue on the Stripe side, and that much is really hard to debug from this package.
Can you try something like this in another python file?
stripe.api_key = "put your api key here"
customers = stripe.Customer.list(email=email)
try:
customer = customers.data[0]
except IndexError:
return False
subscriptions = stripe.Subscription.list(customer=customer["id"])
print(customers.data[0])
print(subscriptions[0])
Yes, let me try. I will report you the result
Here is the result:
It relates to customers = stripe.Customer.list(email=email)
Traceback (most recent call last):
File "C:\Users\amh\Desktop\test.py", line 16, in <module>
s('a.faravardeh@gmail.com')
File "C:\Users\amh\Desktop\test.py", line 6, in s
customers = stripe.Customer.list(email=email)
File "C:\Users\amh\AppData\Local\Programs\Python\Python310\lib\site-packages\stripe\_customer.py", line 1571, in list
result = cls._static_request(
File "C:\Users\amh\AppData\Local\Programs\Python\Python310\lib\site-packages\stripe\_api_resource.py", line 131, in _static_request
return _APIRequestor._global_instance().request(
File "C:\Users\amh\AppData\Local\Programs\Python\Python310\lib\site-packages\stripe\_api_requestor.py", line 176, in request
resp = requestor._interpret_response(rbody, rcode, rheaders)
File "C:\Users\amh\AppData\Local\Programs\Python\Python310\lib\site-packages\stripe\_api_requestor.py", line 566, in _interpret_response
self.handle_error_response(rbody, rcode, resp.data, rheaders)
File "C:\Users\amh\AppData\Local\Programs\Python\Python310\lib\site-packages\stripe\_api_requestor.py", line 242, in handle_error_response
raise err
stripe._error.PermissionError: Request req_nOfvCk198Vnj8P: We're sorry, but we're unable to serve your request.
So?
I'm not sure why this isn't working for you, it looks like this is not a st-paywall issue but an issue with your stripe setup
Btw I forgot to say I'm using a proxy
what is a proxy? why are you using it?
I meant internet proxy. (In windows: Control Panel>Internet Options>Connections). I set a socks proxy for security.
sounds good, I don't think this is a st-paywall issue, it just looks like you need to figure out your stripe account + api setup. I'm going to close this issue!
Stripe doesn't support proxy. Can you add that support as an option into st-paywall?
I cannot change how stripe handles their api
I meant that stripe accepts parameters for proxy.
“PermissionError: Request req_RvqaWvQhVA7wxB: We’re sorry, but we’re unable to serve your request.” is the error that I get when using the st-paywall component. I have already set the permissions for the restricted stripe api key i used to: Subscriptions >>> Read Customers >>> Read
But I still get that error. Can somebody help me with that please?