Skip to content

Compare billing vendor credit consumption to ours #8506

Description

@lmossman

Tell us about the problem you're trying to solve

This is a ticket within the Integrate backend with billing vendor Epic

After a day or two of reporting usage from our CreditProcessingCronJob to the billing vendor, we need to validate that the credit balances in our database are equal to the credit balances in the billing vendor, and investigate/fix any inconsistencies that are found.

Describe the solution you’d like

The best solution would be some sort of script that fetches the balances of all CloudWorkspaces in the cloud db, compares each to the balance of the corresponding customer in the billing vendor, and outputs a summary of which balances are inconsistent between the two, if any.

If any inconsistencies are found, they should be investigated to determine why an inconsistency occurred. Things that will prove useful in this investigation are looking at CreditConsumptionRecords generated by the CreditProcessingCronJob, and using the billing vendor's API to fetch the credit ledger to see when and why credits were deducted to cause the resulting balance.

Describe the alternative you’ve considered or used

A not as great but potentially less time-consuming solution would be manually checking several balances as a sample to see if there are any inconsistencies, and if none are found then concluding that the systems are in sync.

Additional context

Are you willing to submit a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions