#agorijala

1 messages · Page 1 of 1 (latest)

hexed siloBOT
quick bolt
#

Hi 👋

We aren't really knowledgable about revenue recognition here (this server is focused on API integrations and developers).

Can you specify what the API is you are hitting and what you want to achieve with it?

finite hedge
#

curl https://api.stripe.com/v1/reporting/report_runs
-u **************************
-d report_type="revenue_recognition.debit_credit_by_invoice_line_item.1"
-d "parameters[interval_start]"=1619827200
-d "parameters[interval_end]"=1622505600

#

For this report we are trying to fetch all the columns specified in documentation

quick bolt
#

And what is the unique ID that you are looking for here? I assume it's not just the ID of the report run object that is returned

finite hedge
#

So we want to save the csv report that generated by this api in our database(dynamoDB). but we aren't having any primary key feature in the report and that failed to store the data in dynamoDB

quick bolt
#

So are you trying to save the data or the actual file in your DynamoDB?

finite hedge
#

actual csv report file

quick bolt
finite hedge
#

sorry. we are saving the complete row wise data in dynamoDB

quick bolt
#

Okay so each row in the CSV is getting translated into a row in the DB?

finite hedge
#

right.

quick bolt
#

Since the most granular level of data in this report is the Invoice Line Item, wouldn't you be able to use the invoice_line_item_id as your PK?

#

Or perhaps even better, the transaction_model_id which is a default column

#

The definition suggests it should function as a unique ID

The model in Stripe associated with this change - either an invoice line item, invoice, invoiceitem, charge, or etc.

finite hedge
#

we tried that. we tried the transaction_model_id. but there are duplicate rows with same transation_model_id with difference in debit and credit and amount

quick bolt
#

Then what about a combination of invoice_id and invoice_line_item_id? Concatenate the strings?

finite hedge
#

yeah those both are also the same with difference in debit, credit and amount.

quick bolt
#

Hmmm... Unfortunately I don't have a good solution then. Other than to suggest you use the transaction_model_id with a random string/number appended . That would group related rows together (ordering by UID) but still provide a unique value

finite hedge
#

actually we are doing this because we aren't receiving the differential data from stripe api call. so when we call the above api for report and if we pass start date as nov 1 and end date as nov 3, we will get all the data of November. looks like start and end date is taking as accounting period which is same for all the transactions (start of month). if we run end of month we will end up with millions of records and we dont want that so we tried with small chunks of data like 2 days gap but that is not working with the api call

#

do we have any alternative to get the differential data for this report

quick bolt
#

That I would not know. As I said, we aren't familiar with all the data available in Stripe Reporting. I would recommend reaching out to https://support.stripe.com as they have more knowledge about reporting and how to optimize it.