0Bit Documentation

Retrieve a pay-in

GET /rails/pay_ins/{id} - Retrieve a partner-scoped pay-in record.

0Gate is the primary public integration path for hosted payment, ramp, and swap experiences. Keep secret-key operations on your server and hand only browser-safe values to the widget.

Retrieving a pay-in returns the current state of a fiat collection your server initiated. Use it to follow a rail to settled, to reconcile against your own records, and to back up webhook callbacks with an authoritative server-side read.

Endpoint

FieldValue
MethodGET
Path/v1/rails/pay_ins/{id}
AreaRails
Operation idretrievePayIn
Auth boundarySecret key from your server.

The {id} path parameter is a pay-in id returned by POST /rails/pay_ins. An id not scoped to this credential returns 404 — cross-tenant access is never 403.

Use it for

Retrieve a partner-scoped pay-in record and read its current status.

Use this endpoint only for the partner-scoped resource it describes. Store your own reference id, the returned 0Bit object id, the request id, timestamps, and the current status so support and reconciliation do not depend on browser callbacks alone.

Production rules

  • Keep secret keys on your server. This endpoint requires an sk_* key — never a pk_* publishable key.
  • Validate environment, mode, entitlement, asset, network, and amount before the call.
  • Poll with bounded backoff; prefer webhooks for status transitions and use this read to confirm.
  • Branch on machine-readable status, error code, object id, and request id.
  • Treat examples and placeholder ids as fake data only.

Request

ParameterInRequiredTypeUse it for
idpathYesstringThe pay-in id returned when the record was created.
HeaderRequiredUse it for
AuthorizationYesBearer sk_* secret key from your server.

Response

Returns 200 with a rail_pay_in object.

FieldWhen presentUse it for
objectAlwaysConstant rail_pay_in for client-side type narrowing.
idAlwaysThe pay-in id.
kindAlwaysConstant pay_in.
statusAlwaysLifecycle state: pending, processing, settled, failed, or cancelled.
gate_session_idAlwaysThe session this pay-in belongs to.
quote_idAlwaysThe redeemed signed quote.
methodAlwaysThe pay-in method derived from the quote.
amountAlwaysSigned, fee-inclusive amount the customer pays (base plus fees), as a decimal string.
currencyAlwaysISO 4217 fiat currency of amount.
referenceAlwaysYour supplied reference, or null.
created_atAlwaysRFC 3339 timestamp the record was created.
account_blockedConditionaltrue when this rail pushed the user past the cumulative volume cap; the account is blocked for future rails pending manual review.

Branch on status, not on field presence

status is the single source of truth for where the rail is. Treat settled as terminal-success and failed/cancelled as terminal-failure; pending and processing are in-flight. Amounts are decimal strings, never floats.

Examples

curl https://gate-api.0bit.app/v1/rails/pay_ins/rpi_test_0a1b2c3d4e5f \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{
  "object": "rail_pay_in",
  "id": "rpi_test_0a1b2c3d4e5f",
  "kind": "pay_in",
  "status": "settled",
  "gate_session_id": "gs_test_67a1f3b9e4b0c10001234567",
  "quote_id": "qt_test_9f8e7d6c5b4a",
  "method": "bank_transfer",
  "amount": "100.50",
  "currency": "EUR",
  "reference": "order_test_001",
  "created_at": "2026-01-01T00:00:00Z"
}

Errors

All errors use the unified envelope and carry an X-Request-Id response header. Branch on code/type/statusCode, not on the free-form message.

{
  "type": "not_found",
  "code": "not_found",
  "message": "Example not-found error using fake data.",
  "request_id": "req_test_000000000123",
  "doc_url": null,
  "statusCode": 404
}
StatustypeWhen it happens
401unauthorizedMissing or invalid secret key.
403forbiddenCredential rejected, rail access not enabled, or mode mismatch.
404not_foundThe pay-in does not exist or is not scoped to this credential. Cross-tenant access is 404.
429rate_limitedRequest throttled. Back off and retry.
5xxserver_errorTransient server or upstream failure. Retry with bounded backoff.

Public boundary

This reference covers partner-scoped endpoint behavior, authentication, idempotency, webhook verification, and support-safe records. Internal operations, administrative routes, settlement venues, and unsupported availability claims are outside the public API contract.

On this page