Organize backend into product executable and shared Go modules

This commit is contained in:
Stephan D committed 2026-09-12 14:14:08 +02:00
1 parent 981e84a4b4
commit f0720ec66b
382 files changed
+1938 -6983

No files matched your search

+6 -4
View File
@@ -16,12 +16,14 @@ test-frontend:
.PHONY: test-backend lint-backend run-backend
test-backend:
cd backend && go test -race ./...
cd backend/shared && go test -race ./...
cd backend/product && go test -race ./...
lint-backend:
cd backend && go test ./internal/architecture
cd backend/product && go test ./architecture
cd backend && test -z "$$(gofmt -l .)"
cd backend && go vet ./...
cd backend/shared && go vet ./...
cd backend/product && go vet ./...
run-backend:
cd backend && go run ./cmd/bff
cd backend/product && go run .
+14 -3
View File
@@ -25,11 +25,11 @@ skill to perform this completion workflow.
## Use the project error model
- Do not introduce `fmt.Errorf` or `errors.New`. Use the constructors and
wrapping helpers in `backend/pkg/merrors`.
wrapping helpers in `backend/shared/errors`.
- Preserve the underlying cause when adding context by using an appropriate
`merrors` wrapping helper.
- When no suitable project error exists, add the smallest generally useful
definition or helper to `backend/pkg/merrors` instead of creating an ad hoc error
definition or helper to `backend/shared/errors` instead of creating an ad hoc error
elsewhere.
## Keep modules cohesive and names concise
@@ -93,7 +93,18 @@ unused dependencies; remove those dependencies from the selected components.
Copied BFF components are locally owned and may diverge.
Use only Sendico's public HTTP API for platform operations. Never import sibling
Sendico modules or access its database, internal gRPC APIs, discovery or message
bus. Keep the pinned public wire contract separate from local DTOs and models.
bus. Keep consumed public wire contracts inside the owning adapter, separate
from local DTOs and models. Do not copy unused API snapshots.
Resolve the configured provider organization and customer resource ownership on
the server. Never treat all customers as the backend integration principal.
Use the copied structured logger, injected at operational boundaries.
## Go module structure
`backend/` groups independent Go modules; it is not itself a Go module.
`product/` is the customer-facing executable and owns its `main.go` and `go.mod`.
`shared/` is a library module for reusable infrastructure and has no entry point.
Backoffice belongs in its own executable module (`backoffice/`) when implemented,
with its own entry point and configuration, not inside the product executable.
Keep feature models, storage, services and transport together inside their owning
module. Shared infrastructure must not import a product or backoffice module.
+295 -852
View File
File diff suppressed because it is too large. Load diff
+19 -8
View File
@@ -4,9 +4,9 @@ Source repository: `S_I/sendico` (`git.sendico.io`), revision
`8bb20dcd622dd8eb92d289b6b34411e7eccab083`.
[PROVENANCE.json](PROVENANCE.json) records each retained file, its original path
and Git blob, and whether a Go file changed beyond namespace replacement and
formatting. It currently covers 232 Go source/test files and 112 public OpenAPI
files. Sources came from the pinned commit, not the dirty Sendico checkout.
and Git blob, and whether a Go file changed beyond import-path replacement and
formatting. It currently covers 233 Go source/test entries across `product` and `shared`
(one original configuration file contributes to two feature packages). Sources came from the pinned commit, not the dirty Sendico checkout.
These are SXCHNGE-owned copies that may diverge independently.
## Retained implementation
@@ -18,13 +18,11 @@ These are SXCHNGE-owned copies that may diverge independently.
- Verification issuance, expiry, attempts, consumption and idempotency.
- Local Mongo connection, transactions and the repository/query implementation
required by account, session and verification storage, with retained tests.
- Public OpenAPI 4.2.37 and its recursive schema references, isolated under
`contracts/sendico`. These wire files are unchanged except for trailing blank
line normalization in three YAML files; they are not local domain models.
## Adaptations and exclusions
Imports belong to `git.sendico.io/tech/sxchnge/bff`. The composition root selects
The backend contains Go modules `git.sendico.io/tech/sxchnge/product` and
`git.sendico.io/tech/sxchnge/shared`. Product owns its executable entry point;
shared is a dependency library with no executable or domain-module imports. The composition root selects
local customer services. Discovery, message-bus registration, private gRPC and
platform factories are absent. Process identity and the refresh cookie use SXCHNGE.
Startup validates required settings and timeouts, closes failed connections and
@@ -60,3 +58,16 @@ This is a bootstrap. Signup/profile HTTP wiring, verification delivery/completio
and the public Sendico HTTP adapter remain explicit work in the
[architecture plan](../docs/architecture/bff.md). The sole Sendico organization
reference belongs to that adapter's configuration, never to local customers.
## Module organization
`backend/` groups modules; it has no root `go.mod`. The inherited `cmd`, `edge`,
`internal`, `pkg` and empty `scripts` top-level directories are gone. `product`
contains `main.go`, its manifest and app/customer/auth/session/verification code.
`shared` owns its manifest and generic infrastructure. Models moved beside their
owning features. Customer repository construction moved out of shared database
code. Auth and verification configurations moved out of application interfaces.
All 112 unconsumed public API snapshot files and their snapshot-only check were
removed. Future public adapters will own just the wire types they consume.
Backoffice is a separate future executable module, not an alias for product.
+30 -36
View File
@@ -1,41 +1,35 @@
# SXCHNGE BFF
# Go backend modules
A locally owned copy of Sendico's reusable BFF runtime, authentication/session
stack and customer account service. See [provenance](PROVENANCE.md) and the
[architecture and public API plan](../docs/architecture/bff.md).
`backend/` groups independent Go modules. It is not an executable or a Go module.
SXCHNGE owns its customers and authentication. SXCHNGE itself is one organization
in Sendico. Provider integration uses only Sendico's public HTTP API; the pinned
[OpenAPI snapshot](contracts/sendico/api.yaml) is isolated from local models.
```text
backend/
├── product/ Customer-facing BFF executable
│ ├── main.go
│ ├── go.mod
│ ├── app/ Startup, composition, HTTP server and health
│ ├── customers/ Customer service, models and Mongo repository
│ ├── auth/ Login/protected HTTP routes, DTOs and configuration
│ ├── sessions/ Session models, refresh storage, cookies and tokens
│ └── verification/ Verification models, configuration and storage
└── shared/ Reusable library module
├── go.mod
├── database/ Connection, transactions and repository primitives
├── errors/
├── logging/
└── … Generic HTTP, configuration and rate-limit helpers
```
## Run locally
The backoffice BFF belongs in a separate `backend/backoffice/` executable module,
with its own `main.go`, `go.mod`, configuration and operator authentication. It is
not implemented by this customer-BFF bootstrap. Shared infrastructure has no
`main.go` and must not depend on an executable module. The product module uses a
local `replace` for `../shared`; each module has its own dependency manifest.
Requires Go 1.27 and an SXCHNGE-owned MongoDB replica set for transactions.
Copy `config.example.yml` to an untracked `config.yml`. Set:
Run the product with `make run-backend`; see its [run guide](product/README.md).
`make test` runs both backend modules and the frontend. `make lint-backend` checks
both Go modules and their architecture boundaries.
- `SXCHNGE_MONGO_URI`: URI for the local SXCHNGE database.
- `SXCHNGE_JWT_SECRET`: private random signing key, at least 32 bytes for HS256.
- `SXCHNGE_DOMAIN`: local API hostname (for example `localhost:8082`).
- `SXCHNGE_API_PROTOCOL`: `http` locally, `https` in deployment.
- `SXCHNGE_API_ENDPOINT`: `/api/v1`.
The runtime starts against an empty SXCHNGE database and creates its indexes.
No organization, role, policy or seed is required.
Run `make run-backend` from the repository root. The copied CLI accepts
`-config.file`, `-version` and `-debug`. Configure exact browser origins in YAML;
secure refresh cookies require HTTPS for browser session testing.
The runtime mounts `/api/v1/health` and the copied account login, API login,
refresh, rotation and logout handlers. Customer/client records must exist in the
local database. The account service creates customers and activation tokens
atomically, and deletes customers with session revocation. It is initialized locally; signup/profile and
verification-delivery/completion routes are the next wiring work. This is a
bootstrap, not a finished authentication deployment. No Sendico calls are made.
## Validate
Run `make test` and `make lint-backend`. Backend tests include real MongoDB
integration tests through Testcontainers, so Docker must be running.
`make test-backend` runs the backend suite with the race detector.
Architecture checks reject private Sendico imports/transports and ad hoc error
constructors. The frontend still uses dummy services; no Flutter source changed.
Copied source remains locally owned. See [provenance](PROVENANCE.md), the
[architecture/API plan](../docs/architecture/bff.md) and the
[delivery record](../docs/implementation.md).
-21
View File
@@ -1,21 +0,0 @@
// Adapted from Sendico api/edge/product/main.go; see PROVENANCE.md.
package main
import (
"git.sendico.io/tech/sxchnge/bff/edge/shared/appversion"
"git.sendico.io/tech/sxchnge/bff/edge/shared/server"
"git.sendico.io/tech/sxchnge/bff/internal/profile"
"git.sendico.io/tech/sxchnge/bff/pkg/mlogger"
application "git.sendico.io/tech/sxchnge/bff/pkg/server"
smain "git.sendico.io/tech/sxchnge/bff/pkg/server/main"
"os"
)
func factory(logger mlogger.Logger, file string, debug bool) (application.Application, error) {
return server.Create(logger, file, debug, profile.Runtime())
}
func main() {
if smain.RunServer("sxchnge.bff", appversion.Create(), factory) != nil {
os.Exit(1)
}
}
-129
View File
@@ -1,129 +0,0 @@
openapi: 3.1.0
info:
title: Sendico API Contract
version: 4.2.37
summary: Minimal client contract for authenticated BFF flows.
description: |
OpenAPI 3.1 contract focused on authenticated client flows exposed by the BFF:
authentication, verification, recipients, payment methods, payments, wallets,
and ledger account history.
servers:
- url: /api/v1
description: Main HTTP API base path
tags:
- name: Auth
description: Authentication and token lifecycle
- name: Accounts
description: Account auth responses used by login/verification
- name: Verification
description: Pending-account code verification
- name: Organizations
description: Organization selection for payment operations
- name: Recipients
description: Recipient CRUD and archive flows
- name: Payment Methods
description: Payment method CRUD and archive flows
- name: Callbacks
description: Webhook callback subscription CRUD and signing material rotation for HMAC and detached-JWS callbacks
- name: Payments
description: Quotation and payment orchestration
- name: Wallets
description: Managed wallet metadata and balances
- name: Ledger Accounts
description: Ledger account balances and account-history operations
paths:
/accounts/login:
$ref: ./api/accounts/auth_login.yaml
/accounts/login/api:
$ref: ./api/accounts/auth_login_api.yaml
/accounts/rotate:
$ref: ./api/accounts/auth_rotate.yaml
/accounts/refresh:
$ref: ./api/accounts/auth_refresh.yaml
/verification:
$ref: ./api/verification/create.yaml
/verification/resend:
$ref: ./api/verification/resend.yaml
/verification/verify:
$ref: ./api/verification/verify.yaml
/organizations:
$ref: ./api/organizations/root.yaml
/organizations/{org_ref}:
$ref: ./api/organizations/get.yaml
/recipients/list/{org_ref}/{organizations_ref}:
$ref: ./api/recipients/list.yaml
/recipients/{org_ref}:
$ref: ./api/recipients/create.yaml
/recipients/{recipients_ref}:
$ref: ./api/recipients/object.yaml
/recipients:
$ref: ./api/recipients/update.yaml
/recipients/archive/{org_ref}/{recipients_ref}:
$ref: ./api/recipients/archive.yaml
/payment_methods/accounts/{organizations_ref}/{accounts_ref}:
$ref: ./api/payment_methods/accounts.yaml
/payment_methods/recipients/{organizations_ref}/{recipients_ref}:
$ref: ./api/payment_methods/recipients.yaml
/payment_methods/{organizations_ref}/{payment_methods_ref}:
$ref: ./api/payment_methods/object.yaml
/payment_methods/archive/{organizations_ref}/{payment_methods_ref}:
$ref: ./api/payment_methods/archive.yaml
/callbacks/list/{org_ref}/{organizations_ref}:
$ref: ./api/callbacks/list.yaml
/callbacks/{org_ref}:
$ref: ./api/callbacks/create.yaml
/callbacks/{callbacks_ref}:
$ref: ./api/callbacks/object.yaml
/callbacks:
$ref: ./api/callbacks/update.yaml
/callbacks/archive/{org_ref}/{callbacks_ref}:
$ref: ./api/callbacks/archive.yaml
/callbacks/rotate-secret/{callbacks_ref}:
$ref: ./api/callbacks/rotate_secret.yaml
/payments/quote/{organizations_ref}:
$ref: ./api/payments/quote.yaml
/payments/multiquote/{organizations_ref}:
$ref: ./api/payments/multiquote.yaml
/payments/immediate/{organizations_ref}:
$ref: ./api/payments/immediate.yaml
/payments/by-quote/{organizations_ref}:
$ref: ./api/payments/by_quote.yaml
/payments/by-multiquote/{organizations_ref}:
$ref: ./api/payments/by_multiquote.yaml
/payments/by-ref/{payments_ref}:
$ref: ./api/payments/object.yaml
/payments/{organizations_ref}:
$ref: ./api/payments/list.yaml
/payments/documents/certificate/{organizations_ref}:
$ref: ./api/payments/documents_certificate.yaml
/payments/registry/{organizations_ref}:
$ref: ./api/payments/registry.yaml
/payments/registry/refresh/{organizations_ref}:
$ref: ./api/payments/registry_refresh.yaml
/payments/fx/currencies/{organizations_ref}:
$ref: ./api/payments/fx_currencies.yaml
/payments/fx/directions/{organizations_ref}:
$ref: ./api/payments/fx_directions.yaml
/chain_wallets/{organizations_ref}/assets:
$ref: ./api/wallets/assets.yaml
/ledger_accounts/{organizations_ref}/{ledger_account_ref}/balance:
$ref: ./api/ledger_accounts/balance.yaml
/ledger_accounts/{organizations_ref}/{ledger_account_ref}/operations:
$ref: ./api/ledger_accounts/operations.yaml
/ledger_accounts/{organizations_ref}/{ledger_account_ref}/operations/{entry_ref}:
$ref: ./api/ledger_accounts/operation.yaml
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
@@ -1,29 +0,0 @@
post:
tags: [Accounts, Auth]
summary: Login using email/password and receive pending verification token
description: |
Validates account credentials and returns a short-lived `pendingToken`.
This endpoint does not return final access/refresh tokens; complete verification flow via `/verification/verify`.
operationId: accountsLogin
requestBody:
$ref: ./bodies/auth.yaml#/components/requestBodies/LoginBody
responses:
'202':
description: Pending verification token issued
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/auth.yaml#/components/schemas/PendingLoginData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,30 +0,0 @@
post:
tags: [Accounts, Auth]
summary: API login using email/password and client credentials
description: |
Validates account credentials and eligible API client credentials, then returns final auth payload.
This endpoint bypasses login OTP/2FA and is intended only for approved API clients.
If the client definition includes `allowedCIDRs`, request source IP must match one of those CIDRs.
operationId: accountsApiLogin
requestBody:
$ref: ./bodies/auth.yaml#/components/requestBodies/ApiLoginBody
responses:
'200':
description: Login successful
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/auth.yaml#/components/schemas/LoginData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,31 +0,0 @@
post:
tags: [Accounts, Auth]
summary: Refresh access token by refresh token
description: |
Validates refresh token + session identifiers and issues a new access token.
Use this endpoint when refresh token stays the same.
operationId: accountsRefreshAccessToken
requestBody:
$ref: ./bodies/auth.yaml#/components/requestBodies/RefreshTokenBody
responses:
'200':
description: Access token refreshed
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/auth.yaml#/components/schemas/AccountAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,31 +0,0 @@
post:
tags: [Accounts, Auth]
summary: Rotate refresh token and issue new access/refresh tokens
description: |
Validates refresh token + session identifiers and returns a new token pair.
Use this endpoint when replacing both access and refresh tokens.
operationId: accountsRotateRefreshToken
requestBody:
$ref: ./bodies/auth.yaml#/components/requestBodies/RefreshTokenBody
responses:
'200':
description: New token pair issued
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/auth.yaml#/components/schemas/LoginData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,24 +0,0 @@
components:
requestBodies:
LoginBody:
description: JSON credentials payload for standard login.
required: true
content:
application/json:
schema:
$ref: ../request/auth.yaml#/components/schemas/LoginRequest
ApiLoginBody:
description: JSON credentials payload for API client login.
required: true
content:
application/json:
schema:
$ref: ../request/auth.yaml#/components/schemas/ApiLoginRequest
RefreshTokenBody:
description: JSON payload containing session and refresh token data.
required: true
content:
application/json:
schema:
$ref: ../request/auth.yaml#/components/schemas/RefreshTokenRequest
@@ -1,34 +0,0 @@
components:
schemas:
LoginRequest:
type: object
additionalProperties: false
required:
- login
properties:
clientId:
type: string
description: Client identifier bound to refresh token lifecycle and client policy checks.
deviceId:
type: string
description: Device/server identifier associated with the client session.
login:
$ref: ../../../models/auth/login_data.yaml#/components/schemas/LoginData
ApiLoginRequest:
allOf:
- $ref: ./auth.yaml#/components/schemas/LoginRequest
- type: object
additionalProperties: false
required:
- clientId
- deviceId
- clientSecret
properties:
clientSecret:
type: string
format: password
description: Client secret for `client_secret_post` authentication.
RefreshTokenRequest:
$ref: ../../../models/auth/client_refresh_token.yaml#/components/schemas/ClientRefreshToken
@@ -1,62 +0,0 @@
components:
schemas:
AccountAuthData:
description: Authentication response containing account profile and access token.
type: object
additionalProperties: false
required:
- accessToken
- account
properties:
accessToken:
description: Access token used for authenticated requests.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
account:
description: Authenticated account data.
$ref: ../../../models/account/account.yaml#/components/schemas/AccountData
LoginData:
description: Full login response including access and refresh tokens.
type: object
additionalProperties: false
required:
- accessToken
- account
- refreshToken
properties:
accessToken:
description: Access token used for authenticated requests.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
account:
description: Authenticated account data.
$ref: ../../../models/account/account.yaml#/components/schemas/AccountData
refreshToken:
description: Refresh token used to obtain a new access token.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
PendingLoginData:
description: Pending login response requiring additional verification.
type: object
additionalProperties: false
required:
- account
- pendingToken
- target
properties:
account:
description: Interim authentication payload prepared for verification completion.
type: object
additionalProperties: false
properties:
accessToken:
description: Temporary access token issued before verification is completed.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
account:
description: Account data associated with the pending login flow.
$ref: ../../../models/account/account.yaml#/components/schemas/AccountData
pendingToken:
description: Token proving the pending verification session.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
target:
description: Verification target destination (for example email or phone).
type: string
@@ -1,37 +0,0 @@
get:
tags: [Callbacks]
summary: Archive/unarchive callback subscription
description: Sets callback archive state by `callbacks_ref` and required `archived` query parameter.
operationId: callbacksArchive
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/callbacks_ref.yaml#/components/parameters/CallbacksRef
- name: archived
in: query
required: true
description: Target archive value to set on the callback.
schema:
type: boolean
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Archive state updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,17 +0,0 @@
components:
requestBodies:
CallbackCreateBody:
description: JSON body containing callback endpoint configuration for create.
required: true
content:
application/json:
schema:
$ref: ../request/callback.yaml#/components/schemas/CallbackCreateRequest
CallbackUpdateBody:
description: JSON body containing callback endpoint configuration for update.
required: true
content:
application/json:
schema:
$ref: ../request/callback.yaml#/components/schemas/CallbackUpdateRequest
@@ -1,33 +0,0 @@
post:
tags: [Callbacks]
summary: Create callback subscription
description: Creates callback subscription for the organization identified by `org_ref`.
operationId: callbacksCreate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
requestBody:
$ref: ./bodies/callback.yaml#/components/requestBodies/CallbackCreateBody
responses:
'201':
description: Callback created
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,35 +0,0 @@
get:
tags: [Callbacks]
summary: List callback subscriptions
description: |
Lists callbacks for the given organization context.
The route currently includes both `org_ref` and `organizations_ref`; the handler resolves organization context from `org_ref` and ignores `organizations_ref`.
operationId: callbacksList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
responses:
'200':
description: Callback list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,64 +0,0 @@
get:
tags: [Callbacks]
summary: Get callback subscription
description: Returns callback subscription by `callbacks_ref`.
operationId: callbacksGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/callbacks_ref.yaml#/components/parameters/CallbacksRef
responses:
'200':
description: Callback data
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
delete:
tags: [Callbacks]
summary: Delete callback subscription
description: Deletes callback by reference.
operationId: callbacksDelete
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/callbacks_ref.yaml#/components/parameters/CallbacksRef
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Callback deleted
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,113 +0,0 @@
components:
schemas:
CallbackBackoffInput:
description: Optional retry backoff overrides. Non-positive values currently fall back to server defaults.
type: object
additionalProperties: false
properties:
minDelayMs:
type: integer
maxDelayMs:
type: integer
CallbackRetryPolicyInput:
description: Optional retry and signing overrides. Omitted or non-positive numeric values currently fall back to server defaults.
type: object
additionalProperties: false
properties:
backoff:
$ref: '#/components/schemas/CallbackBackoffInput'
signingMode:
description: |
Optional signing mode. Canonical values are documented here; current handler also accepts legacy aliases such as `hmac`, `hmac-sha256`, `jws-eddsa-ed25519`, `jws+eddsa-ed25519`, `jws_eddsa`, and `eddsa_ed25519`.
type: string
enum:
- none
- hmac_sha256
- jws_eddsa_ed25519
headers:
type: object
additionalProperties:
type: string
maxAttempts:
type: integer
requestTimeoutMs:
type: integer
CallbackCreateRequest:
description: |
Request payload used to create a callback configuration.
Only `url` is hard-required by current create logic. Other mutable fields are optional and defaulted by the handler when omitted.
type: object
additionalProperties: false
required:
- url
properties:
name:
description: Optional callback display name. When omitted, the handler defaults it to `url`.
type: string
description:
description: Optional callback description.
type: string
nullable: true
status:
description: |
Optional callback status. Canonical values are documented here; current handler also accepts `enabled` and `inactive` aliases.
type: string
enum:
- active
- disabled
url:
description: Absolute HTTPS callback endpoint URL.
type: string
format: uri
eventTypes:
description: Optional callback event types. When omitted or empty, the handler defaults this list.
type: array
items:
type: string
retryPolicy:
$ref: '#/components/schemas/CallbackRetryPolicyInput'
CallbackUpdateRequest:
description: |
Request payload used to update a callback configuration.
The current PUT handler requires `id`, `organizationRef`, and `url`. Other mutable fields are optional, but omitted values may be reset to handler defaults during normalization.
type: object
additionalProperties: false
required:
- id
- organizationRef
- url
properties:
id:
description: Callback identifier to update.
$ref: ../../../models/objectid.yaml#/components/schemas/ObjectId
organizationRef:
description: Organization identifier carried in the stored callback record and currently required by the update path.
$ref: ../../../models/objectid.yaml#/components/schemas/ObjectId
name:
description: Optional callback display name. When omitted, the handler defaults it to `url`.
type: string
description:
description: Optional callback description.
type: string
nullable: true
status:
description: |
Optional callback status. Canonical values are documented here; current handler also accepts `enabled` and `inactive` aliases.
type: string
enum:
- active
- disabled
url:
description: Absolute HTTPS callback endpoint URL.
type: string
format: uri
eventTypes:
description: Optional callback event types. When omitted or empty, the handler defaults this list.
type: array
items:
type: string
retryPolicy:
$ref: '#/components/schemas/CallbackRetryPolicyInput'
@@ -1,22 +0,0 @@
components:
schemas:
CallbacksAuthData:
description: Authenticated response payload containing callback configurations.
type: object
additionalProperties: false
required:
- accessToken
- callbacks
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
callbacks:
description: Collection of callbacks configured for the authenticated scope. JWS-signed callbacks expose read-only verification JWKs via `callbacks[].signingKeys`.
type: array
items:
$ref: ../../../models/callback/callback.yaml#/components/schemas/Callback
generatedSigningSecret:
description: Newly generated signing secret when HMAC signing material is created or rotated. JWS-signed callbacks do not populate this field.
type: string
nullable: true
@@ -1,31 +0,0 @@
post:
tags: [Callbacks]
summary: Rotate callback signing material
description: Rotates the active signing material for the callback. HMAC callbacks generate and return a new shared secret once. `jws_eddsa_ed25519` callbacks generate a new Ed25519 keypair, expose the new active verification JWK on normal callback reads, and keep retiring verification keys visible for 24 hours.
operationId: callbacksRotateSecret
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/callbacks_ref.yaml#/components/parameters/CallbacksRef
responses:
'200':
description: Callback signing material rotated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,31 +0,0 @@
put:
tags: [Callbacks]
summary: Update callback subscription
description: Updates callback subscription fields. The current handler requires `id`, `organizationRef`, and `url`; omitted mutable fields may be reset to defaults.
operationId: callbacksUpdate
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/callback.yaml#/components/requestBodies/CallbackUpdateBody
responses:
'200':
description: Callback updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/callback.yaml#/components/schemas/CallbacksAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,58 +0,0 @@
get:
tags: [Ledger Accounts]
summary: Get ledger account balance
description: |
Returns the canonical balance for the requested ledger account.
Without `as_of`, the response is the current materialized balance and includes
current metadata fields `version` and `lastUpdated`.
With `as_of`, the response is an event-time accounting balance reconstructed
from posted statement-entry deltas where `eventTime <= as_of`. Entries exactly
equal to `as_of` are included. This is not a historical snapshot of materialized
balance state and not "what the system knew" at that clock time. Late or
backdated postings with older `eventTime` can change historical responses for
the same `as_of`. Historical responses include `ledgerAccountRef`, `balance`,
and canonical UTC `asOf`, and omit `version` and `lastUpdated` because no
historical snapshot/version semantics are defined.
Historical balance is valid only if every account-affecting committed posting
writes matching statement entries in the same transaction as balance updates.
operationId: ledgerAccountBalanceGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- name: as_of
in: query
required: false
description: |
Optional RFC3339 event-time cutoff for historical balance reconstruction.
Timezone offsets are accepted and returned as canonical UTC `asOf`.
schema:
type: string
format: date-time
example: '2026-04-23T14:30:00+02:00'
responses:
'200':
description: Ledger account balance
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/balance.yaml#/components/schemas/LedgerAccountBalanceData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,36 +0,0 @@
get:
tags: [Ledger Accounts]
summary: Get ledger account operation detail
description: |
Returns the account-history projection for `entry_ref` within the requested ledger account.
This is not a general journal-entry read API.
The endpoint returns `404` when the entry is not part of the requested account's visible history.
operationId: ledgerAccountOperationsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- $ref: ../parameters/entry_ref.yaml#/components/parameters/EntryRef
responses:
'200':
description: Ledger account operation detail
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/operation.yaml#/components/schemas/LedgerAccountOperationData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,36 +0,0 @@
get:
tags: [Ledger Accounts]
summary: List ledger account operations
description: |
Returns account-history summary projections for the requested ledger account.
Public HTTP pagination supports only `limit` and `offset`.
Results are ordered by `version` descending and `entry_ref` descending.
Unsupported query parameters, including `archived`, are rejected.
operationId: ledgerAccountOperationsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/ledger_account_ref.yaml#/components/parameters/LedgerAccountRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
responses:
'200':
description: Ledger account operation summaries
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/operation.yaml#/components/schemas/LedgerAccountOperationsData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,15 +0,0 @@
components:
schemas:
LedgerAccountBalanceData:
description: Response payload containing a ledger account balance.
type: object
additionalProperties: false
required:
- accessToken
- balance
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
balance:
$ref: ../../../models/ledger/balance.yaml#/components/schemas/LedgerAccountBalance
@@ -1,33 +0,0 @@
components:
schemas:
LedgerAccountOperationsData:
description: Response payload containing ledger account history summaries.
type: object
additionalProperties: false
required:
- accessToken
- operations
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
operations:
description: Account-history summaries ordered by `version DESC, entryRef DESC`.
type: array
items:
$ref: ../../../models/ledger/operation.yaml#/components/schemas/LedgerAccountOperationSummary
LedgerAccountOperationData:
description: Response payload containing a single ledger account history projection.
type: object
additionalProperties: false
required:
- accessToken
- operation
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
operation:
description: Account-history projection for the requested entry and ledger account.
$ref: ../../../models/ledger/operation.yaml#/components/schemas/LedgerAccountOperation
@@ -1,29 +0,0 @@
get:
tags: [Organizations]
summary: Get organization by reference
description: Fetches a single organization available to the authenticated account.
operationId: organizationsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
responses:
'200':
description: Organization details
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/organization.yaml#/components/schemas/OrganizationsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,18 +0,0 @@
components:
schemas:
OrganizationsAuthData:
description: Authenticated response payload containing organizations.
type: object
additionalProperties: false
required:
- accessToken
- organizations
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
organizations:
description: Collection of organizations available to the authenticated account.
type: array
items:
$ref: ../../../models/organization/organization.yaml#/components/schemas/Organization
@@ -1,27 +0,0 @@
get:
tags: [Organizations]
summary: List organizations of current account
description: Returns organizations the authenticated account can access.
operationId: organizationsList
security:
- bearerAuth: []
responses:
'200':
description: Organizations list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/organization.yaml#/components/schemas/OrganizationsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,9 +0,0 @@
components:
parameters:
AccountsRef:
name: accounts_ref
in: path
required: true
description: Account reference, 24 hex chars.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,9 +0,0 @@
components:
parameters:
Archived:
name: archived
in: query
required: false
description: Filter by archive flag. `true` returns archived records, `false` returns active records.
schema:
type: boolean
@@ -1,9 +0,0 @@
components:
parameters:
CallbacksRef:
name: callbacks_ref
in: path
required: true
description: Callback subscription reference, 24 hex chars.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,9 +0,0 @@
components:
parameters:
Cascade:
name: cascade
in: query
required: false
description: If `true`, apply operation to dependent objects where cascade is supported.
schema:
type: boolean
@@ -1,9 +0,0 @@
components:
parameters:
Cursor:
name: cursor
in: query
required: false
description: Opaque cursor from a previous page response (`page.next_cursor`).
schema:
type: string
@@ -1,9 +0,0 @@
components:
parameters:
EntryRef:
name: entry_ref
in: path
required: true
description: Statement entry reference within the requested ledger account history.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,11 +0,0 @@
components:
parameters:
FilterStates:
name: filter_states
in: query
required: false
description: |
Additional payment state filter. Accepts one value or comma-separated values.
Same semantics as `state`/`states`.
schema:
type: string
@@ -1,9 +0,0 @@
components:
parameters:
LedgerAccountRef:
name: ledger_account_ref
in: path
required: true
description: Ledger account reference that scopes the account-history read.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,11 +0,0 @@
components:
parameters:
Limit:
name: limit
in: query
description: Max number of items to return. Parsed as non-negative int64.
required: false
schema:
type: integer
format: int64
minimum: 0
@@ -1,11 +0,0 @@
components:
parameters:
Offset:
name: offset
in: query
description: Number of items to skip. Parsed as non-negative int64.
required: false
schema:
type: integer
format: int64
minimum: 0
@@ -1,9 +0,0 @@
components:
parameters:
OrgRef:
name: org_ref
in: path
required: true
description: Organization reference in BFF route format, 24 hex chars.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,9 +0,0 @@
components:
parameters:
OrganizationsRef:
name: organizations_ref
in: path
required: true
description: Organization reference used by payments/payment-methods/recipients routes.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,9 +0,0 @@
components:
parameters:
Payment MethodsRef:
name: payment_methods_ref
in: path
required: true
description: Payment method reference, 24 hex chars.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,10 +0,0 @@
components:
parameters:
PaymentsRef:
name: payments_ref
in: path
required: true
description: Stable payment reference.
schema:
type: string
minLength: 1
@@ -1,9 +0,0 @@
components:
parameters:
RecipientsRef:
name: recipients_ref
in: path
required: true
description: Recipient reference, 24 hex chars.
schema:
$ref: ../../models/objectid.yaml#/components/schemas/ObjectId
@@ -1,11 +0,0 @@
components:
parameters:
State:
name: state
in: query
required: false
description: |
Payment state filter. Accepts aliases like `accepted`, `settled`, `failed`
or canonical values like `orchestration_state_created`.
schema:
type: string
@@ -1,10 +0,0 @@
components:
parameters:
States:
name: states
in: query
required: false
description: |
Multi-state filter. Provide a comma-separated list with same accepted values as `state`.
schema:
type: string
@@ -1,74 +0,0 @@
get:
tags: [Payment Methods]
summary: List account-owned payment methods
description: |
Returns payment methods owned by `accounts_ref` within `organizations_ref`.
Supports offset pagination and optional archive filtering.
operationId: paymentMethodsListAccountOwned
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/accounts_ref.yaml#/components/parameters/AccountsRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
responses:
'200':
description: Payment methods list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
post:
tags: [Payment Methods]
summary: Create account-owned payment method
description: Creates a payment method owned by `accounts_ref` inside `organizations_ref`.
operationId: paymentMethodsCreateAccountOwned
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/accounts_ref.yaml#/components/parameters/AccountsRef
requestBody:
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodCreateBody
responses:
'201':
description: Payment method created
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,36 +0,0 @@
post:
tags: [Payment Methods]
summary: Archive/unarchive payment method
description: Sets payment method archive state by `payment_methods_ref` and required `archived` query parameter.
operationId: paymentMethodsArchive
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
- name: archived
in: query
required: true
description: Target archive value to set on the payment method.
schema:
type: boolean
responses:
'200':
description: Archive state updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,17 +0,0 @@
components:
requestBodies:
PaymentMethodCreateBody:
description: JSON body containing a payment method definition for create.
required: true
content:
application/json:
schema:
$ref: ../request/payment_method.yaml#/components/schemas/PaymentMethodCreateRequest
PaymentMethodUpdateBody:
description: JSON body containing a payment method definition for update.
required: true
content:
application/json:
schema:
$ref: ../request/payment_method.yaml#/components/schemas/PaymentMethodUpdateRequest
@@ -1,102 +0,0 @@
get:
tags: [Payment Methods]
summary: Get payment method
description: Returns payment method by `payment_methods_ref` inside `organizations_ref`.
operationId: paymentMethodsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
responses:
'200':
description: Payment method data
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
patch:
tags: [Payment Methods]
summary: Update payment method
description: Updates mutable payment method fields for the record identified by `payment_methods_ref` inside `organizations_ref`.
operationId: paymentMethodsUpdate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
requestBody:
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodUpdateBody
responses:
'200':
description: Payment method updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
delete:
tags: [Payment Methods]
summary: Delete payment method
description: Deletes payment method by reference.
operationId: paymentMethodsDelete
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/payment_methods_ref.yaml#/components/parameters/Payment MethodsRef
responses:
'200':
description: Payment method deleted
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,74 +0,0 @@
get:
tags: [Payment Methods]
summary: List recipient-owned payment methods
description: |
Returns payment methods owned by `recipients_ref` within `organizations_ref`.
Supports offset pagination and optional archive filtering.
operationId: paymentMethodsListRecipientOwned
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
responses:
'200':
description: Payment methods list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
post:
tags: [Payment Methods]
summary: Create recipient-owned payment method
description: Creates a payment method owned by `recipients_ref` inside `organizations_ref`.
operationId: paymentMethodsCreateRecipientOwned
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
requestBody:
$ref: ./bodies/payment_method.yaml#/components/requestBodies/PaymentMethodCreateBody
responses:
'201':
description: Payment method created
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment_method.yaml#/components/schemas/Payment MethodsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,42 +0,0 @@
components:
schemas:
PaymentMethodBaseRequest:
type: object
additionalProperties: false
properties:
name:
description: Optional human-readable payment method name.
type: string
description:
description: Optional free-form payment method description.
type: string
nullable: true
type:
description: Payment method type discriminator.
$ref: ../../../external/payment_method_type.yaml#/components/schemas/PaymentMethodType
data:
description: |
Optional payment-method-type-specific payload.
For `type: bankAccount`, this uses the Russian bank-account
destination shape documented as `BankAccountEndpoint`.
type: object
additionalProperties: true
isMain:
description: Optional primary-method flag. When omitted, current handler behavior falls back to `false`.
type: boolean
PaymentMethodCreateRequest:
description: |
Request payload used to create a payment method.
Ownership comes from the route path. The body only carries mutable payment-method fields.
required:
- type
allOf:
- $ref: '#/components/schemas/PaymentMethodBaseRequest'
PaymentMethodUpdateRequest:
description: |
Request payload used to update a payment method.
This is a PATCH contract. Only `name`, `description`, `data`, and `isMain` are mutable.
allOf:
- $ref: '#/components/schemas/PaymentMethodBaseRequest'
@@ -1,18 +0,0 @@
components:
schemas:
Payment MethodsAuthData:
description: Authenticated response payload containing payment methods.
type: object
additionalProperties: false
required:
- accessToken
- payment_methods
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
payment_methods:
description: Collection of payment methods available to the authenticated account.
type: array
items:
$ref: ../../../models/payment_method/payment_method.yaml#/components/schemas/PaymentMethod
@@ -1,33 +0,0 @@
components:
requestBodies:
QuotePaymentBody:
description: JSON payload used to request a quote for one payment intent.
required: true
content:
application/json:
schema:
$ref: ../request/payment.yaml#/components/schemas/QuotePaymentRequest
QuotePaymentsBody:
description: JSON payload used to request quotes for multiple payment intents.
required: true
content:
application/json:
schema:
$ref: ../request/payment.yaml#/components/schemas/QuotePaymentsRequest
InitiatePaymentBody:
description: JSON payload used to initiate a single payment.
required: true
content:
application/json:
schema:
$ref: ../request/payment.yaml#/components/schemas/InitiatePaymentRequest
InitiatePaymentsBody:
description: JSON payload used to initiate multiple payments from a quote reference.
required: true
content:
application/json:
schema:
$ref: ../request/payment.yaml#/components/schemas/InitiatePaymentsRequest
@@ -1,37 +0,0 @@
post:
tags: [Payments]
summary: Initiate payment batch by quote reference
description: |
Executes batch payment from a previously created multi-quote reference. If any quoted item
uses a raw `card` destination, that item's original quote must already include `exp_month`
and `exp_year`. Card-recipient AML screening occurs during execution, not quotation. An
unchanged payment item reuses its persisted compliance decision on idempotent execution
replay, avoiding a duplicate AML call. A definitive denial terminates that payment with
public `failureCode: failure_restriction` and `failureReason: aml_denied`.
operationId: paymentsInitiateBatchByQuote
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
requestBody:
$ref: ./bodies/payment.yaml#/components/requestBodies/InitiatePaymentsBody
responses:
'200':
description: Payment batch initiated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentsData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,41 +0,0 @@
post:
tags: [Payments]
summary: Initiate payment using quote reference
description: |
Executes one payment from an existing quote reference. If the quoted destination is raw
`card`, the original quote must already include `exp_month` and `exp_year`. Card-recipient
AML screening occurs during execution, not quotation. An unchanged payment reuses its
persisted compliance decision on idempotent execution replay, avoiding a duplicate AML call.
A definitive denial terminates the payment with public `failureCode: failure_restriction`
and `failureReason: aml_denied`.
operationId: paymentsInitiateByQuote
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
requestBody:
required: true
content:
application/json:
schema:
$ref: ./request/payment.yaml#/components/schemas/InitiatePaymentByQuoteRequest
responses:
'200':
description: Payment initiated by quote
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,47 +0,0 @@
get:
tags: [Payments]
summary: Download payment certificate
description: |
Returns a generated payment certificate as binary content.
The payment must be settled; the BFF resolves certificate details from the payment reference.
operationId: paymentsGetPaymentCertificate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- name: payment_ref
in: query
required: true
description: Settled payment reference used to generate the payment certificate.
schema:
type: string
responses:
'200':
description: Payment certificate file
content:
application/pdf:
schema:
type: string
format: binary
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
'503':
description: Upstream service unavailable
content:
application/json:
schema:
$ref: ../response/response.yaml#/components/schemas/ErrorResponse
@@ -1,40 +0,0 @@
get:
tags: [Payments]
summary: List available FX currencies
description: |
Returns the BFF startup-cached Treasury Currency Catalog projection for
client-visible FX currencies. `decimals`, `scale`, and `displayScale` are
presentation fields backed by Treasury `display_scale`.
`accountingScaleCandidate` is informational only and must not be used by
clients to determine executable payout precision, quote precision, or
guaranteed provider support.
The endpoint is authenticated and authorized by `organizations_ref`, but the
returned catalogue is global rather than organization-customized. If Treasury
was unavailable at BFF startup while this endpoint was enabled, BFF fails
startup; if Treasury becomes unavailable after startup, BFF continues serving
the cached catalog revision.
operationId: paymentsFXCurrencies
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
responses:
'200':
description: FX currency catalogue projected from Treasury
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/FXCurrenciesData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'503':
$ref: ../response/operation.yaml#/components/responses/ServiceUnavailable
@@ -1,48 +0,0 @@
get:
tags: [Payments]
summary: List available FX directions
description: |
Returns organization-level FX direction availability.
A returned direction means the organization has at least one eligible
direction-level route. It does not mean that every quote or payment for this
direction will be accepted. The actual route, gateway, limits, pricing, fees,
asset domain, and settlement details are resolved during quotation/payment
execution.
If dependencies are healthy but no organization-eligible executable
directions match oracle quoteable pair sides, the response contains an empty
`directions` array. Oracle or gateway/route registry dependency failures are
returned as errors and are not converted to oracle-only or empty successful
responses.
operationId: paymentsFXDirections
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
responses:
'200':
description: Organization-level directed FX availability
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/FXDirectionsData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'412':
description: Dependency precondition failed
content:
application/json:
schema:
$ref: ../response/response.yaml#/components/schemas/ErrorResponse
'503':
$ref: ../response/operation.yaml#/components/responses/ServiceUnavailable
@@ -1,48 +0,0 @@
post:
tags: [Payments]
summary: Initiate payment from immediate intent
description: |
Creates quote and executes a single payment in one call (request must include `intent`). For
raw `card` destinations, execution requires `exp_month` and `exp_year`; `cardToken`
destinations only require `token`. Card-recipient AML screening occurs during execution.
An unchanged payment reuses its persisted compliance decision on idempotent execution replay,
avoiding a duplicate AML call. A definitive denial terminates the payment with public
`failureCode: failure_restriction` and `failureReason: aml_denied`.
operationId: paymentsInitiateImmediate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: ./request/payment.yaml#/components/schemas/InitiatePaymentRequest
- type: object
required:
- intent
not:
required:
- quoteRef
responses:
'200':
description: Payment initiated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,76 +0,0 @@
get:
tags: [Payments]
summary: List payments in organization
description: |
Returns organization payments with cursor pagination and optional filters.
State filters accept aliases (`accepted`, `settled`, `failed`, etc.) or canonical orchestration states.
operationId: paymentsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/cursor.yaml#/components/parameters/Cursor
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- name: quotation_ref
in: query
required: false
description: Filter by quotation reference used for execution.
schema:
type: string
- name: quote_ref
in: query
required: false
description: Alias of `quotation_ref`.
schema:
type: string
- name: created_from
in: query
required: false
description: Include payments created at or after this RFC3339 timestamp.
schema:
type: string
format: date-time
- name: createdFrom
in: query
required: false
description: Alias of `created_from`.
schema:
type: string
format: date-time
- name: created_to
in: query
required: false
description: Include payments created before this RFC3339 timestamp (must be after `created_from`).
schema:
type: string
format: date-time
- name: createdTo
in: query
required: false
description: Alias of `created_to`.
schema:
type: string
format: date-time
- $ref: ../parameters/state.yaml#/components/parameters/State
- $ref: ../parameters/states.yaml#/components/parameters/States
- $ref: ../parameters/filter_states.yaml#/components/parameters/FilterStates
responses:
'200':
description: Payments list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentsData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,37 +0,0 @@
post:
tags: [Payments]
summary: Quote multiple payment intents
description: |
Calculates a batch quote for multiple payment intents in one request. Each item includes
`executable`, `state`, and optional `blockReason` so callers can skip blocked items. Raw
`card` destinations can omit expiry while quoting, but quoted items intended for later
execution should include `exp_month` and `exp_year`. Card-recipient AML screening is not
performed during quotation; it runs during payment execution, so an executable quote does
not guarantee AML acceptance.
operationId: paymentsMultiQuote
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
requestBody:
$ref: ./bodies/payment.yaml#/components/requestBodies/QuotePaymentsBody
responses:
'200':
description: Quotes generated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentQuotesData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,31 +0,0 @@
get:
tags: [Payments]
summary: Get payment by reference
description: Returns a single payment by `payments_ref`.
operationId: paymentsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/payments_ref.yaml#/components/parameters/PaymentsRef
responses:
'200':
description: Payment data
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,37 +0,0 @@
post:
tags: [Payments]
summary: Quote single payment intent
description: |
Calculates quote for one payment intent without executing payment. The response includes
`quote.executable`, `quote.state`, and optional `quote.blockReason` so clients can reject
non-executable quotes before attempting execution. Raw `card` destinations can omit expiry
while quoting, but quotes intended for later execution should include `exp_month` and
`exp_year`. Card-recipient AML screening is not performed during quotation; it runs during
payment execution, so an executable quote does not guarantee AML acceptance.
operationId: paymentsQuote
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
requestBody:
$ref: ./bodies/payment.yaml#/components/requestBodies/QuotePaymentBody
responses:
'200':
description: Quote generated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/payment.yaml#/components/schemas/PaymentQuoteData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,30 +0,0 @@
get:
tags: [Payments]
summary: Get discovery registry snapshot for payments dependencies
description: Returns the latest discovery lookup payload used by payments integrations.
operationId: paymentsRegistryList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
responses:
'200':
description: Discovery registry payload
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
type: object
additionalProperties: true
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,32 +0,0 @@
get:
tags: [Payments]
summary: Get latest discovery refresh event for payments dependencies
description: Returns the latest refresh event consumed by the payments API.
operationId: paymentsRegistryRefreshGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
responses:
'200':
description: Discovery refresh payload
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
type:
- object
- 'null'
additionalProperties: true
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,163 +0,0 @@
components:
schemas:
PaymentBase:
description: Base fields shared by payment initiation request payloads.
type: object
additionalProperties: false
required:
- idempotencyKey
properties:
idempotencyKey:
description: Client-supplied key used to safely deduplicate requests.
type: string
metadata:
description: Optional request metadata forwarded through payment processing.
type: object
additionalProperties:
type: string
QuotePaymentRequest:
description: |
Request payload to quote a single payment intent.
For raw `card` destinations, quotation only requires `pan`.
If the quoted payment may later be executed, include `exp_month` and `exp_year` during quotation because execution reuses the quoted endpoint snapshot.
type: object
additionalProperties: false
required:
- intent
properties:
idempotencyKey:
description: Idempotency key used when persisting quote context.
type: string
metadata:
description: Optional metadata associated with the quote request.
type: object
additionalProperties:
type: string
clientPaymentRef:
description: Optional caller-side payment correlation reference to persist with the quote and reuse during execution when the execute request omits it.
type: string
intent:
description: Payment intent to be priced. See `PaymentIntent.destination` for raw-card quote versus execution requirements.
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
previewOnly:
description: If true, returns a preview quote without requiring idempotency.
type: boolean
allOf:
- if:
properties:
previewOnly:
const: true
required:
- previewOnly
then:
not:
required:
- idempotencyKey
else:
required:
- idempotencyKey
QuotePaymentsRequest:
description: |
Request payload to quote multiple payment intents in a single call.
For raw `card` destinations, quotation only requires `pan`.
If quoted items may later be executed, include `exp_month` and `exp_year` during quotation because execution reuses the quoted endpoint snapshot.
type: object
additionalProperties: false
required:
- intents
properties:
idempotencyKey:
description: Idempotency key used when persisting batch quote context.
type: string
metadata:
description: Optional metadata associated with the quote request.
type: object
additionalProperties:
type: string
clientPaymentRef:
description: Optional caller-side batch payment correlation reference to persist with the quote and reuse during execution when the execute request omits it.
type: string
intents:
description: List of payment intents to be priced. See each intent destination for raw-card quote versus execution requirements.
type: array
minItems: 1
items:
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
previewOnly:
description: If true, returns preview quotes without requiring idempotency.
type: boolean
allOf:
- if:
properties:
previewOnly:
const: true
required:
- previewOnly
then:
not:
required:
- idempotencyKey
else:
required:
- idempotencyKey
InitiatePaymentRequest:
description: |
Request payload to initiate a single payment.
When executing a raw `card` destination from inline `intent`, `pan`, `exp_month`, and `exp_year` must be present.
When executing a `cardToken` destination, only `token` is required by current logic.
allOf:
- $ref: ./payment.yaml#/components/schemas/PaymentBase
- type: object
additionalProperties: false
oneOf:
- required: [intent]
- required: [quoteRef]
properties:
intent:
description: Payment intent to execute directly. Raw `card` destinations require expiry at execution time.
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
quoteRef:
description: Reference to a previously generated quote to execute. If that quote contains a raw `card` destination, the original quote must already include `exp_month` and `exp_year`.
type: string
clientPaymentRef:
description: Optional caller-side payment correlation reference. When omitted, execution may reuse the value stored with the quote.
type: string
InitiatePaymentsRequest:
description: |
Request payload to initiate multiple payments from a multi-quote reference.
If any quoted item contains a raw `card` destination, that item's original quote must already include `exp_month` and `exp_year`.
allOf:
- $ref: ./payment.yaml#/components/schemas/PaymentBase
- type: object
additionalProperties: false
required:
- quoteRef
properties:
quoteRef:
description: Reference to a previously generated multi-quote. Raw-card items execute from the stored quoted endpoint snapshot.
type: string
clientPaymentRef:
description: Optional caller-side payment correlation reference. When omitted, execution may reuse the value stored with the quote.
type: string
InitiatePaymentByQuoteRequest:
description: |
Request payload to initiate one payment from an existing quote reference.
If the quote contains a raw `card` destination, the original quote must already include `exp_month` and `exp_year`.
allOf:
- $ref: ./payment.yaml#/components/schemas/PaymentBase
- type: object
additionalProperties: false
required:
- quoteRef
properties:
quoteRef:
description: Reference to a previously generated quote to execute. Execution reuses the stored quoted endpoint snapshot.
type: string
clientPaymentRef:
description: Optional caller-side payment correlation reference. When omitted, execution may reuse the value stored with the quote.
type: string
@@ -1,114 +0,0 @@
components:
schemas:
PaymentQuoteData:
description: Response payload for a single payment quote.
type: object
additionalProperties: false
required:
- accessToken
- quote
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
idempotencyKey:
description: Idempotency key associated with the quote response.
type: string
clientPaymentRef:
description: Caller-supplied payment correlation reference echoed from the quote request, when provided.
type: string
quote:
description: Generated quote data for the requested payment intent.
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentQuote
PaymentQuotesData:
description: Response payload for a batch quote request.
type: object
additionalProperties: false
required:
- accessToken
- quote
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
quote:
description: Batch quote summary and quoted items.
type: object
additionalProperties: false
properties:
idempotencyKey:
description: Idempotency key associated with the batch quote response.
type: string
clientPaymentRef:
description: Caller-supplied payment correlation reference echoed from the batch quote request, when provided.
type: string
quoteRef:
description: Reference to the generated batch quote.
type: string
items:
description: Collection of quotes for each requested payment intent.
type: array
items:
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentQuote
PaymentsData:
description: Response payload containing a list of payments.
type: object
additionalProperties: false
required:
- accessToken
- payments
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
payments:
description: Collection of payment records.
type: array
items:
$ref: ../../../models/payment/payment.yaml#/components/schemas/Payment
page:
description: Pagination cursor metadata for payment listing endpoints.
$ref: ../../../models/common/pagination.yaml#/components/schemas/CursorPageResponse
PaymentData:
description: Response payload containing a single payment record.
type: object
additionalProperties: false
required:
- accessToken
- payment
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
payment:
description: Requested payment record.
$ref: ../../../models/payment/payment.yaml#/components/schemas/Payment
FXCurrenciesData:
description: Response payload containing the BFF startup-cached Treasury FX currency catalogue projection.
type: object
additionalProperties: false
required:
- currencies
properties:
currencies:
description: Client-visible currencies backed by Treasury Currency Catalog metadata.
type: array
items:
$ref: ../../../models/payment/fx_metadata.yaml#/components/schemas/FXCurrency
FXDirectionsData:
description: Response payload containing organization-level directed FX availability.
type: object
additionalProperties: false
required:
- directions
properties:
directions:
description: Directions with at least one eligible direction-level route for the organization.
type: array
items:
$ref: ../../../models/payment/fx_metadata.yaml#/components/schemas/FXDirection
@@ -1,37 +0,0 @@
get:
tags: [Recipients]
summary: Archive/unarchive recipient
description: Sets recipient archive state by `recipients_ref` and required `archived` query parameter.
operationId: recipientsArchive
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
- name: archived
in: query
required: true
description: Target archive value to set on the recipient.
schema:
type: boolean
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Archive state updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,17 +0,0 @@
components:
requestBodies:
RecipientCreateBody:
description: JSON body containing recipient details for create.
required: true
content:
application/json:
schema:
$ref: ../request/recipient.yaml#/components/schemas/RecipientCreateRequest
RecipientUpdateBody:
description: JSON body containing recipient details for update.
required: true
content:
application/json:
schema:
$ref: ../request/recipient.yaml#/components/schemas/RecipientUpdateRequest
@@ -1,33 +0,0 @@
post:
tags: [Recipients]
summary: Create recipient
description: Creates a recipient inside the organization identified by `org_ref`.
operationId: recipientsCreate
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
requestBody:
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientCreateBody
responses:
'201':
description: Recipient created
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,36 +0,0 @@
get:
tags: [Recipients]
summary: List recipients
description: |
Returns recipients for the specified organization context.
Supports offset pagination and optional archive filtering.
The route currently includes both `org_ref` and `organizations_ref`; the handler resolves organization context from `org_ref` and ignores `organizations_ref`.
operationId: recipientsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
responses:
'200':
description: Recipient list
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,64 +0,0 @@
get:
tags: [Recipients]
summary: Get recipient by reference
description: Returns a recipient by `recipients_ref`.
operationId: recipientsGet
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
responses:
'200':
description: Recipient data
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
delete:
tags: [Recipients]
summary: Delete recipient
description: Deletes recipient by reference. Use `cascade=true` to remove dependent objects when supported.
operationId: recipientsDelete
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
responses:
'200':
description: Recipient deleted
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,53 +0,0 @@
components:
schemas:
RecipientBaseRequest:
type: object
additionalProperties: false
properties:
id:
description: Optional recipient identifier. Required by the current update handler.
$ref: ../../../models/objectid.yaml#/components/schemas/ObjectId
name:
description: Optional human-readable recipient name.
type: string
description:
description: Optional free-form recipient description.
type: string
nullable: true
email:
description: Optional recipient email address.
type: string
format: email
avatarUrl:
description: Optional avatar URL.
type: string
nullable: true
status:
description: Optional recipient status. When omitted, current handler behavior falls back to the model zero value (`ready`).
type: string
enum:
- ready
- registered
- notRegistered
type:
description: Optional recipient type. When omitted, current handler behavior falls back to the model zero value (`internal`).
type: string
enum:
- internal
- external
RecipientCreateRequest:
description: |
Request payload used to create a recipient.
The current create handler does not require any JSON fields beyond a valid object payload; organization context comes from the `org_ref` path parameter.
allOf:
- $ref: '#/components/schemas/RecipientBaseRequest'
RecipientUpdateRequest:
description: |
Request payload used to update a recipient.
The current PUT handler targets the record by `id` and then replaces it with the submitted values; omitted fields may therefore be reset to zero values.
required:
- id
allOf:
- $ref: '#/components/schemas/RecipientBaseRequest'
@@ -1,18 +0,0 @@
components:
schemas:
RecipientsAuthData:
description: Authenticated response payload containing recipients.
type: object
additionalProperties: false
required:
- accessToken
- recipients
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
recipients:
description: Collection of recipients available to the authenticated account.
type: array
items:
$ref: ../../../models/recipient/recipient.yaml#/components/schemas/Recipient
@@ -1,31 +0,0 @@
put:
tags: [Recipients]
summary: Update recipient
description: Updates recipient fields from request payload. The current handler requires `id`; omitted fields may be replaced with zero values.
operationId: recipientsUpdate
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientUpdateBody
responses:
'200':
description: Recipient updated
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,24 +0,0 @@
components:
schemas:
ApiError:
description: Standard API error envelope with optional debugging details.
type: object
additionalProperties: false
required:
- code
- error
- source
properties:
code:
description: Application-specific numeric error code.
type: integer
format: int32
error:
description: Human-readable error summary.
type: string
source:
description: Component or subsystem that produced the error.
type: string
details:
description: Optional detailed message providing additional failure context.
type: string
@@ -1,85 +0,0 @@
components:
responses:
Ok:
description: Successful response
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/BaseResponse
Created:
description: Resource created
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/BaseResponse
Accepted:
description: Request accepted for processing
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/BaseResponse
BadRequest:
description: Bad request payload or query/path parameter
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
Gone:
description: Resource is no longer available
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
Conflict:
description: Conflict
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
TooManyRequests:
description: Too many requests
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
ServiceUnavailable:
description: Service unavailable
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
InternalServerError:
description: Internal server error
content:
application/json:
schema:
$ref: ./response.yaml#/components/schemas/ErrorResponse
@@ -1,47 +0,0 @@
components:
schemas:
BaseResponse:
type: object
additionalProperties: false
required:
- status
- data
properties:
status:
$ref: ./status.yaml#/components/schemas/ApiStatus
data:
description: Payload for success or error responses.
ErrorResponse:
allOf:
- $ref: ./response.yaml#/components/schemas/BaseResponse
- type: object
properties:
status:
type: string
enum:
- error
data:
$ref: ./error.yaml#/components/schemas/ApiError
SuccessResultData:
type: object
additionalProperties: false
required:
- result
properties:
result:
type: boolean
SuccessResultResponse:
allOf:
- $ref: ./response.yaml#/components/schemas/BaseResponse
- type: object
properties:
status:
type: string
enum:
- success
- processed
data:
$ref: ./response.yaml#/components/schemas/SuccessResultData
@@ -1,10 +0,0 @@
components:
schemas:
ApiStatus:
type: string
description: Unified response status used by backend wrappers.
enum:
- success
- processed
- error
- request
@@ -1,17 +0,0 @@
components:
requestBodies:
VerificationCodeBody:
description: JSON payload used to request a new verification code.
required: true
content:
application/json:
schema:
$ref: ../request/verification.yaml#/components/schemas/VerificationCodeRequest
VerifyCodeBody:
description: JSON payload containing a verification code to validate.
required: true
content:
application/json:
schema:
$ref: ../request/verification.yaml#/components/schemas/CodeVerificationRequest
@@ -1,37 +0,0 @@
post:
tags: [Verification, Auth]
summary: Request verification code
description: |
Creates a verification challenge for the specified purpose/target.
For `purpose=login`, request must be authorized with a pending account token.
operationId: verificationRequestCode
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/verification.yaml#/components/requestBodies/VerificationCodeBody
responses:
'202':
description: Verification code requested
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/verification.yaml#/components/schemas/VerificationResponseData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'429':
$ref: ../response/operation.yaml#/components/responses/TooManyRequests
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,73 +0,0 @@
components:
schemas:
VerificationCodeRequest:
type: object
additionalProperties: false
required:
- purpose
properties:
purpose:
type: string
description: Verification purpose, e.g. login.
target:
type: string
format: email
description: Optional destination override. When omitted, current handler falls back to the authenticated account email/login.
idempotencyKey:
type: string
quoteRef:
description: Required when `purpose` is `payout`; omitted for login and other verification purposes.
type: string
allOf:
- if:
properties:
purpose:
const: payout
required:
- purpose
then:
required:
- quoteRef
CodeVerificationRequest:
type: object
additionalProperties: false
required:
- purpose
- code
properties:
purpose:
type: string
description: Verification purpose, e.g. login.
target:
type: string
format: email
description: Optional destination override. When omitted, current handler falls back to the authenticated account email/login.
idempotencyKey:
type: string
quoteRef:
description: Required when `purpose` is `payout`; omitted for login and other verification purposes.
type: string
code:
type: string
sessionIdentifier:
$ref: ../../../models/auth/session_identifier.yaml#/components/schemas/SessionIdentifier
allOf:
- if:
properties:
purpose:
const: login
required:
- purpose
then:
required:
- sessionIdentifier
- if:
properties:
purpose:
const: payout
required:
- purpose
then:
required:
- quoteRef
@@ -1,37 +0,0 @@
post:
tags: [Verification, Auth]
summary: Resend verification code
description: |
Re-issues a verification challenge using the same request shape as `/verification`.
Cooldown and retry limits are enforced by backend verification storage policy.
operationId: verificationResendCode
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/verification.yaml#/components/requestBodies/VerificationCodeBody
responses:
'202':
description: Verification code resent
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/verification.yaml#/components/schemas/VerificationResponseData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'429':
$ref: ../response/operation.yaml#/components/responses/TooManyRequests
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,35 +0,0 @@
components:
schemas:
VerificationResponseData:
description: Response data returned after requesting a verification code.
type: object
additionalProperties: false
required:
- idempotencyKey
- ttl_seconds
- cooldown_seconds
- target
properties:
idempotencyKey:
description: Idempotency key associated with the verification request.
type: string
ttl_seconds:
description: Verification code validity period in seconds.
type: integer
format: int32
cooldown_seconds:
description: Cooldown period before another code can be requested.
type: integer
format: int32
target:
description: Destination where the verification code was sent.
type: string
quoteRef:
description: Payment quote reference echoed for payout verification requests.
type: string
VerifyResultData:
description: Result payload returned after code verification succeeds.
oneOf:
- $ref: ../../accounts/response/auth.yaml#/components/schemas/LoginData
- $ref: ../../response/response.yaml#/components/schemas/SuccessResultData
@@ -1,37 +0,0 @@
post:
tags: [Verification, Auth]
summary: Verify code and complete pending flow
description: |
Verifies submitted code and consumes verification token.
For login purpose, returns full auth payload (access + refresh tokens); for other purposes returns operation result.
operationId: verificationVerifyCode
security:
- bearerAuth: []
requestBody:
$ref: ./bodies/verification.yaml#/components/requestBodies/VerifyCodeBody
responses:
'200':
description: Verification successful
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/verification.yaml#/components/schemas/VerifyResultData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'404':
$ref: ../response/operation.yaml#/components/responses/NotFound
'410':
$ref: ../response/operation.yaml#/components/responses/Gone
'409':
$ref: ../response/operation.yaml#/components/responses/Conflict
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,35 +0,0 @@
get:
tags: [Wallets]
summary: List live managed-wallet assets
description: |
Returns the live wallet asset catalogue currently announced by healthy CRYPTO
gateways in discovery. The endpoint is authenticated and authorized by
`organizations_ref`, but the returned asset list is gateway-driven rather than
organization-customized. Malformed gateway asset announcements are skipped.
If discovery is available but no valid wallet assets are currently announced,
the response contains an empty `assets` array.
operationId: walletAssetsList
security:
- bearerAuth: []
parameters:
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
responses:
'200':
description: Live managed-wallet asset catalogue
content:
application/json:
schema:
allOf:
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
- type: object
properties:
data:
$ref: ./response/wallet.yaml#/components/schemas/WalletAssetsAuthData
'400':
$ref: ../response/operation.yaml#/components/responses/BadRequest
'401':
$ref: ../response/operation.yaml#/components/responses/Unauthorized
'403':
$ref: ../response/operation.yaml#/components/responses/Forbidden
'500':
$ref: ../response/operation.yaml#/components/responses/InternalServerError
@@ -1,18 +0,0 @@
components:
schemas:
WalletAssetsAuthData:
description: Authenticated response payload containing live wallet assets.
type: object
additionalProperties: false
required:
- accessToken
- assets
properties:
accessToken:
description: Refreshed access token to be used in subsequent API calls.
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
assets:
description: Managed-wallet assets currently announced by healthy CRYPTO gateways.
type: array
items:
$ref: ../../../models/wallet/wallet_asset.yaml#/components/schemas/WalletAsset
-10
View File
@@ -1,10 +0,0 @@
components:
schemas:
ChainNetwork:
type: string
enum:
- unspecified
- ethereum_mainnet
- arbitrum_one
- tron_mainnet
- tron_nile
-15
View File
@@ -1,15 +0,0 @@
components:
schemas:
EndpointType:
type: string
enum:
- paymentMethod
- account
- recipient
- ledger
- managedWallet
- cryptoAddress
- card
- cardToken
- bankAccount
- iban
-7
View File
@@ -1,7 +0,0 @@
components:
schemas:
FxSide:
type: string
enum:
- buy_base_sell_quote
- sell_base_buy_quote
-8
View File
@@ -1,8 +0,0 @@
components:
schemas:
PaymentKind:
type: string
enum:
- payout
- internal_transfer
- fx_conversion
@@ -1,12 +0,0 @@
components:
schemas:
PaymentMethodType:
type: string
enum:
- iban
- card
- cardToken
- bankAccount
- wallet
- cryptoAddress
- ledger
-11
View File
@@ -1,11 +0,0 @@
components:
schemas:
PaymentState:
type: string
enum:
- orchestration_state_unspecified
- orchestration_state_created
- orchestration_state_executing
- orchestration_state_needs_attention
- orchestration_state_settled
- orchestration_state_failed
@@ -1,8 +0,0 @@
components:
schemas:
SettlementMode:
type: string
enum:
- unspecified
- fix_source
- fix_received
@@ -1,15 +0,0 @@
components:
schemas:
AccountData:
description: Extended account payload including visibility-specific metadata.
allOf:
- $ref: ./account_public.yaml#/components/schemas/AccountPublic
- type: object
description: Account attributes that are not part of the public profile.
additionalProperties: false
required:
- isAnonymous
properties:
isAnonymous:
description: Indicates whether the account is marked as anonymous.
type: boolean
@@ -1,33 +0,0 @@
components:
schemas:
AccountPublic:
description: Public account profile data exposed in API responses.
allOf:
- $ref: ../storable.yaml#/components/schemas/Storable
- $ref: ../common/describable.yaml#/components/schemas/Describable
- type: object
description: Account-specific public attributes.
additionalProperties: false
required:
- login
- locale
- lastName
- isArchived
properties:
login:
description: Account login identifier represented as an email address.
type: string
format: email
locale:
description: Preferred locale used for account-facing content.
type: string
lastName:
description: Account holder last name.
type: string
avatarUrl:
description: Optional URL of the account avatar image.
type: string
nullable: true
isArchived:
description: Indicates whether the account is archived and inactive.
type: boolean
@@ -1,15 +0,0 @@
components:
schemas:
ClientRefreshToken:
description: Refresh token bound to a specific client and device session.
allOf:
- $ref: ./session_identifier.yaml#/components/schemas/SessionIdentifier
- type: object
description: Refresh-token payload associated with the session identifier.
additionalProperties: false
required:
- token
properties:
token:
description: Long-lived token used to obtain a new access token.
type: string
Loaded 100 of 382 files, more files were not shown because too many files have changed in this diff. Show more