#nyluhem-billing-email

1 messages · Page 1 of 1 (latest)

sage pasture
#

Hey! What's the context here? What are they paying and how are you facilitating that payment with Stripe?

#

Also by 'account email' do you mean a Customer object?

maiden jolt
#

Apologies, it's through Stripe Checkout.

So the flow is as follows:

A user signs up for our application, where we offer subscriptions. A user wants to purchase a subscription but they'll be using it for their business where their might be a separate billing dept.

So they send the checkout link to the billing department to complete the payment using the company credit card or direct debit.

The Customer is the user that's using the app, but the person that paid is the billing department, and would be who we would like to receive invoice emails etc.

#

There doesn't seem to be a way to attach the billing email address using the Customer object, it only takes one email address

sage pasture
#

Can you send an example Checkout Session ID, or your API request to create one?

#

I assume you're passing the customer parameter. Equally, where would you expect to separate billing email to be stored? On the Customer object?

maiden jolt
#

So in this screenshot, the customer has account details, but also billing emails. So, I would assume that I can access that BillingEmail option on the customer object, but I would have to get the payment method instead if I wanted to access it?

The second screenshot shows how we set up our Request

#

In the request I'm setting the email as being the customer email, but that means when we set up billing on the checkout it defaults to that email address and it isn't editable. But if I allow the billing department to update the email in the checkout it would still just create a customer with the billing account email instead of using the users email

sage pasture
#

But if I allow the billing department to update the email in the checkout it would still just create a customer with the billing account email instead of using the users email
Yep, expected. Ultimately there's only one 'email' field on the Customer object.

maiden jolt
#

Cool, so if I wanted to get around this then, I would need to do the following:

Create the checkout request, and attach the billing email address to the Customer, instead of the user that's using the app.

Once the checkout is completed, and the payment method has been added that also has the billing email address to it.

Update the customer with the users email, so that if the account holder looks at their customers on Stripe they'll see the user's email as the customer email, and the billing email from the payment method as the billing email?

sage pasture
#

Let me confirm something

#

I thought that if I pass customer when creating a Session I still see the email input field and that's set on the billing card (doesn't update the Customer object)

#

The issue I guess in instances where Checkout is creating the customer for you?

maiden jolt
#

Yeah when I create a new customer, I'm attaching the email address that I want to use rather than creating the customer before I send the api request.

But, if it's adding the billing address to the payment method, then there's no harm in adding the user who will be using the app to the customer email?

sage pasture
#

Ok, yep. I see the email is prefilled when you pass customer

#

But, if it's adding the billing address to the payment method, then there's no harm in adding the user who will be using the app to the customer email?
Yeah I think you're going to need to update this manually

maiden jolt
#

Cool, I think I should be able to handle that in the webhook though, as I can easily update the customer's email programmatically, just not the billing address

sage pasture
#

Otherwise the email from the customer is set on the billing details of the card

maiden jolt
#

unless I dig into the payment method