mollie / postman-collection

A postman collection for exploring the Mollie API
GNU General Public License v3.0
15 stars 10 forks source link

Missing settlement API #5

Closed florianbepunkt closed 1 month ago

florianbepunkt commented 1 month ago

We are in the accounting software business and noticed:

(a) The settlement API and balance API are missing from the postman collection.

Also we wondered: Is there a way to query settlements that happened in a given period of time? Our use case: Customer is onboarded and wants to import Mollie payment data for a given period of time for accounting purposes. Currently the only way is to fetch all settlements and filter on the client side. This is very cumbersome and puts a lot of unnecessary load on the Mollie API.

It would be great if we could query a list of settlements by settlement date (like "show me all settlements of the last month" or "all settlements of the last quarter").

fjbender commented 1 month ago

The Settlements and Balances APIs are in the OAuth/Org Access Tokens file:

https://github.com/mollie/postman-collection/blob/7c99d519aac00f6e4f4e87e12ed41118725f89f4/Mollie%20v2%20API%20-%20OAuth-access_token%20authentication.postman_collection.json#L9350

It's not super clear, but we have two collections, split by required authentication type. The first collection, concerned with creating payments etc., uses our static API Keys, which are scoped to a certain profile, e.g. a website of an organization. The Balances and Settlements APIs, however, need organization-wide privileges not included in those API keys. These privileges need to be obtained either through scoped Organization Access Tokens (OATs) or through our OAuth flows.

We are currently working on making the different authentication mechanisms a bit more clear again in our docs, and will reflect this in the Postman collections, too.

For the use case you are describing, we recommend iterating over the List Settlements endpoint and grab all the stl_ IDs from the timeframe you are interested in. You can then continue to pull the included transactions per settlement. Date filtering on the List Settlements endpoint is an interesting option, though, which we will investigate once we general filtering/sorting capabilities.

florianbepunkt commented 1 month ago

@fjbender Thank you. I will close this now. Is there a way to be notified about new API features? Looking forward to some filtering capabilities. We often encounter situations where our clients need to reprocess older data (like last year, or the year before). So while client filtering is viable, it puts unnecessary load on your endpoints.

fjbender commented 1 month ago

I recommend you stay in touch via our Developer Discord, https://discord.gg/mollie :)