mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
Follow-up to PR #727. The field is populated by the server today, but making it required forces a breaking schema bump on every existing v3 client that pre-dates the catalog work. Mark it optional in the OpenAPI spec; SDK regenerates the Go field with `omitempty`.
2277 lines
58 KiB
YAML
2277 lines
58 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Payments API
|
|
version: v3
|
|
|
|
components:
|
|
schemas:
|
|
# ACCOUNTS
|
|
V3AccountID:
|
|
type: string
|
|
|
|
V3AccountsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Account'
|
|
|
|
V3GetAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Account'
|
|
|
|
V3CreateAccountRequest:
|
|
type: object
|
|
required:
|
|
- reference
|
|
- connectorID
|
|
- createdAt
|
|
- accountName
|
|
- type
|
|
properties:
|
|
reference:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
accountName:
|
|
type: string
|
|
type:
|
|
$ref: '#/components/schemas/V3AccountTypeEnum'
|
|
defaultAsset:
|
|
type: string
|
|
pattern: ^[a-zA-Z]{3}\/[0-9]$
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3CreateAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Account'
|
|
|
|
V3Account:
|
|
type: object
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- provider
|
|
- reference
|
|
- createdAt
|
|
- type
|
|
- raw
|
|
properties:
|
|
id:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
connector:
|
|
$ref: '#/components/schemas/V3ConnectorBase'
|
|
provider:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
type:
|
|
$ref: '#/components/schemas/V3AccountTypeEnum'
|
|
name:
|
|
type: string
|
|
nullable: true
|
|
defaultAsset:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
raw:
|
|
type: object
|
|
V3AccountTypeEnum:
|
|
type: string
|
|
enum:
|
|
- UNKNOWN
|
|
- INTERNAL
|
|
- EXTERNAL
|
|
|
|
# BALANCES
|
|
V3BalancesCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Balance'
|
|
V3Balance:
|
|
type: object
|
|
required:
|
|
- accountID
|
|
- createdAt
|
|
- lastUpdatedAt
|
|
- asset
|
|
- balance
|
|
properties:
|
|
accountID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
lastUpdatedAt:
|
|
type: string
|
|
format: date-time
|
|
asset:
|
|
type: string
|
|
balance:
|
|
type: integer
|
|
format: bigint
|
|
|
|
# BANK ACCOUNTS
|
|
V3CreateBankAccountRequest:
|
|
type: object
|
|
required:
|
|
- name
|
|
properties:
|
|
name:
|
|
type: string
|
|
accountNumber:
|
|
type: string
|
|
iban:
|
|
type: string
|
|
swiftBicCode:
|
|
type: string
|
|
country:
|
|
type: string
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3CreateBankAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
description: The ID of the created bank account
|
|
type: string
|
|
|
|
V3UpdateBankAccountMetadataRequest:
|
|
type: object
|
|
required:
|
|
- metadata
|
|
properties:
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3ForwardBankAccountRequest:
|
|
type: object
|
|
required:
|
|
- connectorID
|
|
properties:
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
|
|
V3ForwardBankAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to forward the bank account to the PSP. You can use the task API to check the status of
|
|
the task and get the resulting bank account ID.
|
|
type: string
|
|
|
|
V3BankAccountsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3BankAccount'
|
|
|
|
V3GetBankAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3BankAccount'
|
|
|
|
V3BankAccount:
|
|
type: object
|
|
required:
|
|
- id
|
|
- createdAt
|
|
- name
|
|
properties:
|
|
id:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
name:
|
|
type: string
|
|
accountNumber:
|
|
type: string
|
|
nullable: true
|
|
iban:
|
|
type: string
|
|
nullable: true
|
|
swiftBicCode:
|
|
type: string
|
|
nullable: true
|
|
country:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
relatedAccounts:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3BankAccountRelatedAccount'
|
|
|
|
V3BankAccountRelatedAccount:
|
|
type: object
|
|
required:
|
|
- accountID
|
|
- createdAt
|
|
properties:
|
|
accountID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
|
|
# CONNECTORS
|
|
V3InstallConnectorRequest:
|
|
$ref: '#/components/schemas/V3ConnectorConfig'
|
|
|
|
V3InstallConnectorResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
description: The ID of the created connector
|
|
type: string
|
|
|
|
V3UninstallConnectorResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to uninstall the connector. You can use the task API to check the status of the task and
|
|
get the results.
|
|
type: string
|
|
|
|
V3ResetConnectorResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to reset the connector. You can use the task API to check the status of the task and get the
|
|
results.
|
|
type: string
|
|
|
|
V3Capability:
|
|
type: string
|
|
description: >
|
|
Plugin capability advertised by a connector. Distinct from the
|
|
Formance gateway "module capabilities" (which are version-gated);
|
|
these reflect what the underlying PSP integration actually exposes.
|
|
enum:
|
|
- FETCH_ACCOUNTS
|
|
- FETCH_BALANCES
|
|
- FETCH_EXTERNAL_ACCOUNTS
|
|
- FETCH_PAYMENTS
|
|
- FETCH_OTHERS
|
|
- FETCH_ORDERS
|
|
- FETCH_CONVERSIONS
|
|
- CREATE_WEBHOOKS
|
|
- TRANSLATE_WEBHOOKS
|
|
- CREATE_BANK_ACCOUNT
|
|
- CREATE_TRANSFER
|
|
- CREATE_PAYOUT
|
|
- ALLOW_FORMANCE_ACCOUNT_CREATION
|
|
- ALLOW_FORMANCE_PAYMENT_CREATION
|
|
|
|
V3ConnectorCapabilitiesResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
description: Map of provider name to the capabilities its plugin advertises.
|
|
additionalProperties:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Capability'
|
|
|
|
V3ConnectorCapabilityResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Capability'
|
|
|
|
V3ConnectorConfigsResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
additionalProperties:
|
|
type: object
|
|
additionalProperties:
|
|
type: object
|
|
required:
|
|
- dataType
|
|
- required
|
|
properties:
|
|
dataType:
|
|
type: string
|
|
required:
|
|
type: boolean
|
|
defaultValue:
|
|
type: string
|
|
|
|
V3GetConnectorConfigResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3ConnectorConfig'
|
|
|
|
V3UpdateConnectorRequest:
|
|
$ref: '#/components/schemas/V3ConnectorConfig'
|
|
|
|
V3ConnectorsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Connector'
|
|
|
|
V3ConnectorSchedulesCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Schedule'
|
|
|
|
V3ConnectorScheduleResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Schedule'
|
|
|
|
V3ConnectorScheduleInstancesCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Instance'
|
|
|
|
V3Connector:
|
|
type: object
|
|
required:
|
|
- id
|
|
- reference
|
|
- name
|
|
- createdAt
|
|
- provider
|
|
- scheduledForDeletion
|
|
- config
|
|
properties:
|
|
id:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
name:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
provider:
|
|
type: string
|
|
scheduledForDeletion:
|
|
type: boolean
|
|
config:
|
|
type: object
|
|
capabilities:
|
|
type: array
|
|
description: Plugin capabilities advertised by the connector's provider.
|
|
items:
|
|
$ref: '#/components/schemas/V3Capability'
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
nullable: true
|
|
|
|
V3ConnectorBase:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
name:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
provider:
|
|
type: string
|
|
|
|
V3Schedule:
|
|
type: object
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- createdAt
|
|
properties:
|
|
id:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
pausedAt:
|
|
type: string
|
|
format: date-time
|
|
nullable: true
|
|
pausedReason:
|
|
type: string
|
|
nullable: true
|
|
|
|
V3Instance:
|
|
type: object
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- scheduleID
|
|
- createdAt
|
|
- updatedAt
|
|
- terminated
|
|
properties:
|
|
id:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
scheduleID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
terminated:
|
|
type: boolean
|
|
terminatedAt:
|
|
type: string
|
|
format: date-time
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
|
|
# PAYMENTS
|
|
V3CreatePaymentRequest:
|
|
type: object
|
|
required:
|
|
- reference
|
|
- connectorID
|
|
- createdAt
|
|
- type
|
|
- initialAmount
|
|
- amount
|
|
- asset
|
|
- scheme
|
|
properties:
|
|
reference:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
type:
|
|
$ref: '#/components/schemas/V3PaymentTypeEnum'
|
|
initialAmount:
|
|
type: integer
|
|
format: bigint
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
pattern: ^[a-zA-Z]{3}\/[0-9]$
|
|
scheme:
|
|
type: string
|
|
sourceAccountID:
|
|
type: string
|
|
format: byte
|
|
destinationAccountID:
|
|
type: string
|
|
format: byte
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
adjustments:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3CreatePaymentAdjustmentRequest'
|
|
|
|
V3CreatePaymentAdjustmentRequest:
|
|
type: object
|
|
required:
|
|
- reference
|
|
- createdAt
|
|
- status
|
|
properties:
|
|
reference:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
$ref: '#/components/schemas/V3PaymentStatusEnum'
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
pattern: ^[a-zA-Z]{3}\/[0-9]$
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3CreatePaymentResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Payment'
|
|
|
|
V3UpdatePaymentMetadataRequest:
|
|
type: object
|
|
required:
|
|
- metadata
|
|
properties:
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3PaymentsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Payment'
|
|
|
|
V3GetPaymentResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Payment'
|
|
|
|
V3Payment:
|
|
type: object
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- provider
|
|
- reference
|
|
- createdAt
|
|
- type
|
|
- initialAmount
|
|
- amount
|
|
- asset
|
|
- scheme
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
provider:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
type:
|
|
$ref: '#/components/schemas/V3PaymentTypeEnum'
|
|
initialAmount:
|
|
type: integer
|
|
format: bigint
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
scheme:
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/V3PaymentStatusEnum'
|
|
sourceAccountID:
|
|
type: string
|
|
format: byte
|
|
nullable: true
|
|
destinationAccountID:
|
|
type: string
|
|
format: byte
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
adjustments:
|
|
type: array
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentAdjustment'
|
|
|
|
V3PaymentAdjustment:
|
|
type: object
|
|
required:
|
|
- id
|
|
- reference
|
|
- createdAt
|
|
- status
|
|
- raw
|
|
properties:
|
|
id:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
$ref: '#/components/schemas/V3PaymentStatusEnum'
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
raw:
|
|
type: object
|
|
|
|
V3PaymentTypeEnum:
|
|
type: string
|
|
enum:
|
|
- UNKNOWN
|
|
- PAY-IN
|
|
- PAYOUT
|
|
- TRANSFER
|
|
- OTHER
|
|
|
|
V3PaymentStatusEnum:
|
|
type: string
|
|
enum:
|
|
- UNKNOWN
|
|
- PENDING
|
|
- SUCCEEDED
|
|
- CANCELLED
|
|
- FAILED
|
|
- EXPIRED
|
|
- REFUNDED
|
|
- REFUNDED_FAILURE
|
|
- REFUND_REVERSED
|
|
- DISPUTE
|
|
- DISPUTE_WON
|
|
- DISPUTE_LOST
|
|
- AMOUNT_ADJUSTEMENT
|
|
- AUTHORISATION
|
|
- CAPTURE
|
|
- CAPTURE_FAILED
|
|
- OTHER
|
|
|
|
# ORDERS
|
|
V3OrdersCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Order'
|
|
|
|
V3GetOrderResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Order'
|
|
|
|
V3Order:
|
|
type: object
|
|
description: |
|
|
A trade order submitted to an exchange-style PSP. Orders are read-only
|
|
in the Formance API: they are fetched from the underlying connector.
|
|
Status transitions are captured via the `adjustments` array; each
|
|
adjustment is a point-in-time snapshot from the PSP.
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- provider
|
|
- reference
|
|
- createdAt
|
|
- updatedAt
|
|
- direction
|
|
- sourceAsset
|
|
- destinationAsset
|
|
- type
|
|
- status
|
|
- baseQuantityOrdered
|
|
- timeInForce
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: Formance-assigned unique order ID (composed from the PSP reference and connector ID).
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
description: ID of the Formance connector this order was fetched from.
|
|
provider:
|
|
type: string
|
|
description: Provider name of the connector (e.g. `coinbaseprime`).
|
|
reference:
|
|
type: string
|
|
description: PSP-assigned order reference. Unique within the connector; used as the storage dedup key.
|
|
clientOrderID:
|
|
type: string
|
|
nullable: true
|
|
description: |
|
|
Client-assigned ID supplied to the PSP for placement idempotency
|
|
(e.g. Coinbase `client_order_id`, Kraken `cl_ord_id`, Binance
|
|
`clientOrderId`). Stored for traceability only — Formance does
|
|
NOT dedup on this field.
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: When the order was created on the PSP.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: When Formance last observed a state change on the order. Equivalent to the latest adjustment's `createdAt`.
|
|
direction:
|
|
$ref: '#/components/schemas/V3OrderDirectionEnum'
|
|
sourceAsset:
|
|
type: string
|
|
description: |
|
|
Asset being spent, in `SYMBOL/precision` form (e.g. `USD/2`,
|
|
`BTC/8`). For BUY: the quote currency. For SELL: the base
|
|
currency.
|
|
destinationAsset:
|
|
type: string
|
|
description: |
|
|
Asset being received, in `SYMBOL/precision` form.
|
|
For BUY: the base currency. For SELL: the quote currency.
|
|
type:
|
|
$ref: '#/components/schemas/V3OrderTypeEnum'
|
|
status:
|
|
$ref: '#/components/schemas/V3OrderStatusEnum'
|
|
baseQuantityOrdered:
|
|
type: integer
|
|
format: bigint
|
|
description: Amount of base asset the order was placed for, as an integer at the base asset's precision.
|
|
baseQuantityFilled:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Amount of base asset filled so far, as an integer at the base asset's precision. Null before any fill.
|
|
limitPrice:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Maximum price (for BUY) or minimum price (for SELL) at which the order may execute, in `priceAsset` precision. Required for LIMIT-family order types; null otherwise.
|
|
stopPrice:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Trigger price at which a STOP / STOP_LIMIT order activates, in `priceAsset` precision. Null for non-stop order types.
|
|
timeInForce:
|
|
$ref: '#/components/schemas/V3TimeInForceEnum'
|
|
expiresAt:
|
|
type: string
|
|
format: date-time
|
|
nullable: true
|
|
description: Expiration instant for `GOOD_UNTIL_DATE_TIME` orders. Null for other time-in-force values.
|
|
fee:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Commission charged by the PSP for the order, as an integer in `feeAsset` precision.
|
|
feeAsset:
|
|
type: string
|
|
nullable: true
|
|
description: Currency the fee is denominated in, in `SYMBOL/precision` form. Typically the quote asset.
|
|
averageFillPrice:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Volume-weighted average price across all fills so far, in `priceAsset` precision. Analytics field — may be absent if the PSP does not report it.
|
|
quoteAmount:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: |
|
|
Total amount of quote currency exchanged so far, as reported by
|
|
the PSP (e.g. Coinbase `filled_value`), at `quoteAsset`
|
|
precision. For BUY: amount spent. For SELL: amount received.
|
|
quoteAsset:
|
|
type: string
|
|
nullable: true
|
|
description: Quote currency with precision (e.g. `USD/2`). Null when the order has no quote-side amounts reported yet.
|
|
priceAsset:
|
|
type: string
|
|
nullable: true
|
|
description: |
|
|
Currency + precision under which `limitPrice`, `stopPrice`, and
|
|
`averageFillPrice` should be interpreted. Separate from
|
|
`quoteAsset` because some PSPs return price strings with more
|
|
decimal digits than the quote currency's natural precision.
|
|
sourceAccountID:
|
|
type: string
|
|
nullable: true
|
|
description: |
|
|
Formance account ID of the wallet the source asset was debited
|
|
from. Null if the PSP did not return enough information to
|
|
resolve it at ingestion time.
|
|
destinationAccountID:
|
|
type: string
|
|
nullable: true
|
|
description: Formance account ID of the wallet the destination asset was credited to. Null if unresolvable.
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
adjustments:
|
|
type: array
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/V3OrderAdjustment'
|
|
description: Ordered history of state snapshots for this order. The most recent element reflects the current `status`.
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
description: Human-readable error from the PSP (e.g. rejection reason) when `status` is `FAILED`. Null otherwise.
|
|
|
|
V3OrderAdjustment:
|
|
type: object
|
|
description: |
|
|
Immutable snapshot of an order's state at a single observation.
|
|
Formance records one adjustment per distinct state the PSP reports
|
|
(status change, fill progress, fee update). Events are emitted
|
|
per-adjustment, not per-order — so a single order can produce many
|
|
events over its lifetime.
|
|
required:
|
|
- id
|
|
- reference
|
|
- createdAt
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: Adjustment ID, composed from the order ID plus the state fields that define uniqueness (status, filled quantity, fee). Idempotent — replaying the same observation produces the same ID.
|
|
reference:
|
|
type: string
|
|
description: PSP reference the adjustment belongs to (equal to the parent order's `reference`).
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: When Formance observed this state. Not the PSP's own timestamp — reflects ingestion time.
|
|
status:
|
|
$ref: '#/components/schemas/V3OrderStatusEnum'
|
|
baseQuantityFilled:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Base asset filled at this observation, at the base asset's precision.
|
|
fee:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Cumulative fee at this observation, at `feeAsset` precision.
|
|
feeAsset:
|
|
type: string
|
|
nullable: true
|
|
description: Currency the fee is denominated in, in `SYMBOL/precision` form.
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
raw:
|
|
type: object
|
|
description: Untransformed PSP response payload that produced this adjustment. Retained for debugging and replay.
|
|
|
|
V3OrderDirectionEnum:
|
|
type: string
|
|
description: Whether an order buys or sells the base asset.
|
|
enum:
|
|
- UNKNOWN
|
|
- BUY
|
|
- SELL
|
|
|
|
V3OrderTypeEnum:
|
|
type: string
|
|
description: |
|
|
Exchange order type. Determines which price fields are meaningful on
|
|
`V3Order`: LIMIT-family types use `limitPrice`; STOP-family types use
|
|
`stopPrice`; TWAP/VWAP are time-weighted execution algorithms.
|
|
enum:
|
|
- UNKNOWN
|
|
- MARKET
|
|
- LIMIT
|
|
- STOP_LIMIT
|
|
- STOP
|
|
- TWAP
|
|
- VWAP
|
|
- PEG
|
|
- BLOCK
|
|
- RFQ
|
|
- TRAILING_STOP
|
|
- TRAILING_STOP_LIMIT
|
|
- TAKE_PROFIT
|
|
- TAKE_PROFIT_LIMIT
|
|
- LIMIT_MAKER
|
|
|
|
V3OrderStatusEnum:
|
|
type: string
|
|
description: |
|
|
Lifecycle of an order on the exchange.
|
|
`PENDING` — accepted by the exchange, not yet working.
|
|
`OPEN` — live on the book, no fills yet.
|
|
`PARTIALLY_FILLED` — live on the book, some base quantity filled.
|
|
`FILLED` — fully filled, terminal.
|
|
`CANCELLED` — cancelled by the user or system, terminal.
|
|
`FAILED` — rejected by the exchange, terminal. See `error` for details.
|
|
`EXPIRED` — `timeInForce` elapsed before full fill, terminal.
|
|
enum:
|
|
- UNKNOWN
|
|
- PENDING
|
|
- OPEN
|
|
- PARTIALLY_FILLED
|
|
- FILLED
|
|
- CANCELLED
|
|
- FAILED
|
|
- EXPIRED
|
|
|
|
V3TimeInForceEnum:
|
|
type: string
|
|
description: |
|
|
How long an order is valid on the exchange.
|
|
`GOOD_UNTIL_CANCELLED` — rests until explicitly cancelled.
|
|
`GOOD_UNTIL_DATE_TIME` — rests until `expiresAt`.
|
|
`IMMEDIATE_OR_CANCEL` — fill immediately, cancel any unfilled portion.
|
|
`FILL_OR_KILL` — fill fully and immediately, or cancel entirely.
|
|
enum:
|
|
- UNKNOWN
|
|
- GOOD_UNTIL_CANCELLED
|
|
- GOOD_UNTIL_DATE_TIME
|
|
- IMMEDIATE_OR_CANCEL
|
|
- FILL_OR_KILL
|
|
|
|
# CONVERSIONS
|
|
V3ConversionsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Conversion'
|
|
|
|
V3GetConversionResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Conversion'
|
|
|
|
V3Conversion:
|
|
type: object
|
|
description: |
|
|
A currency or asset conversion executed on a PSP (e.g. Coinbase Prime
|
|
transfer between a USD and USDC wallet). Conversions are read-only in
|
|
the Formance API: they are fetched from the underlying connector.
|
|
Unlike orders, conversions do not carry an adjustment history —
|
|
Formance records the final state only.
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- provider
|
|
- reference
|
|
- createdAt
|
|
- updatedAt
|
|
- sourceAsset
|
|
- destinationAsset
|
|
- sourceAmount
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: Formance-assigned unique conversion ID.
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
description: ID of the Formance connector this conversion was fetched from.
|
|
provider:
|
|
type: string
|
|
description: Provider name of the connector (e.g. `coinbaseprime`).
|
|
reference:
|
|
type: string
|
|
description: PSP-assigned conversion reference. Unique within the connector.
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: When the conversion was initiated on the PSP.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: When Formance last observed a state change on the conversion.
|
|
sourceAsset:
|
|
type: string
|
|
description: Asset being converted from, in `SYMBOL/precision` form (e.g. `USD/2`).
|
|
destinationAsset:
|
|
type: string
|
|
description: Asset being converted to, in `SYMBOL/precision` form (e.g. `USDC/6`).
|
|
sourceAmount:
|
|
type: integer
|
|
format: bigint
|
|
description: Amount of source asset debited, as an integer at `sourceAsset` precision.
|
|
destinationAmount:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: Amount of destination asset credited, at `destinationAsset` precision. Null until the conversion completes.
|
|
fee:
|
|
type: integer
|
|
format: bigint
|
|
nullable: true
|
|
description: PSP fee for the conversion, at `feeAsset` precision.
|
|
feeAsset:
|
|
type: string
|
|
nullable: true
|
|
description: Currency the fee is denominated in, in `SYMBOL/precision` form.
|
|
status:
|
|
$ref: '#/components/schemas/V3ConversionStatusEnum'
|
|
sourceAccountID:
|
|
type: string
|
|
nullable: true
|
|
description: Formance account ID of the wallet the source asset was debited from.
|
|
destinationAccountID:
|
|
type: string
|
|
nullable: true
|
|
description: Formance account ID of the wallet the destination asset was credited to.
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
description: Human-readable error from the PSP when `status` is `FAILED`. Null otherwise.
|
|
|
|
V3ConversionStatusEnum:
|
|
type: string
|
|
description: |
|
|
Lifecycle of a conversion.
|
|
`PENDING` — accepted by the PSP, not yet settled.
|
|
`COMPLETED` — settled, terminal.
|
|
`FAILED` — rejected or reverted, terminal. See `error`.
|
|
enum:
|
|
- UNKNOWN
|
|
- PENDING
|
|
- COMPLETED
|
|
- FAILED
|
|
|
|
# PAYMENT INITIATIONS
|
|
V3InitiatePaymentRequest:
|
|
type: object
|
|
required:
|
|
- reference
|
|
- scheduledAt
|
|
- connectorID
|
|
- description
|
|
- type
|
|
- amount
|
|
- asset
|
|
properties:
|
|
reference:
|
|
type: string
|
|
minLength: 3
|
|
maxLength: 1000
|
|
scheduledAt:
|
|
type: string
|
|
format: date-time
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
description:
|
|
type: string
|
|
maxLength: 10000
|
|
type:
|
|
$ref: '#/components/schemas/V3PaymentInitiationTypeEnum'
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
pattern: ^[a-zA-Z]{3}\/[0-9]$
|
|
sourceAccountID:
|
|
type: string
|
|
format: byte
|
|
nullable: true
|
|
destinationAccountID:
|
|
type: string
|
|
format: byte
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3InitiatePaymentResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
properties:
|
|
paymentInitiationID:
|
|
description: >
|
|
Related payment initiation object ID created.
|
|
type: string
|
|
taskID:
|
|
description: >
|
|
Will be filled if the noValidation query parameter is set to true. Since this call is asynchronous, the response will contain the ID of the task that was created to create the payment
|
|
on the PSP. You can use the task API to check the status of the task and get the resulting payment ID
|
|
type: string
|
|
|
|
V3RetryPaymentInitiationResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to retry the payment initiation to the PSP. You can use the task API to check the status
|
|
of the task and get the resulting payment ID.
|
|
type: string
|
|
|
|
V3ApprovePaymentInitiationResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to approve the payment initiation. You can use the task API to check the status of the
|
|
task and get the resulting payment ID.
|
|
type: string
|
|
|
|
V3ReversePaymentInitiationRequest:
|
|
type: object
|
|
required:
|
|
- reference
|
|
- description
|
|
- amount
|
|
- asset
|
|
properties:
|
|
reference:
|
|
type: string
|
|
minLength: 3
|
|
maxLength: 1000
|
|
description:
|
|
type: string
|
|
maxLength: 10000
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
pattern: ^[a-zA-Z]{3}\/[0-9]$
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3ReversePaymentInitiationResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to reverse the payment initiation. You can use the task API to check the status of the
|
|
task and get the resulting payment ID.
|
|
type: string
|
|
paymentInitiationReversalID:
|
|
description: >
|
|
Related payment initiation reversal object ID created.
|
|
type: string
|
|
|
|
V3PaymentInitiationsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentInitiation'
|
|
|
|
V3PaymentInitiationAdjustmentsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentInitiationAdjustment'
|
|
|
|
V3PaymentInitiationRelatedPaymentsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Payment'
|
|
|
|
V3PaymentInitiation:
|
|
type: object
|
|
required:
|
|
- id
|
|
- connectorID
|
|
- provider
|
|
- reference
|
|
- createdAt
|
|
- scheduledAt
|
|
- description
|
|
- type
|
|
- amount
|
|
- asset
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
provider:
|
|
type: string
|
|
reference:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
scheduledAt:
|
|
type: string
|
|
format: date-time
|
|
description:
|
|
type: string
|
|
type:
|
|
$ref: '#/components/schemas/V3PaymentInitiationTypeEnum'
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/V3PaymentInitiationStatusEnum'
|
|
sourceAccountID:
|
|
type: string
|
|
format: byte
|
|
destinationAccountID:
|
|
type: string
|
|
format: byte
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3PaymentInitiationAdjustment:
|
|
type: object
|
|
required:
|
|
- id
|
|
- createdAt
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
$ref: '#/components/schemas/V3PaymentInitiationStatusEnum'
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
asset:
|
|
type: string
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3GetPaymentInitiationResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3PaymentInitiation'
|
|
|
|
V3PaymentInitiationStatusEnum:
|
|
type: string
|
|
enum:
|
|
- UNKNOWN
|
|
- WAITING_FOR_VALIDATION
|
|
- SCHEDULED_FOR_PROCESSING
|
|
- PROCESSING
|
|
- PROCESSED
|
|
- FAILED
|
|
- REJECTED
|
|
- REVERSE_PROCESSING
|
|
- REVERSE_FAILED
|
|
- REVERSED
|
|
|
|
V3PaymentInitiationTypeEnum:
|
|
type: string
|
|
enum:
|
|
- UNKNOWN
|
|
- TRANSFER
|
|
- PAYOUT
|
|
|
|
# PAYMENT SERVICE USERS
|
|
V3CreatePaymentServiceUserRequest:
|
|
type: object
|
|
required:
|
|
- name
|
|
properties:
|
|
name:
|
|
type: string
|
|
contactDetails:
|
|
$ref: '#/components/schemas/V3ContactDetailsRequest'
|
|
address:
|
|
$ref: '#/components/schemas/V3AddressRequest'
|
|
bankAccountIDs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3AddressRequest:
|
|
type: object
|
|
properties:
|
|
streetNumber:
|
|
type: string
|
|
streetName:
|
|
type: string
|
|
city:
|
|
type: string
|
|
region:
|
|
type: string
|
|
postalCode:
|
|
type: string
|
|
country:
|
|
type: string
|
|
|
|
V3ContactDetailsRequest:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
phoneNumber:
|
|
type: string
|
|
|
|
V3CreatePaymentServiceUserResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
description: The ID of the created payment service user
|
|
type: string
|
|
|
|
V3PaymentServiceUserDeleteResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to delete the payment service user. You can use the task API to check the status of
|
|
the task.
|
|
type: string
|
|
|
|
V3PaymentServiceUserDeleteConnectorResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to delete the payment service user on the connector. You can use the task API to check the status of
|
|
the task.
|
|
type: string
|
|
|
|
V3PaymentServiceUserDeleteConnectionResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to delete the connection. You can use the task API to check the status of
|
|
the task.
|
|
type: string
|
|
|
|
V3PaymentServiceUsersCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentServiceUser'
|
|
|
|
V3PaymentServiceUserConnectionsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentServiceUserConnection'
|
|
|
|
V3PaymentServiceUserLinkAttemptsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PaymentServiceUserLinkAttempt'
|
|
|
|
V3PaymentServiceUser:
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- createdAt
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
contactDetails:
|
|
$ref: '#/components/schemas/V3ContactDetails'
|
|
address:
|
|
$ref: '#/components/schemas/V3Address'
|
|
bankAccountIDs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3PaymentServiceUserConnection:
|
|
type: object
|
|
required:
|
|
- connectionID
|
|
- connectorID
|
|
- createdAt
|
|
- dataUpdatedAt
|
|
- status
|
|
properties:
|
|
connectionID:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
dataUpdatedAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
$ref: '#/components/schemas/V3ConnectionStatusEnum'
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
metadata:
|
|
$ref: '#/components/schemas/V3Metadata'
|
|
|
|
V3PaymentServiceUserLinkAttempt:
|
|
type: object
|
|
required:
|
|
- id
|
|
- psuID
|
|
- connectorID
|
|
- createdAt
|
|
- status
|
|
- clientRedirectURL
|
|
properties:
|
|
id:
|
|
type: string
|
|
psuID:
|
|
type: string
|
|
connectorID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
$ref: '#/components/schemas/V3OpenBankingConnectionAttemptStatusEnum'
|
|
clientRedirectURL:
|
|
type: string
|
|
format: url
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
|
|
V3ContactDetails:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
phoneNumber:
|
|
type: string
|
|
|
|
V3Address:
|
|
type: object
|
|
properties:
|
|
streetNumber:
|
|
type: string
|
|
streetName:
|
|
type: string
|
|
city:
|
|
type: string
|
|
region:
|
|
type: string
|
|
postalCode:
|
|
type: string
|
|
country:
|
|
type: string
|
|
|
|
V3GetPaymentServiceUserResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3PaymentServiceUser'
|
|
|
|
V3ForwardPaymentServiceUserBankAccountRequest:
|
|
type: object
|
|
required:
|
|
- connectorID
|
|
properties:
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
|
|
V3ForwardPaymentServiceUserBankAccountResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
type: object
|
|
required:
|
|
- taskID
|
|
properties:
|
|
taskID:
|
|
description: >
|
|
Since this call is asynchronous, the response will contain the ID of the task that was created to forward the bank account to the PSP. You can use the task API to check the status of
|
|
the task and get the resulting bank account ID.
|
|
type: string
|
|
|
|
V3ConnectionStatusEnum:
|
|
type: string
|
|
enum:
|
|
- ACTIVE
|
|
- ERROR
|
|
|
|
V3OpenBankingConnectionAttemptStatusEnum:
|
|
type: string
|
|
enum:
|
|
- pending
|
|
- completed
|
|
- exited
|
|
|
|
V3PaymentServiceUserCreateLinkRequest:
|
|
type: object
|
|
required:
|
|
- clientRedirectURL
|
|
properties:
|
|
applicationName:
|
|
type: string
|
|
description: The name of the application to be displayed to the user when they click the link (depending on the open banking provider). Note that this field might be mandatory for some open banking providers.
|
|
clientRedirectURL:
|
|
type: string
|
|
format: url
|
|
description: The URL to redirect the user to after the link flow is completed.
|
|
|
|
V3PaymentServiceUserCreateLinkResponse:
|
|
type: object
|
|
required:
|
|
- attemptID
|
|
- link
|
|
properties:
|
|
attemptID:
|
|
type: string
|
|
link:
|
|
type: string
|
|
format: url
|
|
|
|
V3PaymentServiceUserUpdateLinkRequest:
|
|
type: object
|
|
required:
|
|
- clientRedirectURL
|
|
properties:
|
|
applicationName:
|
|
type: string
|
|
description: The name of the application to be displayed to the user when they click the link (depending on the open banking provider). Note that this field might be mandatory for some open banking providers.
|
|
clientRedirectURL:
|
|
type: string
|
|
format: url
|
|
|
|
V3PaymentServiceUserUpdateLinkResponse:
|
|
type: object
|
|
required:
|
|
- attemptID
|
|
- link
|
|
properties:
|
|
attemptID:
|
|
type: string
|
|
link:
|
|
type: string
|
|
format: url
|
|
|
|
# POOLS
|
|
V3CreatePoolRequest:
|
|
type: object
|
|
description: Query and dynamic pools are available from Connectivity v3.1
|
|
required:
|
|
- name
|
|
properties:
|
|
name:
|
|
type: string
|
|
query:
|
|
description: The same query than in ListAccount. Allowed properties are id, reference, connector_id, type, default_asset, name, psu_id, open_banking_connection_id and metadata.
|
|
type: object
|
|
additionalProperties: true
|
|
accountIDs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
|
|
V3CreatePoolResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
description: The ID of the created pool
|
|
type: string
|
|
|
|
V3UpdatePoolQueryRequest:
|
|
type: object
|
|
required:
|
|
- query
|
|
properties:
|
|
query:
|
|
type: object
|
|
additionalProperties: true
|
|
|
|
V3PoolsCursorResponse:
|
|
type: object
|
|
required:
|
|
- cursor
|
|
properties:
|
|
cursor:
|
|
type: object
|
|
required:
|
|
- pageSize
|
|
- hasMore
|
|
- data
|
|
properties:
|
|
pageSize:
|
|
type: integer
|
|
format: int64
|
|
minimum: 1
|
|
example: 15
|
|
hasMore:
|
|
type: boolean
|
|
example: false
|
|
previous:
|
|
type: string
|
|
example: YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=
|
|
next:
|
|
type: string
|
|
example: ''
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3Pool'
|
|
|
|
V3GetPoolResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Pool'
|
|
|
|
V3PoolBalancesResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3PoolBalances'
|
|
|
|
V3Pool:
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- createdAt
|
|
- poolAccounts
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
type:
|
|
$ref: '#/components/schemas/V3PoolTypeEnum'
|
|
query:
|
|
type: object
|
|
additionalProperties: true
|
|
poolAccounts:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3AccountID'
|
|
|
|
V3PoolBalances:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/V3PoolBalance'
|
|
|
|
V3PoolBalance:
|
|
type: object
|
|
required:
|
|
- asset
|
|
- amount
|
|
properties:
|
|
asset:
|
|
type: string
|
|
amount:
|
|
type: integer
|
|
format: bigint
|
|
relatedAccounts:
|
|
nullable: true
|
|
type: array
|
|
items:
|
|
type: string
|
|
|
|
V3PoolTypeEnum:
|
|
type: string
|
|
enum:
|
|
- STATIC
|
|
- DYNAMIC
|
|
|
|
# TASKS
|
|
V3GetTaskResponse:
|
|
type: object
|
|
required:
|
|
- data
|
|
properties:
|
|
data:
|
|
$ref: '#/components/schemas/V3Task'
|
|
|
|
V3Task:
|
|
type: object
|
|
required:
|
|
- id
|
|
- status
|
|
- createdAt
|
|
- updatedAt
|
|
properties:
|
|
id:
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/V3TaskStatusEnum'
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
connectorID:
|
|
type: string
|
|
format: byte
|
|
createdObjectID:
|
|
type: string
|
|
error:
|
|
type: string
|
|
nullable: true
|
|
|
|
V3TaskStatusEnum:
|
|
type: string
|
|
enum:
|
|
- PROCESSING
|
|
- SUCCEEDED
|
|
- FAILED
|
|
|
|
# OTHERS
|
|
V3QueryBuilder:
|
|
type: object
|
|
additionalProperties: true
|
|
|
|
V3Metadata:
|
|
type: object
|
|
additionalProperties:
|
|
type: string
|
|
nullable: true
|
|
|
|
V3ErrorResponse:
|
|
type: object
|
|
required:
|
|
- errorCode
|
|
- errorMessage
|
|
properties:
|
|
errorCode:
|
|
$ref: '#/components/schemas/V3ErrorsEnum'
|
|
errorMessage:
|
|
type: string
|
|
example: '[VALIDATION] missing required config field: pollingPeriod'
|
|
details:
|
|
type: string
|
|
V3ErrorsEnum:
|
|
type: string
|
|
enum:
|
|
- INTERNAL
|
|
- VALIDATION
|
|
- INVALID_ID
|
|
- MISSING_OR_INVALID_BODY
|
|
- CONFLICT
|
|
- NOT_FOUND
|
|
example: VALIDATION
|