Sites WayDevelopers
API reference

Finance

Balance, settlements, payouts, fees and statements.

Your balance, per currency

GET /v1/balance

Live figures from your financial history: what is held, available and paid out.

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/balance \
  -H "Authorization: Bearer sw_test_…"

200 — The balances

FieldTypeDescription
balancesarray of object
balances[].activity_totalsobject
balances[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
balances[].figures_as_ofstring (date-time)
balances[].operationalobject
balances[].pending_adjustmentsobject
balances[].pending_adjustments.fee_recovery_pendingobject
balances[].pending_adjustments.fee_recovery_pending.amountstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
balances[].pending_adjustments.fee_recovery_pending.countinteger
balances[].positionsobject

Errors answer with the error object.

Monthly statements

GET /v1/statements

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/statements \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
currencystring (query)noISO 4217 currency code, upper case. pattern ^[A-Z]{3}$

200 — The statements

FieldTypeDescription
statementsarray of object
statements[].closing_positionsobject
statements[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
statements[].figures_as_ofstring (date-time)
statements[].idstring
statements[].opening_positionsobject
statements[].period_endstringpattern ^\d{4}-\d{2}-\d{2}$
statements[].period_startstringpattern ^\d{4}-\d{2}-\d{2}$
statements[].statusGENERATING, ISSUED, SUPERSEDED
statements[].versioninteger

Errors answer with the error object.

A statement with its entries

GET /v1/statements/{id}

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/statements/pay_01M6XF0H2MAC63MEKQAT4K3AXF \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
idstring (path)yesThe statement id

200 — The statement

FieldTypeDescription
closing_positionsobject
currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
entriesarray of object
entries[].amount_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
entries[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
entries[].datestringpattern ^\d{4}-\d{2}-\d{2}$
entries[].descriptionstring or null
entries[].idstring
entries[].orderinteger
entries[].prior_period_correctionboolean
entries[].statusstring or null
figures_as_ofstring (date-time)
idstring
opening_positionsobject
operationalobject
period_activityobject
period_endstringpattern ^\d{4}-\d{2}-\d{2}$
period_startstringpattern ^\d{4}-\d{2}-\d{2}$
statusGENERATING, ISSUED, SUPERSEDED
versioninteger

Errors answer with the error object.

A statement as CSV

GET /v1/statements/{id}/export

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/statements/pay_01M6XF0H2MAC63MEKQAT4K3AXF/export \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
idstring (path)yesThe statement id

200 — The CSV file

A text/csv file.

Errors answer with the error object.

Payouts to your bank account

GET /v1/payouts

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/payouts \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
currencystring (query)noISO 4217 currency code, upper case. pattern ^[A-Z]{3}$

200 — The payouts

FieldTypeDescription
payoutsarray of object
payouts[].amount_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
payouts[].created_atstring (date-time)
payouts[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
payouts[].idstring
payouts[].statusPENDING, PROCESSING, COMPLETED, FAILED, CANCELEDCOMPLETED: it left our account (not: it arrived in yours)

Errors answer with the error object.

Fees charged to you

GET /v1/fees

The most recent 100, newest first.

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/fees \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
currencystring (query)noISO 4217 currency code, upper case. pattern ^[A-Z]{3}$

200 — The fees

FieldTypeDescription
feesarray of object
fees[].assessed_atstring (date-time)
fees[].base_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
fees[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
fees[].gross_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
fees[].idstring
fees[].is_adjustmentboolean
fees[].tax_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$

Errors answer with the error object.

Settlements

GET /v1/settlements

Permission: finance:read

curl -X GET https://api.sw-staging.dev/v1/settlements \
  -H "Authorization: Bearer sw_test_…"

Parameters

FieldTypeRequiredDescription
currencystring (query)noISO 4217 currency code, upper case. pattern ^[A-Z]{3}$

200 — The settlements

FieldTypeDescription
settlementsarray of object
settlements[].currencystringISO 4217 currency code, upper case. pattern ^[A-Z]{3}$
settlements[].idstring
settlements[].net_entitlement_minorstringMinor units as a decimal string (exact at any size). pattern ^-?[0-9]+$
settlements[].period_endstringpattern ^\d{4}-\d{2}-\d{2}$
settlements[].period_startstringpattern ^\d{4}-\d{2}-\d{2}$
settlements[].statusPENDING, SETTLED, REVISED

Errors answer with the error object.

On this page