Onerway
POST

Open virtual account

Use this endpoint to request a virtual account for a user in the specified bank country or region and currency. The result is delivered through the Virtual account opening result webhook.

Request

apiKey
API key assigned for Embedded Finance API access.
Example:
Content-Type
Request content type.
Example:
userId
ID of the user for whom the virtual account is requested.
Example:
bankCountry
Country or region where the bank is located, as an ISO 3166-1 alpha-2 code.
Example:
currencyCode
Currency code of the virtual account to open.
Example:

Request example

curl -X POST 'https://sandbox-baas.onerway.com/embedded-finance/api/v2/virtual-account/open' \
  -H 'apiKey: replace_with_api_key' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "userId": 123456789,
  "bankCountry": "GB",
  "currencyCode": "GBP"
}'

Response

respCode
Response code returned by Onerway. 20000 indicates that the request succeeded.
Example:
respMsg
Human-readable response message.
Example:
Virtual account application details returned for a successful request.

Response example

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "merchantNo": "800***",
    "userId": 123456789,
    "vaApplicationId": 987654321
  }
}
No error responses are documented for this endpoint.