0Bit Documentation

Ramp statuses

Map 0Gate session status and webhook event signals into your own order, funding, withdrawal, or swap states.

0Gate has two related state sources: the session object and signed webhook events. The session object has a compact lifecycle; webhooks carry event signals that your backend should verify, dedupe, and map into your own ledger or order model.

Session lifecycle

Session statusMeaningPartner action
openThe hosted journey can still accept user action.Show active or pending UX.
completedAt least one intent linked to the session has succeeded.Verify the backend event before final fulfillment.
expiredThe session is past expires_at without completing.Close the attempt and create a new session if the user retries.
cancelledYour server cancelled the session or the hosted attempt was closed as cancelled.Close or restart according to your product UX.

Webhook event signals

Event familyUse
gate_session.createdRecord that the hosted attempt exists.
gate_session.processingKeep the order pending while the hosted flow is moving.
gate_session.completedFulfill after signature verification and event dedupe.
gate_session.failedMark the attempt failed or recoverable according to your product policy.
gate_session.cancelledClose the attempt or let the user restart.
gate_session.expiredRequire a fresh session for a new attempt.
Rail or quote eventsUse only for entitled flows where your account is enabled for those records.

Partner state model

Your stateEnter whenExit when
requires_sessionUser starts a task and no 0Gate session exists.Your server creates a session.
requires_user_actionSession exists and the user has not completed hosted steps.Processing, completion, failure, cancel, or expiry event arrives.
processingHosted or backend event indicates work is still in progress.Terminal event or server read confirms final state.
completedVerified completion event is processed idempotently.Normally terminal.
failedVerified failure or unrecoverable error is processed.User starts a new attempt.
cancelled_or_expiredSession is cancelled or expired.User starts a new attempt.

Separate session status from product fulfillment

A session status is not your ledger. Store your own state transitions and only advance them from verified backend evidence.

On this page