#alliance-paymentintent-react

1 messages ยท Page 1 of 1 (latest)

bronze lodgeBOT
glad fern
pallid cove
#

Yes
Icreated the susbcription in BackEnd then I sent it to the frontEnd, then when when status = "requires_action" I call the previous request with the client_secret that I found in my payment_intent

glad fern
#

Can you share the ID of a Payment Intent that you were using for testing?

pallid cove
#

id
:
"in_1MTnVlGfA2lQACd1SZ9pfhaK"

glad fern
#

Sorry, got my threads mixed up, ignore the above (I'm deleting it as well).

#

Yeah, the Payment Intent there seems to be in a requires_action state. Have you logged the client_secret that your frontend is receiving to ensure it matches the client_secret of this intent?

pallid cove
#

How can I log the client_secret please?

Because After the front receiving it I make this call

this.props.stripe .handleCardAction('{PAYMENT_INTENT_CLIENT_SECRET}').then(function(result) {
console.log(result);
});

#

So now im not sure if it is a ReactJs issue or a Stripe issue

glad fern
#

It looks like you have a log line that you can use a reference: console.log(result);
I would suggest adding a similar line before this.props.stripe.handleCardAction, and log out whatever variable you're using to hold the client secret of your payment intent.

pallid cove
#

Yes I alrady did it and the value is correct. It show me this:
pi_3MTnVlGfA2lQACd10HiM42j7_secret_DldCfXzO9Iox4e4iqVx2Rsxqb

#

here is the error message when I call handleCardAction

IntegrationError: handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.

glad fern
#

Hm, does using confirmCardPayment as the error suggests resolve the behavior you're encountering?

pallid cove
#

it works!!
you re verry smart!

#

I have status = "succeeded"

so what is the next step please?

is my subscription valid now?

glad fern
pallid cove
#

I mean the status of my paymentIntent
is succeeded.

Im working with 3DS payment in suscription. I would like to know if there is another step to validate my subscription or its ok.
Here is my last subscription:
"sub_1MTokOGfA2lQACd1H45eOwYn"

eternal jolt
#

Hello ๐Ÿ‘‹
Give me a moment to take a look

#

Hello ๐Ÿ‘‹
The subscription ID you've shared seems to be active

#

so you're all set

pallid cove
#

Cool.
Now I have another case, its when the subscription required a free trial and the user subscribe with 3DS card

#

The backend send me the seti_1Eu...

I have to create a setupIntent in my front End?

eternal jolt
#

You can use the pending_setup_intent from Subscription object to render elements client-side and collect the payment method

pallid cove
#

I see!
But what is the function please?

eternal jolt
#

function for what?

pallid cove
#

im in frontEnd and I have the pending_setup_intent .

I need the JS function that I have to use to render elements client-side and collect the payment method

eternal jolt
#

Ah, I see. Let me check if we have any examples for this in React

#

does that make sense? @pallid cove