#bhavi-evrig

1 messages · Page 1 of 1 (latest)

turbid oasisBOT
novel fossil
#

Hi there!

#

Pasting your messages here:

stripe
.confirmCardPayment(clientSecret, {
payment_method: {
card: cardElement,
billing_details: {
name: name,
},
},
})
.then(function(result) {
alert(result);
// Handle result.error or result.paymentIntent
});
In my case its not working its never come to result
Subscription get generated but payment not working
Can any one please help how can I write confirmCardPayment in JQuery?

#

What is "not working"? Do you get an error message? If so, which one?

#

The code you shared looks correct, but you need to make sure clientSecret actually contains the client secret of the PaymentIntent.

tacit wing
#

Its never coming to then

#

Its now showing me error like this

static oracle
#

Hi there 👋 I'm jumping in as my teammate needed to step away. That error looks like it is being encountered due to something specific with the Payment Intent, looks like it is running into some India-specific restrictions. Did you check the support article linked in the error message for guidance?

tacit wing
#

Hi Toby

#

No,

#

I am not sure how to add shipping/billinga ddress in param ?

#

Is it before that function or is it in that function?

static oracle
#

That error is being encountered because of the Payment Intent and details about the Stripe account that created it. Could you copy the Payment Intent's ID (pi_123) from the screenshot shared previously and paste it here in this chat so I can take a closer look at it?

This is largely caused by India having additional requirements for international payments. Is your company that will be selling products/services based in India, or is that simply where the Stripe account that you're using for testing is based?

tacit wing
#

pi_3MJHpQSAAimMgft91OGRI5if

#

Yes its testing acount

#

I am doing it for one of my client based on spain

#

Do I need to change anything in stripe account configurations? Or is it becs I am sending request from India

static oracle
#

It's happening because the Stripe account you're using is based in India, so our system sees these payments as international and is expecting the steps here to have been followed:
https://stripe.com/docs/india-accept-international-payments

If the company is not India-based, then it will probably be easiest to create a new test Stripe account that is based in the same country as the final Stripe account that will be used.

tacit wing
#

And How can I pass the required validation for Billing Address as I am getting the elements from stripe.js and using mount elements?

#

Can you please help with that?

static oracle
#

If you're not going to be accepting payments in India, then setting up the additional steps to handle the requirements for that region may not be worth the effort.

In page linked in the error message, you can find code snippets demonstrating how to include the address information on the Customer object when creating it:
https://stripe.com/docs/india-accept-international-payments#international-payments-for-services

I believe you can also use the confirmParams object when making the confirmPayment request to provide address information at that time, via the shipping and payment_method_data.billing_details.
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams

When buyers of your goods or services are located outside India.

tacit wing
#

Thank you very much for your help!

#

Happy Holidays!

static oracle
#

Thank you! Happy Holidays to you as well!