#Kalluste

1 messages · Page 1 of 1 (latest)

short heraldBOT
buoyant ledge
#

Hi there!

#

I just set the email field to "never" and provide the email when confirming payment in my front-end.
Yes this is the correct approach when using the Payment Element

dusty rampart
#

but I see that it's also possible to send the email when creating the payment Intent. Would it be possible to handle this on the api side with that request or is the front-end solution the only way?

buoyant ledge
#

Would it be possible to handle this on the api side
What do you mean by "this"?

dusty rampart
#

prefill the email for the customer so that they wouldn't have to enter it in elements

#

when creating a payment intent

buoyant ledge
dusty rampart
#

Yes, that I read aswell. But can it be done so that when creating a payment intent with stripe nodejs package in my backend I already provide the billingAddress.email so that when the end customer sees the payment element in front-end Stripe would be smart enough to not ask them their email again

buoyant ledge
#

Unfortunately that's doesn't work like this for the Payment Element. So either hide the field or prefill the field.

dusty rampart
#

okay. thank you very much!

#

I have one more question regarding external accounts

#

if I can

#

return this.stripe.accounts.createExternalAccount(stripeAccountId, {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @minor fossil-ignore
external_account: {
object: 'bank_account',
country: iban.slice(0, 2),
currency: data.currency,
account_holder_name: data.bankAccountHolderName || undefined,
account_number: iban,
},
default_for_currency: true,
});

I have to use @minor fossil-ignore here because stripe.accounts.createExternalAccount does not allow sending external_account as object

#

I just updated my nodejs package

#

but the weird thing is that it works and stripe documentation says that this is the way to do it

buoyant ledge
#

Give me a few minutes to look into this.

#

but the weird thing is that it works and stripe documentation says that this is the way to do it
Can you share a link to the documentation that mention this?

#

And which version of stripe-node are you using?

dusty rampart
#

stripe version is 12.2

#

DOCS says: Either a token, like the ones returned by Stripe.js, or a dictionary containing a user’s bank account details (with the options shown below).

buoyant ledge
#

And the code you shared is working as expected?

dusty rampart
#

yes

#

I have to leave for half an hour but if you find anything I'll keep this thread open! 🙂 thanks in advance!

viral nebula
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!