#gopi_67606

1 messages ยท Page 1 of 1 (latest)

warped nestBOT
#

Hello! We'll be with you shortly. 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.

stuck kernel
#

hi! do you have more context or an example?

vagrant spindle
#

pi_3OCJ2SD6fLV2vwHg0Fp6RDEh Payment Id is getting failed

#

Can I know the reason?

#

My exceptation is I need to get authenticate popup right while doing the payment

#

I didnot got that

stuck kernel
vagrant spindle
#

const result = await stripe.confirmCardPayment(clientSecret, {
payment_method: paymentMethod.id,
});

#

I am using confirmCardPayment method in front end

stuck kernel
#

cool. And what happens when you call that using the client_secret of that PaymentIntent?

vagrant spindle
#

It is going to be creating the default payment method for the subscription to generate the next invoice

#

Wait

#

I am not using any code to display the authenticate popup

stuck kernel
#

well that would be the reason you're not getting a popup then.

vagrant spindle
#

What code I need to place?

stuck kernel
#

confirmCardPayment should handle that and present 3D Secure, if you are using it correctly.

#

which is why I asked what happens when you call that using the client_secret of that PaymentIntent that you shared. I'd suggest debugging this a little on your end.

vagrant spindle
#

I am thinking the cardPaymentMethod is going to create the payment method for that user

warped nestBOT
vagrant spindle
#

I am wondering why the normal payment is going to failed

topaz bough
#

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

vagrant spindle
#

If I used the 3ds authentication card details for testing it will ask for popup dialog right for authentication?

topaz bough
#

yes that's correct

vagrant spindle
#

But I am not getting the popup dialog for the card number 4000003560000123

topaz bough
#

where did you get that test card from?

vagrant spindle
#

From stripe test cards only

topaz bough
#

you need to use our testing cards found here https://stripe.com/docs/testing

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

vagrant spindle
#

Please give me five mins I will share the link

topaz bough
vagrant spindle
#

The above link is used for ttestting the above card

topaz bough
#

ok but where do you see this card number 4000003560000123

#

it's not part of our test cards

vagrant spindle
#

I am able to see the test card in that link

topaz bough
#

oh these are country specific cards

vagrant spindle
topaz bough
#

perfect!

vagrant spindle
topaz bough
#

what's the paymentIntent ID?

vagrant spindle
#

pi_3OCJ2SD6fLV2vwHg0Fp6RDEh

topaz bough
#

it's not failing, it just needs SCA

vagrant spindle
topaz bough
#

let me understand your flow

#

what are the steps you're doing

vagrant spindle
#

I am creating the payment Intent thats it with the below code

#

const paymentIntent = await stripe.paymentIntents.create({
amount: amount * 100, // Replace with the actual payment amount in cents
currency: 'usd',
payment_method: paymentMethodId,
confirm: true,
customer: customer.id,
off_session: true
});

topaz bough
#

the PaymentIntent you shared doesn't have an off_session: true param

vagrant spindle
#

No wait i will check again

#

This response I am getting with the above code

#

pi_3OCJsyD6fLV2vwHg0kdWCZF8 This is the payment Intent Id I have checked now itself

topaz bough
#

you're using a USD currency

vagrant spindle
#

Can You please explain me in detail

topaz bough
#

The following currencies are supported only for international (non-IN) businesses: USD, EUR, GBP, SGD, CAD, CHF, SEK, AED, JPY, NOK, MYR, HKD.

#

you only have the possibility to use INR as the mandate currency

#
const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000000,
  currency: 'inr',
  customer: '{{CUSTOMER_ID}}',
  setup_future_usage: 'off_session',
  payment_method_types: ['card'],
  payment_method_options: {
    card: {
      mandate_options: {
        reference: '{{REFERENCE}}',
        description: '{{DESCRIPTION}}',
        amount: 2000000,
        start_date: 1675238400,
        amount_type: 'maximum',
        interval: 'month',
        interval_count: 1,
        supported_types: ['india'],
      },
    },
  },
});
#

this is an example of how to create a PaymentIntent to setup the future usage

#

once created you would pass the payment method to your existing code and it should work

#

with this limitation

Recurring transactions over 15,000 INR (or equivalent in other currencies) must go through AFA each time.

vagrant spindle
#

4000000000003220 This card number also failing while I am trying to create the payment Intent