Onerway
API Reference

Response codes

Review Account service response envelopes, success codes, and recommended troubleshooting actions.

Use this page when an Account service response returns a non-success response code. Always follow the response field names shown on the endpoint page you are calling.

Current account balance, account transaction, and account statement endpoints do not use code / message as the primary response envelope. They use respCode / respMsg, where 20000 means the request was processed successfully.

Current Account service endpoints

Account balance and account transaction endpoints use the JSON response envelope respCode / respMsg / data / error.

The daily account statement export endpoint returns a CSV stream on success. It returns a JSON error response with respCode, respMsg, and error only when the request fails before the CSV response is committed.

respCodeDefault respMsgError typeExplanationRecommended action
20000Success-The request was processed successfully.Continue with the endpoint-specific data fields, account balance details, account transaction records, or pagination fields. For a successful statement export, read the CSV stream.
10001Invalid request parameterinvalid_request_errorOne or more request fields are missing, malformed, outside the allowed range, or use an unsupported enum value.Compare the request with the endpoint schema, required fields, currency codes, enum values, timestamp requirements, query time ranges, and examples.
10006DUPLICATE_REQUESTidempotency_errorThe requestId was reused within the idempotency window.Confirm the original request result first. Use a new requestId only for a genuinely new operation.

The error object carries standardized error details:

FieldDescription
codeExternal business error code, usually aligned with respCode.
declineCodeCompatibility field that usually mirrors code for current Account service APIs.
messageHuman-readable error message.
typeStandardized error type, such as invalid_request_error, idempotency_error, or api_error.
paramRequest parameter that caused the error, when applicable.
requestIdCaller request ID copied from body requestId.

Global Account endpoints

Global Account creation and detail APIs use the success / respCode / respMsg response envelope. The success response code is 20000.

respCodeConstantDefault respMsgExplanationRecommended action
20000SUCCESS_CODESuccessThe request was processed successfully.Continue with the endpoint-specific data fields and Global Account status values.
10001INVALID_PARAMETERInvalid request parameterOne or more request fields are missing, malformed, outside the allowed range, or use an unsupported enum value.Compare the request with the endpoint schema, required fields, enum values, query constraints, and examples. For detail queries, globalAccountId must be numeric, and at least one of globalAccountId or globalAccountNo is required.
10002INVALID_TIME_RANGEInvalid query time rangeThe query time range is invalid or exceeds the supported range for the request.Adjust the start and end time according to the endpoint query constraints, then retry.
10003UNAUTHORIZED_ACCESSAccess deniedThe caller is not allowed to access the requested Account service resource or capability.Check that the apikey, environment, merchant account, and IP allowlist match the requested resource. Contact Onerway support if access should be enabled.
10004RESOURCE_NOT_FOUNDResource not foundThe requested Global Account or related business resource was not found.Verify globalAccountId, globalAccountNo, environment, and merchant ownership. Do not retry blindly with the same identifier.
10005REQUEST_FAILEDRequest failedThe Account service could not complete the request.Check the response message and request context. Retry only when the operation is safe to repeat or protected by idempotency.
10006DUPLICATE_REQUESTDuplicate requestThe request duplicates a previous request or uses an idempotency identifier that has already been processed.Query the existing result before sending another request. Use a new requestId only for a genuinely new operation.
10007INIT_GLOBAL_ACCOUNT_FAILEDInit Global Account failedGlobal Account initialization failed.Check customerId, onBehalfOf, supported currencies, bank country or region, and account capability configuration. Contact Onerway support if the request data is valid.
10008GLOBAL_ACCOUNT_CUSTOMER_INVALIDInvalid customer id for Global AccountThe customer identifier cannot be used for the requested Global Account operation.Confirm customerId belongs to the merchant account. For platform calls on behalf of a child customer, confirm customerId matches onBehalfOf and the parent-child relationship is valid.
10009GLOBAL_ACCOUNT_CALLER_NOT_AUTHORIZEDCaller identity does not match customerThe caller identity does not match the customer associated with the Global Account resource.Confirm that the apikey, merchant account, customerId, onBehalfOf, and Global Account identifier all belong to the same authorized relationship.