Please see the tip about formatting Python code here:
My first thought is that if you remove that exception handling (temporarily), you may be able to see more of the traceback information, which could help clarify the issue.
Internal server errors are generally things that Anvil support needs to look into. There’s just no information there for us to give any advice on.
My only general advice would be to go through the Stripe tutorial: Stripe - Taking Payments If everything there works you can compare with what you’re doing and see what might be different.
There is a known issue with Anvil swallowing Stripe exceptions, which we are working on fixing. I apologize for this making it hard to find the error!
If you go into your Stripe dashboard, you should be able to see the exception which is Amount must convert to at least 30 pence. ₹1.00 converts to approximately £0.01
Stripe also takes denominations as integers in the smallest unit for a currency. So if you pass it an integer of 1 INR it is a paisa not one rupee.
Which could easily trigger the error @brooke said the anvil system consumed without repeating to your logs, without it being obvious.
There seems to be a strange problem here! I’ve cloned the Stripe payment app (from the Anvil tutorial) into my account. However, all the transactions are getting mapped to some other Stripe account - the dashboard of which might be visible to you. Can you please explain this to me?
This will possibly help me understand why the same code isn’t working with the app am trying to build.
When you use the Stripe integration, you must connect it to your own Stripe account for the payment to be routed correctly. We’ve now fixed the bug that allowed you to accept payments without a connected account, and refunded those test payments that you made. Sorry for the confusion!
Many thanks for your prompt action and no problem at all. However, my Anvil account is already connected to my Stripe account and I ran the app through my Anvil account.
Re-attempted the transaction, but apparently there are some challenges with authenticating the request. This is the message I get:
It appears that you are creating a direct Charge on a IN-based connected account using a single-use card token owned by your GB-based platform account. As part of our continued investment in India and to meet local data storage requirements, this is no longer allowed, so we had to reject your request. As a possible workaround, try authenticating as the connected account when creating the single-use card token. If you need further assistance, please don’t hesitate to reach out to our support team at https://support.stripe.com/contact.; code: cross_region_card_cloning_violation; request-id: req_vZ1Lh7v9Hd9f6b
Interfaced with Stripe support and got to know :
Stripe accounts from India cannot use the legacy Charges API. You need to use Payment intents and payment methods
Is this something that the team can help with?
Also, once connected to a Stripe account, can deactivation happen automatically from my Anvil account?
Thanks again for reversing my test transactions. However, haven’t yet received the refunds except for one. If you can kindly share about the expected timelines for the refund - that would be greatly appreciated!