#Vladislav Marinov

1 messages · Page 1 of 1 (latest)

fervent gustBOT
placid token
#

My first problem is that I get only this Ideal UI even though I have enabled cards as well (see photo).
Can you share the ID of a Payment Intent where this is an issue? pi_xxx

#

Secondly, if Ideal is chosen can I just open the window in another window and execute code on payment successs as it would be with the card payment.
Can you elaborate more on what exactly you mean here?

mystic oak
#

so on the UI

#

i have this

#

<Elements stripe={stripePromise} options={options}>
<CheckoutForm />
</Elements>

#

and the checkoutForm is

#

<form id="payment-form" onSubmit={handleSubmit}>
<PaymentElement />
<button
type="submit"
disabled={isProcessing || !stripe || !elements}
className="rn-button-style--2 btn-solid mt--40"
>
{isProcessing ? "Processing..." : "Pay now"}
</button>
</form>

#

the pk and the sc load fine

#

the paymentelement is rendering only Ideal payment and no other ones

placid token
#

Yep, I need the pi_xxx ID or the client_secret of the payment that only shows iDEAL

mystic oak
#

i will give you the client secret in test mode

placid token
#

No, that's your API key. I need the client_secret you pass to the <Elements> component

#

pi_foo_secret_bar

#

something like that

mystic oak
#

oh sorry my bad

#

pi_3MvcUwIOw5UGbAo103LgmsiZ_secret_qmXJDiTSVAcbYj6pfQHdO1TQW

placid token
#

Let's see

mystic oak
#

might be a problem on my stripe account but a lot of methods are allowed there

#

it just doesnt make sense to me not to have the UI with more payment options than just IDEal

placid token
mystic oak
#

o wait so 1 measn 0.01

#

I assumed I needed to put a decimal

#

yeah that worked

#

thank you

#

one more question!

#

its more like an advice

placid token
mystic oak
#

So I am building a MERN app and when someone pays I want to execute a POST request that takes body and does things on the backend! If someone pays with Ideal they will probably get redirected and I cannot execute the code in the success page (one that I need to be sure that they will not close it, and second that I will lose the inputs for the request body on page refresh)

#

is there a way if someone pays with Ideal not to get redirected but rather a second window to open, finish the payment and then the original page to see the payment outcome and execute code

placid token
mystic oak
#

yeah, I have tried this but still, I cannot put body from my side to such request

#

it's good method for requests without body from the frontend

placid token
#

The issue with using your approach of making the POST request from a success page is there is no guarantee your customer(s) ever make it to that page. They could pay, and then immediately close the window, there may be technical issues that prevent the redirect.

mystic oak
#

yeah, exactly! But with the webhook I cannot send req.body from my frontend

placid token
#

What details are in that payload?

mystic oak
#

for example you create an account when your payment is successful

#

so i need a way to send to the webhook user details such as image, name, surname, etc.

placid token
#

Yes, but what data is included in the body you send to your backend that isn't included in a payment_intent.* webhook event?

#

My recommendation would be to maybe include those in the metadata of the Payment Intent

fervent gustBOT
mystic oak
#

so i can submit an entire formData with the payment intened?

#

can I add a file because on sign up I need to upload a profile picture with multer and AWS so the user has profile picture

wooden mason
#

Hi! I'm taking over this thread.

#

You could store the file on your server with a specific ID, and then store that ID in the PaymentIntent metadata field.

mystic oak
#

okay, I will try to figure it out myself with the provided help

#

if I cannot, I will probably end up here

#

one more thing

#

can I actually customize the order of the payment methods

#

in the UI

#

lets say Card Details then to be Ideal and then in the smaller menu the rest?

#

as you can see on the top currently first is card details and then Klarma

wooden mason
mystic oak
#

okay perfect

#

thank you very much for the help

#

the support here is awesome

wooden mason
#

Happy to help 🙂

mystic oak
#

the chat will stay right?