#vinod_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1349561254401937428
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi @robust glacier
hello! if you reach out to Stripe Support - https://support.stripe.com/contact, they should be able to advise you on that. I think it might be possible via Radar. We mainly help with developers who want to integrate directly with the Stripe API here on this channel, and don't have enough expertise with Radar to be able to advise on that here on this channel.
I know how to enable Radar rules, however I am more interested in how can I submit the postal code
we don't ask customer to enter the postl code along with their card details
Should I use the postal code from the Billing Adress that customer provides us before the payment
Can you help me with the code to submit the postal code to stripe?
Can you share your account id so that I can take a closer look at how you are currently integrating with Stripe? You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll look like acct_123
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
acct_1995SPKB3PneUoqV
you can use some of the test payments that I have done for that 2 days
It looks like you're currently using the Payment Element. I'm guessing you're probably using https://docs.stripe.com/js/payment_intents/confirm_payment to confirm the payment too. You can add the postal code in https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
here's my submit button click code
Alyka.Stripe.Cache.$submit.on('click', async function (e) {
e.preventDefault();
Alyka.LoadingScreen._showLoading();
const { error: submitError } = await elements.submit();
if (submitError) {
Alyka.LoadingScreen._hideLoading();
return;
}
var myHeaders = new Headers();
myHeaders.append('Content-Type', 'application/json');
myHeaders.append('shoppingguid', $('#shoppingguid').val());
myHeaders.append('stripeelementtype', 'payment-element');
const { clientSecret } = await fetch('/aapi/stripe/create-payment-intent', {
method: 'POST',
headers: myHeaders,
}).then(r => r.json());
// Use the clientSecret and Elements instance to confirm the setup
Alyka.Stripe.Cache.$stripe.confirmPayment({
elements,
clientSecret,
confirmParams: {
return_url: return_url,
},
// Uncomment below if you only want redirect for redirect-based payments
//redirect: "if_required",
});
Alyka.LoadingScreen._hideLoading();
});
in which part of the code should I do that?
as an example
stripe.confirmPayment({
elements,
confirmParams: {
return_url: 'https://example.com',
payment_method_data : {
billing_details : {
address: {
postal_code : 45678
}
}
},
do you reckon the payment intent shoud have the postal code when its created, before stripe.confirmPayment() is called?
No, that's not necessary. The postal code is only sent to the issuer when payment is attempted which is when stripe.confirmPayment is called in your payment flow
okay that's great
so techinally speaking if the customer enter a random postal code not same as their card's postal code
such transcations are subject to Card issuer verifcation
and may be declined
is that correct?
do you think we provide one more textbox in the payment screen where customer can enter the Postalcode? so the customer knows the importance of the postal code, and sensityvity
so techinally speaking if the customer enter a random postal code not same as their card's postal code
such transcations are subject to Card issuer verifcation
and may be declined
is that correct?
This is correct. I do want to point out that not every issuer verifies the postal code. From our end, what we've noticed is that really only the US, CA and UK actually return meaningful responses for postal code check
do you think we provide one more textbox in the payment screen where customer can enter the Postalcode? so the customer knows the importance of the postal code, and sensityvity
I can't comment on this. It's more of a question for your UX designers.
perfect, that makes sense
stripe.confirmPayment({
elements,
confirmParams: {
return_url: 'https://example.com',
payment_method_data : {
billing_details : {
address: {
postal_code : 45678
}
}
},
In this sample code, is it okay just sending the postal code, or do I have to send the address details too?
It's always good to provide more detail, even if the issuer does not do Address Verification Service (AVS), Stripe Radar can use the additional detail for more signals : https://docs.stripe.com/radar/integration#recommendations. You can read more about AVS here : https://stripe.com/ie/resources/more/what-is-address-verification-service
thank you Alex