Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Line Item Enhanced - Refunds not included #93

Open
2 of 4 tasks
rick1290 opened this issue Oct 9, 2024 · 3 comments
Open
2 of 4 tasks

[Bug] Line Item Enhanced - Refunds not included #93

rick1290 opened this issue Oct 9, 2024 · 3 comments
Labels
type:bug Something is broken or incorrect

Comments

@rick1290
Copy link

rick1290 commented Oct 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

Noticing that no refunds are captured in this table

Relevant error log or model output

No response

Expected behavior

Refunds should display on the invoice or item id

Possible solution

Something to do with the transaction id.... i think using the charge id allows you to map it correctly. Trying to play around with it.

dbt Project configurations

Default

Package versions

Current Version

What database are you using dbt with?

snowflake

How are you running this dbt package?

dbt Cloud™

dbt Version

Current

Additional Context

I just think there is an issue with one of the joins. Take a look at charge_id

Are you willing to open a PR to help address this issue?

  • Yes.
  • Yes, but I will need assistance.
  • No.
@rick1290 rick1290 added the type:bug Something is broken or incorrect label Oct 9, 2024
@fivetran-joemarkiewicz
Copy link
Contributor

@rick1290 thanks for opening this issue and providing insight into the refunds not displaying as expected.

When looking at the ERD it looks like there is a possible connection via balance_transaction_id. However, to your point as well it looks like it could also map via the charge_id.
image

Have you been able to play around with this on your end? Do you see the charge_id mapping the refunds appropriately? I'll also call out that we perform this same join in the stripe__balance_transactions model.

@rick1290
Copy link
Author

rick1290 commented Oct 11, 2024

@fivetran-joemarkiewicz Charge Id indeed works..... and applies the refund to the invoice level. Balance transaction does not work or map correctly. I think the balance transaction is unique to the refund.

So I guess in this enhanced table - the REFUND would apply at the header level and not item level.

@fivetran-joemarkiewicz
Copy link
Contributor

@rick1290 I wanted to let you know that I've been looking into this and agree there likely needs to be a change to properly account for refunds. However, I've seen some conflicting results when swapping the join with data on our end 🤔.

I'll continue to investigate and will share here once I have found a viable solution to this issue that will work for all use cases. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something is broken or incorrect
Projects
None yet
Development

No branches or pull requests

2 participants