#ganeshparmar__98323
1 messages · Page 1 of 1 (latest)
hi! as far as I understand your question the answer is yes, if we need some information, and you're using a current integration such as the PaymentElement, it will be collected.
how to do that
how to do what exactly?
I am using this web element payment card
but i am getting this error
if it require billing address then stripe should give the ui
but it is not providing that ui
what exact Element are you using, what does your code look like?
wait
<form id="payment-form">
<!-- Add your form fields here -->
<div id="card-element">
<!-- A Stripe Element will be inserted here. -->
</div>
<!-- Used to display form errors. -->
<div id="card-errors" role="alert"></div>
<div id="card-Success" role="alert" ></div>
<div>
<button class="btn btn-primary" type="submit" id="stripeBtn">Pay Message Fee</button>
</div>
</form>
yeah that is just the basic Card Element, it only collects the card number
I'd suggest using the recommended integration , the PaymentElement, which collects the full information
https://stripe.com/docs/payments/accept-a-payment
https://stripe.com/docs/payments/payment-element/migration
One question is this dynamic like i don't want to show billing address form to customer which really don't require
Only want to those from whom stripe reallly wants the billing address
it's dynamic yes
i have changes the code to this but still it doesn't give me option to enter billing detalis and it gives error same above
please be patient, having alook
guess I was wrong then and it doesn't work for this India address requirement.
I suggest using Checkout if you can : https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout
if you can't, then you would need to build your own form that collects the customer's billing address outside of the PaymentElement, and pass the values from that form to https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details directly.
but if i create a form it will not be dynamic anymore like for india it require billing other it may not require thus resulting in bad user experience
well it doesn't need to be dynamic since you will always have to collect this address
but yes, it's not ideal. I'd suggest using Checkout if you can since it will just take care of everything hopefully
We can use checkout can we use it in a div inside an iframe which is shown on another company website