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 status | Meaning | Partner action |
|---|---|---|
open | The hosted journey can still accept user action. | Show active or pending UX. |
completed | At least one intent linked to the session has succeeded. | Verify the backend event before final fulfillment. |
expired | The session is past expires_at without completing. | Close the attempt and create a new session if the user retries. |
cancelled | Your server cancelled the session or the hosted attempt was closed as cancelled. | Close or restart according to your product UX. |
Webhook event signals
| Event family | Use |
|---|---|
gate_session.created | Record that the hosted attempt exists. |
gate_session.processing | Keep the order pending while the hosted flow is moving. |
gate_session.completed | Fulfill after signature verification and event dedupe. |
gate_session.failed | Mark the attempt failed or recoverable according to your product policy. |
gate_session.cancelled | Close the attempt or let the user restart. |
gate_session.expired | Require a fresh session for a new attempt. |
| Rail or quote events | Use only for entitled flows where your account is enabled for those records. |
Partner state model
| Your state | Enter when | Exit when |
|---|---|---|
requires_session | User starts a task and no 0Gate session exists. | Your server creates a session. |
requires_user_action | Session exists and the user has not completed hosted steps. | Processing, completion, failure, cancel, or expiry event arrives. |
processing | Hosted or backend event indicates work is still in progress. | Terminal event or server read confirms final state. |
completed | Verified completion event is processed idempotently. | Normally terminal. |
failed | Verified failure or unrecoverable error is processed. | User starts a new attempt. |
cancelled_or_expired | Session 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.