OPENAPI 3.1 · ASYNCAPI 3.1 · LOCAL

Фактические контракты — с границами исполнения в самом описании.

CertaRail предоставляет control-plane API для decisions, evidence, policy, limits, review cases, sandbox trading и corporate treasury. Ни один endpoint не отправляет live order, payment, withdrawal или blockchain transfer.

RESTКанонический OpenAPI 3.1
СобытияКанонический AsyncAPI 3.1
Внешние вызовы по умолчанию0
Внешний monetary / asset эффектNOT_EXECUTED

START HERE

Минимальный путь локальной проверки.

  1. 01

    Запустите PostgreSQL и API

    Compose-конфигурация поднимает локальную авторитетную запись.

  2. 02

    Используйте sandbox bearer

    Tenant определяется сервером; конфликтующий tenant отклоняется.

  3. 03

    Передайте idempotency key

    Повтор того же payload возвращает committed response; другой payload даёт 409.

  4. 04

    Читайте decision и receipt

    Business outcome и audit evidence коммитятся атомарно.

  5. 05

    Не трактуйте sandbox как execution

    External calls равны нулю; данные синтетические.

Sandbox eligibility request
curl -X POST http://localhost:8080/v1/eligibility/evaluations \
  -H "Authorization: Bearer <sandbox-bearer>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: bank-order-000001" \
  -d '{
    "request_id": "bank-order-000001",
    "tenant_id": "sandbox-bank",
    "facts_observed_at": "2026-08-24T18:20:00Z",
    "operation": "BUY",
    "asset_code": "DEMO-BTC",
    "amount": { "currency": "RUB", "minor_units": 25000000 },
    "client": {
      "subject_ref": "cust_7fd2",
      "facts_version": "kyc-443",
      "residency": "RU",
      "investor_category": "RETAIL",
      "kyc_status": "VERIFIED",
      "screening_status": "CLEAR",
      "knowledge_test": {
        "passed": true,
        "passed_at": "2026-08-01T00:00:00Z",
        "valid_until": "2027-08-01T00:00:00Z"
      },
      "risk_disclosure": {
        "accepted": true,
        "version": "sandbox-risk-v1",
        "accepted_at": "2026-08-24T18:15:00Z"
      },
      "annual_volume": { "currency": "RUB", "minor_units": 10000000 }
    },
    "intermediary": { "kind": "BROKER", "regulated": true }
  }'

PROTOCOL BEHAVIOR

Интеграционные правила определены до подключения провайдера.

Поведение API CertaRail
ОбластьФактическое поведениеProduction gap
АутентификацияTenant-bound sandbox bearerProduction IdP, rotation, service identities
ИдемпотентностьStable replay; payload conflict → 409Shared durable policy across external commands
ОшибкиStrict JSON; 400/401/403/409/415/429/503Partner-specific observability and support routing
Rate limitsIn-flight backpressure; Retry-After where documentedEdge quotas and contractual limits
EventsTransactional outbox, at-least-once, event_id dedupeTLS/SASL/ACL and external delivery
WebhooksSigned checkout envelope, tenant-scoped Inbox, subscription rotation, test events, bounded/manual retryExternal production HTTPS delivery, production secrets, UAT
SDKTypeScript, Python и Go SDK 0.1.0 source packages; local package/module gatesPublic npm/PyPI/Go module distribution, provenance attestation, owner approval

Поведение API CertaRail

Аутентификация

Фактическое поведение
Tenant-bound sandbox bearer
Production gap
Production IdP, rotation, service identities

Идемпотентность

Фактическое поведение
Stable replay; payload conflict → 409
Production gap
Shared durable policy across external commands

Ошибки

Фактическое поведение
Strict JSON; 400/401/403/409/415/429/503
Production gap
Partner-specific observability and support routing

Rate limits

Фактическое поведение
In-flight backpressure; Retry-After where documented
Production gap
Edge quotas and contractual limits

Events

Фактическое поведение
Transactional outbox, at-least-once, event_id dedupe
Production gap
TLS/SASL/ACL and external delivery

Webhooks

Фактическое поведение
Signed checkout envelope, tenant-scoped Inbox, subscription rotation, test events, bounded/manual retry
Production gap
External production HTTPS delivery, production secrets, UAT

SDK

Фактическое поведение
TypeScript, Python и Go SDK 0.1.0 source packages; local package/module gates
Production gap
Public npm/PyPI/Go module distribution, provenance attestation, owner approval
01

Opaque references

Передавайте subject references, а не персональные данные, если контракт не требует иного.

02

Retry same command

После timeout повторяйте тот же idempotency key и payload, а не создавайте новый intent.

03

Evidence ≠ execution

Decision, order draft или provider observation не доказывают движение денег или актива.

СЛЕДУЮЩИЙ ШАГ

Выполните первый запрос в безопасном sandbox-контуре.

Developer Console использует synthetic fixtures: запрос создаёт проверяемую запись, но не вызывает внешнего провайдера.

Сделать первый API-запрос