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
apiKeyAPI key assigned for Embedded Finance API access.
Example:
replace_with_api_keyContent-TypeRequest content type.
Example:
application/jsonuserIdID of the user for whom the virtual account is requested.
Example:
123456789bankCountryCountry or region where the bank is located, as an ISO 3166-1 alpha-2 code.
Example:
GBcurrencyCodeCurrency code of the virtual account to open.
Example:
GBPcurl -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
respCodeResponse code returned by Onerway.
20000 indicates that the request succeeded.Example:
20000respMsgHuman-readable response message.
Example:
Successdata{ merchantNo, userId, ... }Virtual account application details returned for a successful request.
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"merchantNo": "800***",
"userId": 123456789,
"vaApplicationId": 987654321
}
}No error responses are documented for this endpoint.