#mateusz-kuda_api
1 messages · Page 1 of 1 (latest)
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.
- mateusz-kuda_api, 6 days ago, 8 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250730290528387114
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Could you please share the code that creates the Stripe Elements?
Yes off coures
But yeah, this looks like a bug
const options = {
locale: 'en',
mode: 'payment',
amount: 2583,
setupFutureUsage: 'off_session',
currency: 'pln',
fonts: [],
appearance: {},
};
we are using this optiosn
Are you following this guide? https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription
Because the payment intent is automatically created during subscritpion creation
yes this one
but instread of doing this:
const res = await fetch("/create-intent", {
method: "POST",
});
we are creating subscritpion
but still payment intent will be created
Yes, the example I shared is for a Subscription
Yes now I see
so we are using
let me check the subscription version
Still, the way you implemented it is correct, and it shouldn't give you an error.
What happens if you disable automatic tax? It might be a seemingly unrelated feature, that unfortunately breaks the flow. Could you please try it and let me know if it changes the situation?
Yes we can do it, please wait a second
new req id for subscritpion creation: req_uDj37vVQmDxX7j
request for submit: req_izcDptvkLUkX8b
still the same
As I can see for payment_method_types by default you are using card, maybe this is an error?
The list of payment method types (for example, card) that this SetupIntent can use. If you don’t provide this, it defaults to [“card”].
Because we are not using this field
I must go to meeting without laptop, could I ask you not to close the thread? I'll be back within 30 minutes, sorry for the problem
Last thought, this might be due to your API version, in the latest version Subscription will default to automatic_payment_method. You can try making the call with a newer API version.
How I can change the api version?
Hey! Taking over for my colleague.
https://docs.stripe.com/api/versioning
Thanks
Happy to help!
Ok, unfortunatelly changing the API version for request didn't help
What Stripe JS version are you using ?
Let me check
How I can check the version of JS? We are including this one in our website:
<script src="https://js.stripe.com/v3" />
on request logger I see 2023-08-16
Yes that's should be the latest version of Stripe js
And for this one request I changed API version by using the lates version: 2024-04-10 but only for API
Ok I see.
The issue is that you are using mode:payment and not mode: subscription when creating the payment element
For example:
const options = {
mode: 'subscription',
amount: ...,
currency: '...',
// Fully customizable with appearance API.
appearance: {/*...*/},
};
// Set up Stripe.js and Elements to use in checkout form
const elements = stripe.elements(options);
// Create and mount the Payment Element
const paymentElement = elements.create('payment');
paymentElement.mount('#payment-element');
We are checking