Onerway
Scenario overview

Events and status

Every final state comes from an event. A 20000 response only means the request was accepted; whether a business step succeeded is decided by events, not by responses.

Scenarios · This page defines the shared semantics used by every scenario page. Scenario pages reference it instead of repeating it.

Three rules

Remember these three

  • Final state comes from events. Success is S, failure is F; both are final. Everything else is in progress.
  • 20000 ≠ final state. respCode=20000 means the request was processed successfully (accepted), not that the business step finished.
  • One event, one business fact. An inbound notice is not a credit, and a credit is not a settlement.

Event catalogue

event_typeBusiness factKey fieldsFinal?
EMFIN.KYC_STATUSA KYC review step: materials requested, a decision given, or the request revokeddata.action, data.userId, data.kycStatus, data.requestedInfomationRequests and revocations are interim; a decision is final
EMFIN.VA_RESULTVirtual account opening finisheddata.vaApplicationId, data.userId, data.status (S/F)Yes
EMFIN.CLOSE_VA_RESULTVirtual account closure finisheddata.vaApplicationId, data.status (S/F)Yes
EMFIN.RECHARGEThe bank payment is booked but not credited yetdata.rechargeId, data.currencyCode, data.transAmount, data.remitterName, data.bankTransferReferenceNo
EMFIN.RECHARGE_RESULTMatching finished; the credit succeeded or faileddata.rechargeId, data.status (S/F), data.failReasonYes
EMFIN.TRANS_RFIThis transaction needs more documentsdata.rechargeId, data.requestedInfomationNo
EMFIN.REVOKE_TRANS_RFIThe material request was revokeddata.rechargeIdNo
EMFIN.BACKRefund or return finisheddata.rechargeId, data.status (S/F), data.bankRefundSerialNoYes
EMFIN.SETTLE_RESULTA settlement batch result, with the settlement date and the transactions in the batchdata.batchId, data.settleDate, data.currencyCode, data.amount, data.settleDetailsNotified per batch

Nine events in total. Field lists here are the minimum needed to decide state; each event page holds the full set.

Status semantics

Result events carry only two values. Progress is never pushed; if a synchronous response uses other values, the endpoint page is authoritative.

ValueMeaningFinal?
SSuccessYes
FFailureYes

Virtual accounts use a separate availability status. The query endpoint returns status, and the only value documented for collection is ACTIVE. Other values are not a public contract; integrators only need to test for ACTIVE.

This page only documents values that appear in the public documentation. Internal ledger states are not part of the text and must not be used as an integration signal.

Receiving events

  • Verify. Build HMAC-SHA256 from webhook_secret over x-timestamp + "." + raw_body and compare it with x-signature. Do not recompute from a parsed object.
  • Deduplicate. Use request_id. The same notification may arrive more than once.
  • Acknowledge. Return HTTP 200 with respCode=20000. Any other response is retried.
  • Ordering. Do not infer business order from delivery order; decide state from the last final event.
  • Idempotency. Handle the same event twice safely: record it first, then apply side effects.

Which action produces which event

Your actionEvent that follows
Submit KYC or additional materialsEMFIN.KYC_STATUS
Apply for or close a virtual accountEMFIN.VA_RESULT / EMFIN.CLOSE_VA_RESULT
(no action — a bank payment arrives)EMFIN.RECHARGE
Submit the matchEMFIN.RECHARGE_RESULT, or EMFIN.TRANS_RFI first
Submit additional materialsEMFIN.TRANS_RFI may arrive again, or EMFIN.REVOKE_TRANS_RFI
Apply for a refundEMFIN.BACK
(no action — scheduled settlement)EMFIN.SETTLE_RESULT

Common mistakes

PatternConsequence
Treating a synchronous response as a creditGoods shipped or balance added too early; reconciliation is off by one
Inferring state from notification orderState moves backwards under concurrency or retries
Not deduplicating by request_idDouble credit, double fulfilment
Treating EMFIN.RECHARGE as a creditUser balance disagrees with the ledger
Using status to decide whether a virtual account can collectCollecting on an account that is not active; the money is returned
Treating a settlement result as a credit resultTwo days of funds counted as one; the settlement amount does not reconcile