Onerway
POST

Export daily account statement

Restricted
Use 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

apikey
Account service API key request header assigned by Onerway. Use the value for the same environment as the request base URL.
Example:
x-timestamp
Request timestamp. The gateway uses it to identify replay attempts.
Example:
Constraints
Rule
The timestamp must be within 10 minutes of the server time. Both 10-digit seconds and 13-digit milliseconds are accepted.
requestId
Request ID used for idempotency control and request tracing.
Example:
onBehalfOf
Sub-merchant number when a platform merchant exports on behalf of its sub-merchant. The caller merchant from apikey must be the parent merchant.
Example:
date
Statement date in yyyyMMdd format.
Example:
Constraints
Rule
Use the yyyyMMdd format without hyphens, for example 20260720.
currency
Statement currency. Use a three-letter ISO 4217 currency code.
Example:
businessType
Business type for the statement export. Defaults to PAYOUT when omitted.
Allowed values
ACQUIRING
Acquiring business statement.
PAYOUT
Payout business statement.
BAAS
BaaS business statement.

Request example

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 stringFormat binary

    Response headers

    Content-Dispositionstring
    Provides the downloaded filename. The value follows the pattern `attachment; filename=statement_{date}_{currency}.csv`.

Response

respCode
Standardized response code for JSON error responses.
respMsg
Human-readable response message aligned with respCode.
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.
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.

Response example

{
  "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.