Skip to content

Settlements

Generate Csv

Request

Generate a CSV file for the given date range and format.

Remember: use the header X-Organization-Id with the organization ID if you are using a partner token which has access to multiple organizations.

Security
OAuth2ClientCredentials(Required scopes: organization:accounting:read)
Headers
X-Organization-Idstring(X-Organization-Id)

Required if the account is part of multiple organizations. If the account only has access to one organization, this header is not required.

Bodyapplication/jsonrequired
from_datestring, (date)(From Date)required
to_datestring, (date)(To Date)required
formatstring(SettlementCSVType)

The format of the CSV file to generate.

Default:"transactions"
Enum:"transactions""payouts""machine_readable"
test_modeboolean(Test Mode)
Default:false
payout_typestring(SettlementPayoutType)
Default:"PSP"
Enum:"PSP""SPENSE"
exclude_providersArray of strings(Exclude Providers)
Default:[]
Items Enum:"bankaxept""camt053""camt054""cash_register""ccv_terminal""manual""mollie""neonomics""nets_easy""nets_terminal"
GET
/settlements/generate_csv
curl -i -X GET \
  https://api.spensepay.com/partner/settlements/generate_csv \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Organization-Id: string' \
  -d '{
    "from_date": "2023-01-01",
    "to_date": "2023-01-31",
    "format": "transactions",
    "test_mode": false,
    "payout_type": "PSP",
    "exclude_providers": []
  }'

Responses

CSV file generated successfully

Bodytext/csv
Response
Date of transaction,Payment provider,Settlement reference,Settlement paid at,Reference,Currency,Gross amount,Fees,Net amount,Payment type,Payment method
2025-07-09 00:00:00+00:00,Worldline Bambora,12345678-20250710,2025-07-10 00:00:00+00:00,100000,NOK,1200.99,,,Debit,Visa
2025-07-09 00:00:00+00:00,Worldline Bambora,12345678-20250710,2025-07-10 00:00:00+00:00,100001,NOK,9000.00,,,Credit,Mastercard