POST
Export daily account statement
RestrictedUse this endpoint to export a daily account statement CSV for a given date, currency, and business type.
Restricted access
Access to the Account service APIs is enabled by Onerway approval.
Request
apikeyAccount service API key request header assigned by Onerway. Use the value for the same environment as the request base URL.
Example:
replace_with_account_service_apikeyx-timestampRequest timestamp. The gateway uses it to identify replay attempts.
Example:
1776931200Constraints
- Rule
- The timestamp must be within 10 minutes of the server time. Both 10-digit seconds and 13-digit milliseconds are accepted.
requestIdRequest ID used for idempotency control and request tracing.
Example:
REQ-STMT-20260720-0001onBehalfOfSub-merchant number when a platform merchant exports on behalf of its sub-merchant. The caller merchant from
apikey must be the parent merchant.Example:
replace_with_sub_merchant_nodateStatement date in
yyyyMMdd format.Example:
20260720Constraints
- Rule
- Use the
yyyyMMddformat without hyphens, for example20260720.
businessTypeBusiness type for the statement export. Defaults to
PAYOUT when omitted.Allowed values
ACQUIRING- Acquiring business statement.
PAYOUT- Payout business statement.
BAAS- BaaS business statement.
curl -X POST 'https://sandbox-api.onerway.com/account-server/api/v2/account/statement/daily/export' \
-H 'Content-Type: application/json' \
--data-raw '{
"requestId": "REQ-STMT-20260720-0001",
"date": "20260720",
"currency": "USD",
"businessType": "PAYOUT"
}'Response representations
- Media type
text/csv- Schema
- Type
stringFormatbinary
Response headers
Content-Dispositionstring- Provides the downloaded filename. The value follows the pattern `attachment; filename=statement_{date}_{currency}.csv`.
Response
respCodeStandardized response code for JSON error responses.
respMsgHuman-readable response message aligned with
respCode.file{ csv }Successful responses return a CSV file stream with
Content-Type: text/csv; charset=UTF-8. The Content-Disposition header follows the pattern attachment; filename=statement_{date}_{currency}.csv. Save the UTF-8 encoded content as a .csv file.error{ code, declineCode, ... }Standardized error object. Returned only when the CSV stream has not been committed yet; otherwise the failure is logged and the partial CSV is sent to the caller.
{
"file": {
"csv": {
"statementHeader": {
"Merchantid": "replace_with_merchant_no",
"Date": "GMT+8 2026/7/20",
"Currency": "USD"
},
"summaryRows": [
{
"Balancetype": "Total Balance",
"Openingbalance": "3000.00",
"Movementamount": "400.00",
"Endingbalance": "3400.00"
},
{
"Balancetype": "Available",
"Openingbalance": "2500.00",
"Movementamount": "500.00",
"Endingbalance": "3000.00"
}
],
"detailRows": [
{
"Time": "2026/7/20 10:30:00",
"Balancetype": "Available",
"Serialnumber": "20001",
"Activitytype": "Payout",
"Moveamount": "-100.00",
"RelatedtransationID": "replace_with_external_order_id",
"Remark": "Payout to bank account"
}
]
}
}
}No error responses are documented for this endpoint.