#truonguet57_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/1263038384050274354
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The error message is
You must provide a `return_url` when confirming a PaymentIntent with the payment method type cashapp.
But I don't find that parameter in guide
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Could you write to Support? We have a dedicated team for Magento plugin there
Yes
but I don't understand where my request is wrong
The error is't from Magento code
Yeah, the team there would be able to assist
@dense bough , Can you help me this issue?
You must provide return_url when confirming the PaymentIntent. But since our team doesn't know how Magento plugin works, I can't tell you how to do it, unfortunately. Please reach out to support, as my colleague suggested.
I don't confirm PaymentIntent
I only create subscription and pending paymentIntent
I worked good with card type but had an error in cash app
you can see my request body. Please let me known the wrong
Me and my colleague just told you exactly what's wrong โ๏ธ
I don't confirm PaymentIntent
You do: https://dashboard.stripe.com/test/logs/req_i24o6nlDo1bp8Z
Or your Magento plugin does.
But I can't help you beyond that, please reach out to Stripe Support: https://support.stripe.com/?contact=true
Where did you add it?
@modern bridge who can I ask for support
I can modify my code to change request body
Where are you sending this request?
They advised me to come here for support
Can you please share a screenshot of that message?
I send from my browser and I can change request body
They wouldn't advise that since we don't know how Magento plugin works.
What do you mean you send it from your browser?
What is this file?
You can let me know the wrong from my body request
I use Api to create subscription but it has an error
Do you know the wrong in it
I add return_url but it still error
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can't provide return_url when you create the Subscription. You need to do it when you confirm the payment.
But when I remove return_url and it has this error
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I dont know why create subscription APi confirm pendingPayment
Why are you using a saved PaymentMethod?
What are you trying to achieve exactly?
First, I request to Stripe to get PaymentMethod token
AND using it to create subscription
I haven't assigned it to Stripe Customer yet
So it isn't saved PaymentMethod
I recommend you to take a step back and start with this guide: https://docs.stripe.com/billing/subscriptions/build-subscriptions?ui=elements
I don't know if Magento supports that, but it's the recommended way to build a Subscription integration.
I compare it with my code
It isn't different
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I want to know why I call API has error
The wrong in my request body
Are you following any guide to build your current integration?
But I call your api and I get error
Can you introduce me to someone who has experience with API to help me? @modern bridge
Orakaro had to step away and I am replacing them.
CashApp PaymentMethod was not set up correctly, that's why you can't use it to pay for Subscription off-session.
That's why you get an error.
Your integration is non-trivial that's why I suggest to take a step back and build a proper Subscription integration. This will ensure you don't run into similar problems again.
I want you to ket me know where i went wrong in calling the subscription creation api
๐ taking over for my colleague. Let me catch up.
Hi @half pine I have an error when calling subscription creation API
https://dashboard.stripe.com/test/logs/req_i24o6nlDo1bp8Z?t=1721200169
It is missing return_url in request body
I added return_url but there are another error
https://dashboard.stripe.com/test/logs/req_sK2TXaqtPkB6kF?t=1721204699
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Please let me know the wrong in my request body
I totally understand this might seem confusing, since the first error says you need return URL, but the second request where you add return_url says that it's an unknown parameter
Yes
because the subscription API doesn't expect a return_url as a valid parameter
what I suggest you would do is the following
instead of passing the default_payment_method
when creating the subscription
is to create the subscription first
and using the latest_invoice.payment_intent
you would collect the payment method on the frontend
Do you want me to set payment method when confirm paymentIntent?
you can do that
Thank you for your advice
let me know if you need any more help
Hi @half pine I removed default_payment_method but it has error. Can you review my request body and give me an advice?
https://dashboard.stripe.com/test/logs/req_75dFbDdA7CCQzW?t=1721209258
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
you need to specify https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_behavior default_incomplete
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@half pine Thank for your support, I have created subscriptions successfully
I want to ask if I have to scan QR code again for upcomming invoice?
when you say QR code what are you referring to?