#thehollytoats_ece-customer-receipts
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/1299407724823445544
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello ๐
What specific element are you using?
I use google and/or apple pay
const expressCheckoutOptions = {
emailRequired: true,
buttonHeight: 50,
buttonTheme: {
//applePay: 'white-outline'
},
paymentMethodOrder: ["applePay", "googlePay"],
paymentMethods: { applePay: "always", googlePay: "always" },
layout: { maxColumns: 1, maxRows: 0, overflow: "never" },
}
const elements = stripe.elements({
captureMethod: 'manual',
mode: 'payment',
amount: price_to_play_one + operator_fee_fix + Math.round(operator_fee_percent * price_to_play_one/100),
currency: p.c,
appearance,
})
Okay so you are referring to the Express Checkout Element
https://docs.stripe.com/elements/express-checkout-element
This has nothing to do with Checkout Sessions and the functionality is entirely different.
I know it can be confusing because we name things in such a way that they seem related
There is no option to provide customers with an Invoice as a result of payment using the Express Checkout Element
I know they are different. I tried the checkout session to proof that the setting of my stripe account is correct, as the customer get the invoice through email.
If I use the Express Checkout Element, what should I do so the customer get the invoice through email?
That is a feature of Checkout Sessions
You can send a receipt via email but that is not the same thing as an Invoice (which has legal implications)
How do I send the receipt via email?
Do I need to write my own code to create the receipt and send the email by my own email server?
Is this setting?
Yes
I have enabled it but the customer still doesn't get it when I use Extress Checkout Element.
Can you share the payment intent ID for the payment where the customer did not receive an email receipt? It's safe as no one can use it but you and Stripe staff
give me a min
I get a few payment intent id, but I am not sure which one that are using Express Checkout Element vs Checkout Session.
Is it okay if I give you multiple payment intent?
most likely all of them are using Expres Checkout Element.
pi_3QDlrGLyyVuDV3Wz1qaA5yhT
pi_3QDf3oLyyVuDV3Wz192anPAK
pi_3QDezcLyyVuDV3Wz1HxMisiQ
I can check them, taking a look
Okay so looking at the first one, and I can see the issue right away.
Hmmm... wait a sec
Okay so you do still collect the email address but that is saved in the charge.billing_details
In order to send the receipt, you need to add that email to the receipt_email property on the Charge object.
https://docs.stripe.com/api/charges/object#charge_object-receipt_email
Have you set up a click listener to request the customer's email?
https://docs.stripe.com/js/elements_object/express_checkout_element_click_event#express_checkout_element_on_click-handler-resolve-emailRequired
In this case, I get the email from google/apple pay. I can pass the parameter.
However the above is the charge_object. Can I set the the receipt_email in the payment intent creation?
If you have that information at the time, you can specify it here: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-receipt_email
thank you. I think this will work.
I'll try both, at the payment intent creation and if it doesn't work, will add it in the charge object.
Thanks again.
Sure thing, happy to help ๐