POST
Query virtual accounts
Use this endpoint to retrieve the virtual accounts associated with a user ID. When making a payment to a virtual account, use only an account with a status of ACTIVE.
Request
apiKeyAPI key assigned for Embedded Finance API access.
Example:
replace_with_api_keyContent-TypeRequest content type.
Example:
application/jsonuserIdID of the user whose virtual accounts are queried.
Example:
12345678curl -X POST 'https://sandbox-baas.onerway.com/embedded-finance/api/v2/virtual-account/query' \
-H 'apiKey: replace_with_api_key' \
-H 'Content-Type: application/json' \
--data-raw '{
"userId": 12345678
}'Response
respCodeResponse code returned by Onerway.
20000 indicates success.Example:
20000respMsgHuman-readable response message.
Example:
Successdata{ merchantNo, userId, ... }Virtual accounts returned for the user.
{
"respCode": "20000",
"respMsg": "Success",
"data": [
{
"merchantNo": "800***",
"userId": 12345678,
"iban": "GB00EXAMPLE00000000000000",
"ownerName": "EXAMPLE USER",
"sortCode": "040893",
"bankCountry": "GB",
"status": "ACTIVE"
}
]
}No error responses are documented for this endpoint.