Onerway
Scenario overview

Accounts and account opening

A user first has an entity record, then a currency account, then a virtual account. The three steps happen in order and cannot be reordered; each result arrives either as an event or as a synchronous response — never infer it from a submission succeeding.

Scenarios · This page is independent of integration method. API parameters live in the API Reference; event semantics in Events and status; the diagram is at the end of this page.

Concepts and choices

Three objects, three jobs. KYC is the entity record and decides whether the user qualifies. The currency account decides which currencies the user can hold. The virtual account is the bank-side collection account and decides where money can be sent. They are not interchangeable.

The order is fixed. The integration flow submits business KYC first, then opens a currency account, then applies for a virtual account. Each virtual account call covers one country and one currency.

KYC is asynchronous. Submitting only returns a userId; the decision arrives as EMFIN.KYC_STATUS. Omit userId in the request to create a user; pass an existing ID to update that user's business KYC, in which case every required field must be sent again.

Open currencies one by one. One currency account per currency; the call only takes userId and currencyCode. Which currencies are available depends on your merchant setup.

A virtual account needs a country and a currency. bankCountry is an ISO 3166-1 alpha-2 code and currencyCode is ISO 4217. A successful request returns vaApplicationId, the key used to match the opening result.

Lifecycle and notifications

  1. Upload materials. Keep the returned fileId; KYC and additional-material requests both reference it.
  2. Submit business KYC. userId in the request may be empty; the response returns userId, the key for every later call. Store it next to your own user ID.
  3. Wait for EMFIN.KYC_STATUS. Read data.action: materials requested, decision given, or the request revoked.
  4. Open a currency account. Send userId and currencyCode; the response data is empty. This version of the documentation records no callback for the endpoint, so treat the response as the result.
  5. Apply for a virtual account. Send userId, bankCountry and currencyCode; keep vaApplicationId. The response means accepted, not opened.
  6. Wait for EMFIN.VA_RESULT. Match it by data.vaApplicationId; only status=S is a success.
  7. Query the virtual account. Before collecting, confirm status is ACTIVE; only show an available account to the payer.
  8. Close it when needed. Wait for EMFIN.CLOSE_VA_RESULT.

Edge cases

SituationWhat to do
KYC rejectedDo not open accounts. Fix the reason and resubmit.
Resubmitting KYCIt does not speed up a running review; wait for EMFIN.KYC_STATUS.
Updating a submitted KYCInclude userId; every required field must still be sent.
Virtual account without a currency accountThe server rejects it; open the currency account first.
Several currencies for one userOne currency account per currency; each virtual account call covers one country and one currency, all linked by the same userId.
Collecting right after opening a currency accountYou cannot. Collection needs an active virtual account; an opening response is not a collection signal.
Collecting on an unavailable accountDo not. The documentation only promises that an ACTIVE account can be paid into; show only accounts in that state.
Collecting while closingDo not display the account during closure; wait for EMFIN.CLOSE_VA_RESULT before deciding.
Mixing availability with business statusTwo different scales; see Events and status.
Wrong currencyOpening the wrong currency does not break the flow, but that account cannot collect; open another one with the right currencyCode.

Developer view

The diagram expands the account opening chain by participant and marks the endpoint and key fields at each step.

Accounts · sequence diagram

StepEndpoint / eventKey fields
Upload a filePOST /api/v2/upload/filefileName, file; returns fileId
Submit business KYCPOST /api/v2/kyc/businessuserId (optional), kycType, registration data, related parties
KYC outcomeEMFIN.KYC_STATUSdata.action, data.kycStatus, data.requestedInfomation
Open a currency accountPOST /api/v2/currency-accounts/openuserId, currencyCode
Apply for a virtual accountPOST /api/v2/virtual-account/openuserId, bankCountry, currencyCode; returns vaApplicationId
Opening resultEMFIN.VA_RESULTdata.vaApplicationId, data.status (S/F)
Query virtual accountsPOST /api/v2/virtual-account/queryuserId; returns the account list and status
Close an accountPOST /api/v2/virtual-account/close / EMFIN.CLOSE_VA_RESULTuserId, vaApplicationId, vaCloseReason (≤512 chars)