#tree-of-life_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1277511787561877619
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tree-of-life_checkout-prefill-data, 3 days ago, 35 messages
- tree_subscription-resume, 3 days ago, 50 messages
- tree_checkout-email, 4 days ago, 33 messages
- tree_subscription-checkout, 5 days ago, 25 messages
when i do this
subsession = stripe.SubscriptionItem.modify(
'sub_1Prw8BSJIEFbQRuHmHfRQ3JQ',
price='price_1PrvKeSJIEFbQRuHbnkGOOSb'
)
what is the issue?
subscription id is correct
can you paste the request id in that screenshot here? the one that starts with the prefix req_
can you paste the request id in the previous screenshot here? the one that starts with the prefix req_
INFO:stripe:message='Request to Stripe api' method=post url=https://api.stripe.com/v1/subscription_items/sub_1Prw8BSJIEFbQRuHmHfRQ3JQ
INFO:stripe:message='Stripe API response' path=https://api.stripe.com/v1/subscription_items/sub_1Prw8BSJIEFbQRuHmHfRQ3JQ response_code=404
INFO:stripe:error_code=None error_message='Invalid subscription_item id: sub_1Prw8BSJIEFbQRuHmHfRQ3JQ' error_param=None error_type=invalid_request_error message='Stripe API error received'
File "Z:\software\python11\Lib\site-packages\stripe\_subscription_item.py", line 635, in modify
cls._static_request(
File "Z:\software\python11\Lib\site-packages\stripe\_api_resource.py", line 177, in _static_request
return _APIRequestor._global_instance().request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Z:\software\python11\Lib\site-packages\stripe\_api_requestor.py", line 196, in request
resp = requestor._interpret_response(rbody, rcode, rheaders)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Z:\software\python11\Lib\site-packages\stripe\_api_requestor.py", line 732, in _interpret_response
self.handle_error_response(rbody, rcode, resp.data, rheaders)
File "Z:\software\python11\Lib\site-packages\stripe\_api_requestor.py", line 321, in handle_error_response
raise err
stripe._error.InvalidRequestError: Request req_uN9kylh5nQaLxl: Invalid subscription_item id: sub_1Prw8BSJIEFbQRuHmHfRQ3JQ```
This code is to modify a SubscriptionItem
stripe.SubscriptionItem.modify(
'sub_1Prw8BSJIEFbQRuHmHfRQ3JQ',
price='price_1PrvKeSJIEFbQRuHbnkGOOSb'
)
a SubscriptionItem starts with the prefix si_
thnx for figure it out alex
i have 2 more question
import stripe
stripe.api_key = "sk_test_tR3PYbcVNZZ796tH88S4VQ2u"
stripe.SubscriptionItem.modify(
"si_xxxxxxxxx",
price="{{NEW_PRICE_ID}}",
)
#what is the different between this two
stripe.Subscription.modify(
"sub_xxxxxxxxx",
items=[{"id": "{{SUB_ITEM_ID}}", "deleted": True}, {"price": "{{NEW_PRICE_ID}}"}],
)
i do understand in second one u delete the previous subscription but what make it different with first one
and ```py
stripe.checkout.Session.modify("cs_test_a1qT06ElW8z7aUd3IdjaXl74tDpmNoFluuaBjKVedNv79ZpvY96GvvZefZ",metadata={'order_customer':None,'order_customer_email':None})
anyone their?
Hi @twin jungle I'm taking over this thread
sure bro i just need these two question knowledge
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site 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.
i didnt understand why u need request id
So that I can help you troubleshoot
i am just asking knowledge
You mentioned the email is blank, so that I want to see what request you made earlier.
I don't need you to create a new session, you mentioned that an update made the "previous session email to blank ", so that I just need the ID of the update request.
sec i will just create an session and send u its id u modify it and make it email and other detail to blank
req_rbrVNVxt8bNHza
INFO:stripe:message='Request to Stripe api' method=post url=https://api.stripe.com/v1/checkout/sessions
INFO:stripe:message='Stripe API response' path=https://api.stripe.com/v1/checkout/sessions response_code=200
cs_test_a1WUsVhF48XzUzTYxUg94F0s1dSIqzA9xa0f8pOV1oXA7OOTPjICwm29Vq
so how do we rest its default value ?
What default value?
like email address to null
that the problem i dont want to have it carry email and address i am controlling it from frontend
morever i need to create new seassion just for that was worried if wasting those session just for email and address
req_rbrVNVxt8bNHza isn't an update request, can you share with me the ID of the request that you made to update?
To clarify, are you asking how to unset the customer_email of a existing checkout session? If so, that's no possible because the only data you can update is metadata https://docs.stripe.com/api/checkout/sessions/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
req_xCSflGjKPu4JoT
what metadata
req_xCSflGjKPu4JoT is the checkout session creation request, not the update request that you mentioned earlier.
check the API reference that I shared
i read it earlier as well but didnt understand what it is
which part you don't unederstand?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
forget it i dont need to understand it either
I'd suggest you read the text
yah i read it
but not much detail mention what parameter to pass
anyway forget about it since it cant update email and address so no use to me
last question was this
They are the same
ah i got thnx alot
thank you jack and alex â¤ď¸ have a nice day
wait i forget 1 thing to ask sorry
how much hour or day session remain valid? once been created
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-expires_at by default 24 hours
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.