#truonguet57_api

1 messages ยท Page 1 of 1 (latest)

plush fogBOT
#

๐Ÿ‘‹ 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.

modern bridge
#

The error message is

You must provide a `return_url` when confirming a PaymentIntent with the payment method type cashapp.
wooden aspen
#

But I don't find that parameter in guide

modern bridge
#

Hmm I see. One moment

#

Hmm are you using the Magento plugin?

wooden aspen
#

Yes

#

Plugin from Stripe

modern bridge
#

Could you write to Support? We have a dedicated team for Magento plugin there

wooden aspen
#

Yes

#

but I don't understand where my request is wrong

#

The error is't from Magento code

modern bridge
#

Yeah, the team there would be able to assist

plush fogBOT
wooden aspen
#

@dense bough , Can you help me this issue?

dense bough
#

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.

wooden aspen
#

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

dense bough
#

Or your Magento plugin does.

wooden aspen
#

I added return_url but it has an error @dense bough

dense bough
#

Where did you add it?

wooden aspen
#

@modern bridge who can I ask for support

wooden aspen
dense bough
wooden aspen
dense bough
#

Can you please share a screenshot of that message?

wooden aspen
dense bough
#

They wouldn't advise that since we don't know how Magento plugin works.

dense bough
wooden aspen
#

Please see my test

dense bough
#

What is this file?

wooden aspen
#

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

dense bough
#

You can't provide return_url when you create the Subscription. You need to do it when you confirm the payment.

wooden aspen
#

But when I remove return_url and it has this error

#

I dont know why create subscription APi confirm pendingPayment

dense bough
#

Why are you using a saved PaymentMethod?
What are you trying to achieve exactly?

wooden aspen
#

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

dense bough
#

I don't know if Magento supports that, but it's the recommended way to build a Subscription integration.

wooden aspen
#

I compare it with my code

#

It isn't different

#

I want to know why I call API has error

#

The wrong in my request body

dense bough
#

Are you following any guide to build your current integration?

wooden aspen
#

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

dense bough
#

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.

wooden aspen
#

I want you to ket me know where i went wrong in calling the subscription creation api

plush fogBOT
half pine
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

wooden aspen
#

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

#

Please let me know the wrong in my request body

half pine
#

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

wooden aspen
#

Yes

half pine
#

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

wooden aspen
#

Do you want me to set payment method when confirm paymentIntent?

half pine
#

you can do that

wooden aspen
#

Thank you for your advice

half pine
#

let me know if you need any more help

wooden aspen
half pine
plush fogBOT
wooden aspen
#

@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?

wheat dagger
#

when you say QR code what are you referring to?

wooden aspen
#

Hi @wheat dagger when I create subscription by Cash App, I must scan QR code to pay for some amount, please my attachment

#

With comming up invoice, How will the money be paid?

wheat dagger
#

ah I see

#

I believe, you don't need to scan a QR code the next time, we automatically charge the CashApp account.