Onerway
Scenario overview

Inbound and crediting

A payer transfers money to your user. You match that payment to a specific user, and Onerway credits it internally. The inbound notice, the match and the credit result are three separate events: the notice says money arrived at the bank, the match says you linked it to a user, the result says it reached the user balance.

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

The inbound notice is pushed; do not poll. Its rechargeId is the key to every later action. Store it first, then decide whether to match the payment.

Matching links the payment to a user. You link rechargeId to your own userId; sourceOrderNo is optional and maps the payment to your own order. An inbound payment can be matched once; after that you cannot change its amount, currency or payer details.

Verification and review are not exposed. After the match is submitted, Onerway verifies, screens and, where required, reviews internally before crediting. You only see the acceptance response and the final credit result.

Before you start

  • Inbound notice ≠ credit. EMFIN.RECHARGE only means the bank payment was booked; the balance changes after the match completes.
  • 20000 ≠ final state. respCode=20000 means the request was processed successfully (accepted); final state comes from EMFIN.RECHARGE_RESULT.
  • Currency is a parameter, not a scenario. Which currencies are supported depends on the account and channel configuration; the flow does not change.

Lifecycle and notifications

  1. The payer transfers to the virtual account. This step does not involve your system. Only show collection details from a virtual account whose status is ACTIVE.
  2. Receive EMFIN.RECHARGE. Record rechargeId, currency, amount and payer details. Do not credit the user yet.
  3. Submit the match POST /api/v2/deposit/match. Send userId and rechargeId (both required); sourceOrderNo is optional (≤64 chars). The response only says the request succeeded; the final state comes from events.
  4. Wait for EMFIN.RECHARGE_RESULT. Only status=S is a successful credit; F is a failure. This is the final state.
  5. Handle additional materials (optional). You may receive EMFIN.TRANS_RFI; submit what it asks for. A revocation arrives as EMFIN.REVOKE_TRANS_RFI.
  6. After the credit. The transaction ends here. Refunds are on the refunds page; settlement results are described in Events and status.

Edge cases

SituationWhat to do
Matching the same rechargeId twiceDo not retry. Confirm whether the payment is already matched or credited before contacting Onerway.
Refunding before matchingUse the refund API. A credited payment cannot be returned through it.
The same notification arrives twiceDeduplicate by request_id; always answer HTTP 200 with respCode=20000.
Finding out where the money isUse the last EMFIN.RECHARGE_RESULT, not arrival order.
Amount or currency mismatchDo not retry with an edited amount; matching uses the amount and currency from the inbound notice. Raise an exception case with Onerway.
No result for a long timeDo not resubmit the match; wait for the event, or contact Onerway with the rechargeId.
Reassigning a credited paymentNot supported. A match is final; reassignment requires a return, after which the payer transfers again.

Developer view

The diagram expands the same flow by participant and marks the endpoint and key fields at each step. The business description ends here.

Inbound and crediting · sequence diagram

StepEndpoint / eventKey fields
Inbound noticeEMFIN.RECHARGErechargeId, currencyCode, transAmount, remitterName, bankTransferReference
Submit the matchPOST /api/v2/deposit/matchuserId, rechargeId, sourceOrderNo
Materials requestedEMFIN.TRANS_RFIrechargeId, requestedInfomation
Credit resultEMFIN.RECHARGE_RESULTrechargeId, status (S/F), failReason