#akram.alsaidi
1 messages · Page 1 of 1 (latest)
There isn't a way to force those with the payment elemet. If you want to make sure they always appear, the best way is usually to create your own fields for them, tell Stripe.js to not display those fields within the Payment Element, and then pass the data from your fields to the confirmPayment method when you are submitting your payment
So for example you could make your own name field, then specify never for this parameter https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-name
And then provide the name to this parameter when actually confirming https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
Yes, those are the places to add the code for the parameters that I linked to
You can add the address element if you want. I am unsure if you can use it to only collect the name and email through https://stripe.com/docs/elements/address-element
Checking in to that
It looks like the Address Element will always collect a full address. You can't turn off all of the fields other than name and email unfortunately https://stripe.com/docs/js/elements_object/create_address_element#address_element_create-options-fields
with tips / donations what we can use ?
// Create the Address Element in shipping mode
var addressElement = elements.create('address', {
mode: 'shipping',
});
// Create the Address Element in billing mode
var addressElement = elements.create('address', {
mode: 'billing',
});
mode shipping or mode billing ?
If you are sending the customer something physical, use "shipping". If you are just charging them for a digital good, usually "billing" mode is used
with tips / donations what we can use ?
If you collect the tip amount before creating your PaymentIntent, you can just use our Payment Element as normal
If you are looking to determine a tip amount after initially charging the user, I would recommend talking to our support team about your usecase. They may be able to help you https://support.stripe.com/?contact=true\
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Unfortunately you can't force a field to show, that is what my original suggestion was about. You can hide the field and use your own custom field to collect the email address, that is the only way to guaruntee that there will be an email field at the moment
yes but the payment it will be with out login
Makes sense, my suggestion is still relevant though
If you want to guaruntee that you collect email in a field on the page, you need to provide your own field for it
Stripe.js does not have a way of guarunteeing that an email field will show up on our Payment Element form
mmmm
So we can do it by guest
guest user can sorted all
other question please
about google pay
I,ve enabled from stripe but i can not see it above form payment
👋 What location are you testing from? Also, have you performed the steps listed here?
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#apple-pay-and-google-pay
I am from UK
Gotcha. Are you using Stripe Connect?
I don't really understand what you mean by that. Can you clarify?
I was asking if you use Stripe Connect
https://stripe.com/docs/connect
I am using Stripe account
Connect
payment intent depending on Stripe Connected
Gotcha. So you're creating direct charges. In order for wallets to work with Direct Charges, you'd need to register the domain on the connected account
No, you'd need to use the API
every time or just one time ?
Just one time
ok perfect
However, you'll also need to set Stripe-Account header to connected account ID on client-side (w/ Stripe.js)
I did that
Cool, so registering the domain should do the trick
If i do connected id by client side so we do not need register domain ?
You still need to register the domain. You'd need both.
after that i can sow google pay ?
Yes, as long as the browser has the wallet configured correctly
Oh your site will need to be served on HTTPS for the wallets to work. You can use something like ngrok to host it temporarily
mmmm so after pushed to server https ?
yes
You can register both
Around - Multipurpose Bootstrap HTML Template
ok
Perfect
Now last qustion please
When the customer create account the stripe directly saved the stripe connected id to our platform if the user completed and if the user not completed all form to create an account
and when the user close the browser and come back one more time and press on button to create an account also te same proccess able to saved in our platform
but saved with status Restricted
so there any api to if the user has connected id before but not complate to make edit and complate later ?
We have these sections in our docs for that
https://stripe.com/docs/connect/standard-accounts#return-user
https://stripe.com/docs/connect/standard-accounts#handle-users
you can also look at requirements parameter to see what's currently due
and this when created
and redirect them to account onboarding link
https://stripe.com/docs/connect/standard-accounts#create-link
I,ve did that also with url redirect to onboarding
You are creating a new account again in the screenshot, for account that's in restricted state, you'd just pass the existing account ID in the accountLink -> create