#syavych - Stripe Reporting

1 messages ยท Page 1 of 1 (latest)

shell cosmos
#

Hello. One moment while I look into this

broken harness
#

๐Ÿ‘‹ The exports.unified_payments report type is something that's dashboard-specific and isn't optimized for use with the API. You can find a full list of the report types that are supported through the API here: https://stripe.com/docs/reports/report-types

Understand the report types available via the Reporting API.

clever forge
#

The mentioned there reports don't fit my needs ๐Ÿ˜ฆ E.g. I need all transactions for a specified period. The unified_payments gives that, but I can't put there date intervals, so it gives the whole set (which in case of 500k customers for several years) is a pain...

broken harness
#

When you generate that report through the dashboard you do have the option of specifying a date range as you can see in the screenshot

#

Alternatively, a lot of the balance_change_from_activity.itemized.* report types should also have a lot of the information that you're looking for

clever forge
#

Dashboard doesn't work here, because I'm developing automatized financial reporting, so I need to fetch it from API. But I understand your message - this API isn't supposed to be used, so not documented ๐Ÿ™‚ Ok, will try to play with what I have

#

One small question as you are already here: is there a way to get a number of active/cancelled subscriptions for a certain period of time in past? The API v1/subscriptions gives them for current date

broken harness
clever forge
#

this won't work: e.g. if I want to have active subscriptions in Dec2021, I'll specify created[lt]=1Dec2021, but the list won't include subscriptions cancelled on Jan22 (though they were active in Dec2021)

broken harness
#

Ah gotcha - I misinterpreted your initial ask. So that's a bit more complicated, and I don't think there's a great way to do this since we don't surface the historical status of the subscription at a specific point in time. The best you could do with our APIs is to use created[lt]=1Dec2021, with no filter on the status, and then iterate through all the returned subscriptions yourself

clever forge
#

yep, but I need then to iterate each and check when was it cancelled etc. and for 500k users... but at least you saved my time on checking all reports if there's any matching...

broken harness
#

Yeah it's not perfect - if that kind of information is really important for your integration you may want to store it on your end, relying on the changes reported in the customer.subscription.updated webhook event to tell you when the status of the subscription has changed