#krista2780

1 messages ยท Page 1 of 1 (latest)

azure elmBOT
dense yarrow
#

the email would be on the Customer object so you have to fetch the customer using the Customer ID from the Subscription object

dry zephyr
#

For all other subscriptions that we have, we use the stripe_charge_event.data.object.billing_details.email ... is it possible make an update to the subscription we created so that it comes through this structure like out other subscriptions?

dense yarrow
#

I think that depends on how the Subscriptions were created. I assume the others (that have email on billing_details were created through Stripe Checkout which collects it on the billing details of the card / PaymentMethod? and in the case of your test from Dashboard, the test customer's card never had billing details collected? just a hunch

dry zephyr
#

correct!

#

So i was wondering if i can update the subscription to retroactively add the billing details that were not added.

#

If not, I understand your last response and I will make an additional api request for the email since this is a real subscription for an active customer.

hollow cargo
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away here shortly. I need to double check exactly where that value is put, but I think you'll be able to update it. While I do that, can you share the ID of two Events from your testing, one with the email and one without?

dry zephyr
#

sure one moment

#

let me find a regular one with it. one moment

hollow cargo
#

Thank you for your patience. I think that is coming from the underlying Source object that is being used. (The one where you do see the email is using a Payment Method instead, with populated billing_details). I would suggest trying to update the owner.email field on the Source object being used to make the payment:
https://stripe.com/docs/api/sources/object?lang=node#source_object-owner-email
but let me know if that doesn't work.

dry zephyr
#

ok I will try that now

#

So i went ahead and updated the owner.email but since the charge object was already generated without it, when i go to query stripe_charge_event.data.object.billing_details.email its still empty. so i think it would only work if a new charge event was created right?

hollow cargo
#

Correct, it won't update the existing Charge or Event objects.

dry zephyr
#

ok cool but i assume next month when the subscription renews it will be there. and if not, i can add the additional query to fetch the customer's details that way.

hollow cargo
#

I would expect it to be, but you can recreate this flow in a test clock to be sure. You can:

dry zephyr
#

perfect, thank you!