#kevinfleri-subscription-metadata

1 messages · Page 1 of 1 (latest)

subtle wadi
#

@spark harness there are multiple levels of metadata. Do you have a concrete example of the evt_ id and the subscription id and which metadata you are missing?

spark harness
#

This was working earlier, I do recieve the metadata in event.paid webhook, it is just an empty object even on stripe dashbored but when I log the Stripe.subscription.create method, it contains these metadata. this started today.

clever trail
#

Hello! There's no such thing as an "event.paid" event. Are you talking about invoice.paid?

spark harness
#

Yes invoice.paid sorry

clever trail
#

Can you give me the event ID (evt_) of the invoice.paid event where you expected to see the metadata?

spark harness
#

sure

#

"id": "evt_1JxacYHcDZHqQZa0siCGR9qN",

clever trail
#

Thanks! Taking a look, hang on...

spark harness
#

This was made today on test stripe, we are planning to go live, just an unexpected stuff coming up

clever trail
#

It looks like you set metadata on the Subscription, but not on the Invoice the Subscription generated. Subscription metadata and Invoice metadata are separate. Do you have an example of where this worked as expected before?

spark harness
#

Sending the event id to you

#

"id": "evt_1JwouPHcDZHqQZa0HkIUf1ou",

clever trail
#

Looking...

#

The metadata on that Invoice is blank.

#

In that event.

spark harness
#

It is not from the dashbord

#

"metadata": {
"accountUUID": "97b3109d-58e9-489d-8add-a33ffc284e82",
"customer": "cus_KEZXxcXDObmMEq",
"type": "card",
"stripeProductID": "prod_KA4wHfoN2gSgDb",
"priceId": "price_1JagmYHcDZHqQZa04G6Xqa9R",
"planID": "6d1ed617-92fb-4989-aa73-4d5006b9bda7",
"productName": "Comprehensive Care Bronze",
"beneficiaryUUID": "1c010812-b637-4a65-8445-005dc12dbcc1",
"customerUUID": "b100763c-6767-44fb-8a22-952b05d740a4",
"wooId": "698",
"firstName": "kennedy",
"lastName": "kevin",
"email": "ejykken@gmail.com"
},

clever trail
#

Where specifically are you seeing that?

#

Oh, you're talking about the metadata on the line items inside the Invoice, not on the Invoice itself. Gotcha.

spark harness
#

Yes, I am talking about the metadata

#

We need to use the metadata info on our end when we receive webhook.

clever trail
#

Investigating further now...

subtle wadi
#

@spark harness that invoice.paid event without the metadata is special. If you look at the invoice, it has a line item for a proration. That's because you used billing_cycle_anchor when you created the Subscription so it did a proration for the remaining time until that date. Those invoice line items behave differently and don't reflect the subscription's metadata in that case.

spark harness
#

Yes, for certain conditions we used billing_cycle_anchor if the plan will be active on the middle of the month. But user is charged at this point since we have invoice.paid event.

#

How do I recieve metatada on invoice.paid webhook on a subscription with billing_cycle_anchor

subtle wadi
#

you don't really. You shouldn't even rely on the metadata of the subscription

#

if you want the metadata to appear on the line item for proration or not you should set it at the subscription item level

spark harness
#

Will try this, thanks