Onerway
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

apiKey
API key assigned for Embedded Finance API access.
Example:
Content-Type
Request content type.
Example:
userId
ID of the user whose virtual accounts are queried.
Example:

Request example

curl -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

respCode
Response code returned by Onerway. 20000 indicates success.
Example:
respMsg
Human-readable response message.
Example:
Virtual accounts returned for the user.

Response example

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