#jonas-t_unexpected
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/1406921479161118751
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ! I work for the Free and Open source software TiBillet
The code can be viewed here :
For the price object creation :
https://github.com/TiBillet/Fedow/blob/0c777b228c8eefc78cac8bcc17ae8a9e6bd032e6/fedow_core/models.py#L219
For the checkout link :
https://github.com/TiBillet/Fedow/blob/0c777b228c8eefc78cac8bcc17ae8a9e6bd032e6/fedow_core/views.py#L1012
👋 Hi there. I can take a look at this for you
Hi Arran !
Thank you very much for your help.
I've searched everywhere in my code and documentation, but I don't understand why this random behavior is occurring.
Can you share some Checkout Session IDs where you see the fixed price being shown, and where you see the expected behaviour?
Yes. Here the checkout return :
<Session checkout.session id=cs_live_a1XgF0ux8fhqX1M9nJCr3JlBLsZ9DSGqT65PYho7ohi5mnFHHfsw7ssqPx at 0x7fd83053b510> JSON: {
"adaptive_pricing": {
"enabled": true
},
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 4275,
"amount_total": 4275,
"automatic_tax": {
"enabled": false,
"liability": null,
"provider": null,
"status": null
},
"billing_address_collection": null,
"cancel_url": "https://3peaks.tibillet.re/my_account/48d9fb9e-06e5-4f59-9eb9-8946b65b9883/return_refill_wallet/",
"client_reference_id": "3e06c70e-9008-4a17-b181-4d3583812280",
"client_secret": null,
"collected_information": {
"shipping_details": null
},
"consent": null,
"consent_collection": null,
"created": 1755502614,
"currency": "eur",
"currency_conversion": null,
"custom_fields": [],
"custom_text": {
"after_submit": null,
"shipping_address": null,
"submit": null,
"terms_of_service_acceptance": null
},
"customer": null,
"customer_creation": "if_required",
"customer_details": {
"address": null,
"email": "jturbeaux@pm.me",
"name": null,
"phone": null,
"tax_exempt": "none",
"tax_ids": null
},
"customer_email": "jturbeaux@pm.me",
"discounts": [],
"expires_at": 1755589014,
"id": "cs_live_a1XgF0ux8fhqX1M9nJCr3JlBLsZ9DSGqT65PYho7ohi5mnFHHfsw7ssqPx",
"invoice": null,
"invoice_creation": {
"enabled": false,
"invoice_data": {
"account_tax_ids": null,
"custom_fields": null,
"description": null,
"footer": null,
"issuer": null,
"metadata": {},
"rendering_options": null
}
},
"livemode": true,
"locale": null,
"metadata": {
"signed_data": "eyJwcmltYXJ5X3Rva2VuIjogIjBiZTc4MTZlLWQzYzQtNDcyNS1hMzQ2LTE5MDhiOWEyYjgwZCIsICJ1c2VyX3Rva2VuIjogIjgwNWQzODdlLWI0NGQtNDdlNi04NDIzLWQzNWI3OTc0NTdiNCJ9:aufw3gwr1QAaEwRnSGKPKU1fQqPrwv0rEn7mL66nPt8"
},
"mode": "payment",
"object": "checkout.session",
"origin_context": null,
"payment_intent": null,
"payment_link": null,
"payment_method_collection": "if_required",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"payment_status": "unpaid",
"permissions": null,
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"saved_payment_method_options": null,
"setup_intent": null,
"shipping_address_collection": null,
"shipping_cost": null,
"shipping_details": null,
"shipping_options": [],
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "https://3peaks.tibillet.re/my_account/48d9fb9e-06e5-4f59-9eb9-8946b65b9883/return_refill_wallet/",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"ui_mode": "hosted",
"url": "https://checkout.stripe.com/c/pay/cs_live_a1XgF0ux8fhqX1M9nJCr3JlBLsZ9DSGqT65PYho7ohi5mnFHHfsw7ssqPx#fidkdWxOYHwnPyd1blppbHNgWjA0ST1MZGRAMzx%2FbFZpZElSQkhrZERvZ0JxVGN8PXJsMU92UTR8dm42XFJ3ZDFvY2FNVU5cYW4wR2lIaFRjdUo2anEzNlFmdUFPNjV9Rn9gRko2dGBtbXx2NTVjZm9MYE41RycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
"wallet_options": null
}
This link redirects to a page where the user can select the product, but you see variables:
“amount_subtotal”: 4275,
“amount_total”: 4275,
If I request a new checkout link with the same data in the API request, I get the same object with a new link that takes me to a payment page where the amount is fixed:
<Session checkout.session id=cs_live_a10II8wlYzhgqOBUWL597bTcBBFOzHZ7HIgb5fGt6a8nCtNobWUXshjZ9c at 0x7fd8309f8720> JSON: {
"adaptive_pricing": {
"enabled": true
},
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 4275,
"amount_total": 4275,
"automatic_tax": {
"enabled": false,
"liability": null,
"provider": null,
"status": null
},
"billing_address_collection": null,
"cancel_url": "https://3peaks.tibillet.re/my_account/c2043fd0-ba8d-45e7-9f51-e8d2901b274e/return_refill_wallet/",
"client_reference_id": "3e06c70e-9008-4a17-b181-4d3583812280",
"client_secret": null,
"collected_information": {
"shipping_details": null
},
"consent": null,
"consent_collection": null,
"created": 1755502606,
"currency": "eur",
"currency_conversion": null,
"custom_fields": [],
"custom_text": {
"after_submit": null,
"shipping_address": null,
"submit": null,
"terms_of_service_acceptance": null
},
"customer": null,
"customer_creation": "if_required",
"customer_details": {
"address": null,
"email": "jturbeaux@pm.me",
"name": null,
"phone": null,
"tax_exempt": "none",
"tax_ids": null
},
"customer_email": "jturbeaux@pm.me",
"discounts": [],
"expires_at": 1755589006,
"id": "cs_live_a10II8wlYzhgqOBUWL597bTcBBFOzHZ7HIgb5fGt6a8nCtNobWUXshjZ9c",
"invoice": null,
"invoice_creation": {
"enabled": false,
"invoice_data": {
"account_tax_ids": null,
"custom_fields": null,
"description": null,
"footer": null,
"issuer": null,
"metadata": {},
"rendering_options": null
}
},
"livemode": true,
"locale": null,
"metadata": {
"signed_data": "eyJwcmltYXJ5X3Rva2VuIjogIjBiZTc4MTZlLWQzYzQtNDcyNS1hMzQ2LTE5MDhiOWEyYjgwZCIsICJ1c2VyX3Rva2VuIjogIjgwNWQzODdlLWI0NGQtNDdlNi04NDIzLWQzNWI3OTc0NTdiNCJ9:aufw3gwr1QAaEwRnSGKPKU1fQqPrwv0rEn7mL66nPt8"
},
"mode": "payment",
"object": "checkout.session",
"origin_context": null,
"payment_intent": null,
"payment_link": null,
"payment_method_collection": "if_required",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"payment_status": "unpaid",
"permissions": null,
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"saved_payment_method_options": null,
"setup_intent": null,
"shipping_address_collection": null,
"shipping_cost": null,
"shipping_details": null,
"shipping_options": [],
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "https://3peaks.tibillet.re/my_account/c2043fd0-ba8d-45e7-9f51-e8d2901b274e/return_refill_wallet/",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"ui_mode": "hosted",
"url": "https://checkout.stripe.com/g/pay/cs_live_a10II8wlYzhgqOBUWL597bTcBBFOzHZ7HIgb5fGt6a8nCtNobWUXshjZ9c#fidkdWxOYHwnPyd1blppbHNgWjA0ST1MZGRAMzx%2FbFZpZElSQkhrZERvZ0JxVGN8PXJsMU92UTR8dm42XFJ3ZDFvY2FNVU5cYW4wR2lIaFRjdUo2anEzNlFmdUFPNjV9Rn9gRko2dGBtbXx2NTVjZm9MYE41RycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
"wallet_options": null
}
Note: this behavior does not occur with a test environment key.
I always get the expected behavior on test environment : a page with an input that the client chooses.
Taking a look
Here the stripe python module version :
fedow@fedow_django:~/Fedow$ cat poetry.lock | grep stripe
name = "stripe"
{file = "stripe-7.14.0-py2.py3-none-any.whl", hash = "sha256:f39def4dec42b374a39b110ab809c8130e14b7027ee40e3111a658e0f46709cb"},
{file = "stripe-7.14.0.tar.gz", hash = "sha256:556bfa86f8b298b666ff2caa0d754ee19ece52159d12a45ed7ddb02daadd1799"},
Thanks. I see the same behaviour you mention: first checkout lets me choose a price, and the second has €42.75 — though I see the same price shown in both checkout session creation responses
Looking into it further…
Do you have any IDs you can share of the same setup in testmode?
Yes, I'm launching my development env'
"adaptive_pricing": {
"enabled": true
},
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 4280,
"amount_total": 4280,
"id": "cs_test_a1FTKlruszdcvVEbDHZG7mOxVRqelFBdB3uEmMECjaAPjdpC6hNrjj4jYn",
i got the same amount_subtotal and amount_total strange value too
but the checkout url give me the good behavior :
sorry, forgot the id :
"id": "cs_test_a1FTKlruszdcvVEbDHZG7mOxVRqelFBdB3uEmMECjaAPjdpC6hNrjj4jYn",
Thanks for the information and your patience while I looked into this!
Unfortunately, it looks like you're hitting an issue on Checkout with pay-what-you-want. But talking to the team, it will be fixed today
Great, many thanks !
If you'd like, you can create a support case here, and I can keep you updated once it's resolved
Hello @low onyx, we have sent you a direct message, please check it at https://discord.com/channels/@me/1406932519047270431
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
I would love to, thank you! I have many clients, including music festivals with 10,000 people expected this weekend, who are waiting for a resolution 🙂
Okay, I followed the link and answered the questions. Thank you very much.
No worries. Thanks for taking the time to talk with us today
I'll let you know once we have a resolution for this
Thank you very much! I'm relieved to know it's not in my code 🙂 I searched high and low...
Ah, sorry.. looks like the case didn't come through on my end… 😓
Can you please fill it out again, using this new thread below?
Hello @low onyx, we have sent you a direct message, please check it at https://discord.com/channels/@me/1406932519047270431
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Oh yes, sorry, it seems I didn't finish it. Should it be OK now?
Got it now, thanks!