cancel
Showing results for 
Search instead for 
Did you mean: 

Stripe Invoice Line Item Unique ID - How is this generated?

pb-0
New Contributor

My Stripe connector produces an `invoice_line_item` table with unique ids corresponding to each invoice line item. However, these unique ids do not correspond to the  actual `id`s (invoice line item ids) in the table. 

Does anyone have experience with these unique ids and understand why they are different for a given line item from the id? How come they appear as "il_" (invoice line item) instead of "sli_" (subscription line item)? What is the difference between "sli" and "il" if unique id treats them as interchangeable?

Unique ids are "il" but all ids are "sli":

Screenshot 2024-03-01 at 9.39.41 AM.png

Unique ids are "il" and "sli" but all invoice ids are "sli":

Screenshot 2024-03-01 at 9.49.41 AM.png

Thanks in advance for your help.

4 REPLIES 4

Toby-Metcalf
Community Admin
Community Admin

Good day @pb-0 
I am making some internal inquiries 🙂
Fivetran Community: for those familiar with Stripe, please share your experiences.

Cheers,
Toby

dipenranpara
Fivetranner
Fivetranner

Hi @pb-0 

Thanks for your question regarding the Stripe connector. I understand you have a query on the 'unique_id' and 'id' column; we've kept the design of this table like this because earlier Stripe API had 'unique_id' returning as well as 'id', and later as part of API upgrade to 2019-12-03, they've stopped sending the 'unique_id'. So, we assign 'id' to 'unique_id'. This field to be used for migrating internal references before upgrading to this version. For more information on this change, you can read this changelog.

dipenranpara_0-1709657402407.png

Does this help answer your question?

 

Good day @pb-0 
I hope that @dipenranpara 's reply is helpful; if you have additional questions, please let us know. If you are all set, would you please accept his reply as a solution; doing so makes it easy for all Community members to find the answers.

Cheers,
Toby

Hi @dipenranpara. Thanks for your reply.

The problem on my Fivetran table is 1) `unique_id` prefix does not match the prefix of any `id`s for the invoice - the screenshots show all line items in those invoices and `sli_` prefix represents a different kind of line item according to Stripe (i.e. Subscription line litem). Therefore, the unique ids of `il_` and `sli_` suggest different invoice line item types than what is in the invoice. 2) According to Stripe API update docs, all `id` should be prefixed with `il_`. However, the `id`s in my Fivetran table are prefixed with both `sli_` and `il_` (as are the unique ids). Shouldn't I only see `il_` prefix in my `id`s and `unique_id`s?

 later as part of API upgrade to 2019-12-03, they've stopped sending the 'unique_id'. So, we assign 'id' to 'unique_id'. This field to be used for migrating internal references before upgrading to this version.

Can you talk more about how you "assign 'id' to 'unique_id'"?

I may be misunderstanding these internal references but my presumption based on the Stripe docs is all ids should be globally unique and prefixed with `il_`. I'd therefore expect all unique ids to be prefixed with `il_`. 

Fivetran release notes