API Reference
Formance Stack API (v2.0.0)
Download OpenAPI specification:Download
Open, modular foundation for unique payments flows
Formance Stack offers one forms of authentication:
- OAuth2 OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.
Response samples
- 200
{- "data": [
- {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
]
}
Create client
Authorizations:
Request Body schema: application/json
public | boolean |
redirectUris | Array of strings |
description | string |
name required | string |
trusted | boolean |
postLogoutRedirectUris | Array of strings |
object (Metadata) | |
scopes | Array of strings |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
]
}
Response samples
- 201
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Response samples
- 200
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Update client
Authorizations:
path Parameters
clientId required | string Client ID |
Request Body schema: application/json
public | boolean |
redirectUris | Array of strings |
description | string |
name required | string |
trusted | boolean |
postLogoutRedirectUris | Array of strings |
object (Metadata) | |
scopes | Array of strings |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
]
}
Response samples
- 200
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Add a secret to a client
Authorizations:
path Parameters
clientId required | string Client ID |
Request Body schema: application/json
name required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "name": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "data": {
- "name": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "lastDigits": "string",
- "clear": "string"
}
}
Response samples
- 200
{- "data": [
- {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
]
}
Create client
Authorizations:
Request Body schema: application/json
public | boolean |
redirectUris | Array of strings |
description | string |
name required | string |
trusted | boolean |
postLogoutRedirectUris | Array of strings |
object (Metadata) | |
scopes | Array of strings |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
]
}
Response samples
- 201
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Response samples
- 200
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Update client
Authorizations:
path Parameters
clientId required | string Client ID |
Request Body schema: application/json
public | boolean |
redirectUris | Array of strings |
description | string |
name required | string |
trusted | boolean |
postLogoutRedirectUris | Array of strings |
object (Metadata) | |
scopes | Array of strings |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
]
}
Response samples
- 200
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "scopes": [
- "string"
], - "id": "string",
- "secrets": [
- {
- "lastDigits": "string",
- "name": "string",
- "id": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
]
}
}
Add a secret to a client
Authorizations:
path Parameters
clientId required | string Client ID |
Request Body schema: application/json
name required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "name": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "data": {
- "name": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "lastDigits": "string",
- "clear": "string"
}
}
Get information about a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Responses
Response samples
- 200
- default
{- "data": {
- "name": "ledger001",
- "storage": {
- "migrations": [
- {
- "version": 11,
- "name": "migrations:001",
- "date": "2019-08-24T14:15:22Z",
- "state": "TO DO"
}
]
}
}
}
Count the accounts from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:.+ Filter accounts by address pattern (regular expression placed between ^ and $). |
object Example: Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2 |
Responses
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
List accounts from a ledger
List accounts from a ledger, sorted by address in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
page_size | integer <int64> [ 1 .. 1000 ] Deprecated Default: 15 Example: page_size=100 The maximum number of results to return per page.
Deprecated, please use |
after | string Example: after=users:003 Pagination cursor, will return accounts after given address, in descending order. |
address | string Example: address=users:.+ Filter accounts by address pattern (regular expression placed between ^ and $). |
object Example: Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | |
balance | integer <int64> Example: balance=2400 Filter accounts by their balance (default operator is gte) |
balanceOperator | string Enum: "gte" "lte" "gt" "lt" "e" "ne" Example: balanceOperator=gte Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. |
balance_operator | string Deprecated Enum: "gte" "lte" "gt" "lt" "e" "ne" Example: balance_operator=gte Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "address": "users:001",
- "type": "virtual",
- "metadata": {
- "admin": true,
- "a": {
- "nested": {
- "key": "value"
}
}
}
}
]
}
}
Get account by its address
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
Responses
Response samples
- 200
- default
{- "data": {
- "address": "users:001",
- "type": "virtual",
- "metadata": {
- "admin": true,
- "a": {
- "nested": {
- "key": "value"
}
}
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "balances": {
- "COIN": 100
}
}
}
Add metadata to an account
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
Request Body schema: application/jsonrequired
metadata
property name* additional property | any |
Responses
Request samples
- Payload
{- "property1": null,
- "property2": null
}
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
Update the mapping of a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/jsonrequired
required | Array of objects (Contract) | ||||
Array
|
Responses
Request samples
- Payload
{- "contracts": [
- {
- "account": "users:001",
- "expr": { }
}
]
}
Response samples
- 200
- default
{- "data": {
- "contracts": [
- {
- "account": "users:001",
- "expr": { }
}
]
}
}
Execute a Numscript Deprecated
This route is deprecated, and has been merged into POST /{ledger}/transactions
.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
preview | boolean Example: preview=true Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. |
Request Body schema: application/jsonrequired
plain required | string |
object | |
reference | string Reference to attach to the generated transaction |
object or null (Metadata1) |
Responses
Request samples
- Payload
{- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}, - "reference": "order_1234",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "account had insufficient funds",
- "transaction": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Get statistics from a ledger
Get statistics from a ledger. (aggregate metrics on accounts and transactions)
Authorizations:
path Parameters
ledger required | string Example: ledger001 name of the ledger |
Responses
Response samples
- 200
- default
{- "data": {
- "accounts": 0,
- "transactions": 0
}
}
Count the transactions from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
reference | string Example: reference=ref:001 Filter transactions by reference field. |
account | string Example: account=users:001 Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). |
source | string Example: source=users:001 Filter transactions with postings involving given account at source (regular expression placed between ^ and $). |
destination | string Example: destination=users:001 Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). |
startTime | string <date-time> Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). |
start_time | string <date-time> Deprecated Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use |
endTime | string <date-time> Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). |
end_time | string <date-time> Deprecated Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use |
metadata | object Example: Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. |
Responses
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
List transactions from a ledger
List transactions from a ledger, sorted by txid in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
page_size | integer <int64> [ 1 .. 1000 ] Deprecated Default: 15 Example: page_size=100 The maximum number of results to return per page.
Deprecated, please use |
after | string Example: after=1234 Pagination cursor, will return transactions after given txid (in descending order). |
reference | string Example: reference=ref:001 Find transactions by reference field. |
account | string Example: account=users:001 Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). |
source | string Example: source=users:001 Filter transactions with postings involving given account at source (regular expression placed between ^ and $). |
destination | string Example: destination=users:001 Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). |
startTime | string <date-time> Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). |
start_time | string <date-time> Deprecated Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use |
endTime | string <date-time> Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). |
end_time | string <date-time> Deprecated Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use |
object Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
}
Create a new transaction to a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
preview | boolean Example: preview=true Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. |
Request Body schema: application/jsonrequired
The request body must contain at least one of the following objects:
postings
: suitable for simple transactionsscript
: enabling more complex transactions with Numscript
timestamp | string <date-time> |
Array of objects (Posting) | |
object | |
reference | string |
object or null (Metadata1) |
Responses
Request samples
- Payload
{- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
- default
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
Get transaction from a ledger by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Set the metadata of a transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
Request Body schema: application/json
metadata
property name* additional property | any |
Responses
Request samples
- Payload
{- "property1": null,
- "property2": null
}
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
Revert a ledger transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
query Parameters
disableChecks | boolean Allow to disable balances checks |
Responses
Response samples
- 201
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Create a new batch of transactions to a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/jsonrequired
required | Array of objects (TransactionData) | ||||||||
Array
|
Responses
Request samples
- Payload
{- "transactions": [
- {
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "timestamp": "2019-08-24T14:15:22Z"
}
]
}
Response samples
- 200
- default
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
Get the balances from a ledger's account
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:001 Filter balances involving given account, either as source or destination. |
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 The maximum number of results to return per page. |
after | string Example: after=users:003 Pagination cursor, will return accounts after given address, in descending order. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
Deprecated, please use |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "account1": {
- "USD": 100,
- "EUR": 23
}, - "account2": {
- "CAD": 20,
- "JPY": 21
}
}
]
}
}
Get the aggregated balances from selected accounts
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:001 Filter balances involving given account, either as source or destination. |
useInsertionDate | boolean Use insertion date instead of effective date |
Responses
Response samples
- 200
- default
{- "data": {
- "USD": 100,
- "EUR": 12
}
}
List the logs from a ledger
List the logs from a ledger, sorted by ID in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
page_size | integer <int64> [ 1 .. 1000 ] Deprecated Default: 15 Example: page_size=100 The maximum number of results to return per page.
Deprecated, please use |
after | string Example: after=1234 Pagination cursor, will return the logs after a given ID. (in descending order). |
startTime | string <date-time> Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). |
start_time | string <date-time> Deprecated Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use |
endTime | string <date-time> Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). |
end_time | string <date-time> Deprecated Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": 1234,
- "type": "NEW_TRANSACTION",
- "data": { },
- "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e",
- "date": "2019-08-24T14:15:22Z"
}
]
}
}
List ledgers
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "name": "string",
- "addedAt": "2019-08-24T14:15:22Z",
- "bucket": "string",
- "metadata": {
- "admin": "true"
}
}
]
}
}
Create a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/json
bucket | string |
object (V2Metadata) |
Responses
Request samples
- Payload
{- "bucket": "string",
- "metadata": {
- "admin": "true"
}
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Update ledger metadata
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/json
property name* additional property | string |
Responses
Request samples
- Payload
{- "admin": "true"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Delete ledger metadata by key
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
key required | string Example: foo Key to remove. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Get information about a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Responses
Response samples
- 200
- default
{- "data": {
- "name": "ledger001",
- "storage": {
- "migrations": [
- {
- "version": 11,
- "name": "migrations:001",
- "date": "2019-08-24T14:15:22Z",
- "state": "TO DO"
}
]
}
}
}
Bulk request
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/json
action required | string |
ik | string |
object (V2PostTransaction) |
Responses
Request samples
- Payload
[- {
- "action": "string",
- "ik": "string",
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}
}
}
]
Response samples
- 200
- 400
- default
{- "data": [
- {
- "responseType": "string",
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true
}
}
]
}
Count the accounts from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pit | string <date-time> |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
List accounts from a ledger
List accounts from a ledger, sorted by address in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
expand | string |
pit | string <date-time> |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "address": "users:001",
- "metadata": {
- "admin": "true"
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "effectiveVolumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
]
}
}
Get account by its address
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
query Parameters
expand | string |
pit | string <date-time> |
Responses
Response samples
- 200
- default
{- "data": {
- "address": "users:001",
- "metadata": {
- "admin": "true"
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "effectiveVolumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
Add metadata to an account
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
query Parameters
dryRun | boolean Example: dryRun=true Set the dry run mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. |
header Parameters
Idempotency-Key | string Use an idempotency key |
Request Body schema: application/jsonrequired
metadata
property name* additional property | string |
Responses
Request samples
- Payload
{- "admin": "true"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Get statistics from a ledger
Get statistics from a ledger. (aggregate metrics on accounts and transactions)
Authorizations:
path Parameters
ledger required | string Example: ledger001 name of the ledger |
Responses
Response samples
- 200
- default
{- "data": {
- "accounts": 0,
- "transactions": 0
}
}
Count the transactions from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pit | string <date-time> |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
List transactions from a ledger
List transactions from a ledger, sorted by id in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
expand | string |
pit | string <date-time> |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
}
Create a new transaction to a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
dryRun | boolean Example: dryRun=true Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker. |
header Parameters
Idempotency-Key | string Use an idempotency key |
Request Body schema: application/jsonrequired
The request body must contain at least one of the following objects:
postings
: suitable for simple transactionsscript
: enabling more complex transactions with Numscript
timestamp | string <date-time> |
Array of objects (V2Posting) | |
object | |
reference | string |
required | object (V2Metadata) |
Responses
Request samples
- Payload
{- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}
}
Response samples
- 200
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true
}
}
Get transaction from a ledger by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
id required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
query Parameters
expand | string |
pit | string <date-time> |
Responses
Response samples
- 200
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Set the metadata of a transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
id required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
query Parameters
dryRun | boolean Example: dryRun=true Set the dryRun mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker. |
header Parameters
Idempotency-Key | string Use an idempotency key |
Request Body schema: application/json
metadata
property name* additional property | string |
Responses
Request samples
- Payload
{- "admin": "true"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Delete metadata by key
Delete metadata by key
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
id required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
key required | string Example: foo The key to remove. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Revert a ledger transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
id required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
query Parameters
force | boolean Force revert |
atEffectiveDate | boolean Revert transaction at effective date of the original tx |
Responses
Response samples
- 201
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true
}
}
Get the aggregated balances from selected accounts
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pit | string <date-time> |
useInsertionDate | boolean Use insertion date instead of effective date |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "data": {
- "USD": 100,
- "EUR": 12
}
}
Get list of volumes with balances for (account/asset)
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
endTime | string <date-time> |
startTime | string <date-time> |
insertionDate | boolean Use insertion date instead of effective date |
groupBy | integer <int64> [ 0 .. 1000 ] Example: groupBy=3 Group volumes and balance by the level of the segment of the address |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "account": "string",
- "asset": "string",
- "input": 0,
- "output": 0,
- "balance": 0
}
]
}
}
List the logs from a ledger
List the logs from a ledger, sorted by ID in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pit | string <date-time> |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": 1234,
- "type": "NEW_TRANSACTION",
- "data": { },
- "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e",
- "date": "2019-08-24T14:15:22Z"
}
]
}
}
Count the accounts from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:.+ Filter accounts by address pattern (regular expression placed between ^ and $). |
object Example: Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2 |
Responses
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
List accounts from a ledger
List accounts from a ledger, sorted by address in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
page_size | integer <int64> [ 1 .. 1000 ] Deprecated Default: 15 Example: page_size=100 The maximum number of results to return per page.
Deprecated, please use |
after | string Example: after=users:003 Pagination cursor, will return accounts after given address, in descending order. |
address | string Example: address=users:.+ Filter accounts by address pattern (regular expression placed between ^ and $). |
object Example: Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | |
balance | integer <int64> Example: balance=2400 Filter accounts by their balance (default operator is gte) |
balanceOperator | string Enum: "gte" "lte" "gt" "lt" "e" "ne" Example: balanceOperator=gte Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not. |
balance_operator | string Deprecated Enum: "gte" "lte" "gt" "lt" "e" "ne" Example: balance_operator=gte Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.
Deprecated, please use |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "address": "users:001",
- "type": "virtual",
- "metadata": {
- "admin": true,
- "a": {
- "nested": {
- "key": "value"
}
}
}
}
]
}
}
Get account by its address
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
Responses
Response samples
- 200
- default
{- "data": {
- "address": "users:001",
- "type": "virtual",
- "metadata": {
- "admin": true,
- "a": {
- "nested": {
- "key": "value"
}
}
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "balances": {
- "COIN": 100
}
}
}
Add metadata to an account
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
address required | string Example: users:001 Exact address of the account. It must match the following regular expressions pattern:
|
Request Body schema: application/jsonrequired
metadata
property name* additional property | any |
Responses
Request samples
- Payload
{- "property1": null,
- "property2": null
}
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
Update the mapping of a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/jsonrequired
required | Array of objects (Contract) | ||||
Array
|
Responses
Request samples
- Payload
{- "contracts": [
- {
- "account": "users:001",
- "expr": { }
}
]
}
Response samples
- 200
- default
{- "data": {
- "contracts": [
- {
- "account": "users:001",
- "expr": { }
}
]
}
}
Execute a Numscript Deprecated
This route is deprecated, and has been merged into POST /{ledger}/transactions
.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
preview | boolean Example: preview=true Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. |
Request Body schema: application/jsonrequired
plain required | string |
object | |
reference | string Reference to attach to the generated transaction |
object or null (Metadata1) |
Responses
Request samples
- Payload
{- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}, - "reference": "order_1234",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "account had insufficient funds",
- "transaction": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Get statistics from a ledger
Get statistics from a ledger. (aggregate metrics on accounts and transactions)
Authorizations:
path Parameters
ledger required | string Example: ledger001 name of the ledger |
Responses
Response samples
- 200
- default
{- "data": {
- "accounts": 0,
- "transactions": 0
}
}
Count the transactions from a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
reference | string Example: reference=ref:001 Filter transactions by reference field. |
account | string Example: account=users:001 Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). |
source | string Example: source=users:001 Filter transactions with postings involving given account at source (regular expression placed between ^ and $). |
destination | string Example: destination=users:001 Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). |
startTime | string <date-time> Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). |
start_time | string <date-time> Deprecated Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use |
endTime | string <date-time> Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). |
end_time | string <date-time> Deprecated Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use |
metadata | object Example: Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. |
Responses
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
List transactions from a ledger
List transactions from a ledger, sorted by txid in descending order.
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
page_size | integer <int64> [ 1 .. 1000 ] Deprecated Default: 15 Example: page_size=100 The maximum number of results to return per page.
Deprecated, please use |
after | string Example: after=1234 Pagination cursor, will return transactions after given txid (in descending order). |
reference | string Example: reference=ref:001 Find transactions by reference field. |
account | string Example: account=users:001 Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $). |
source | string Example: source=users:001 Filter transactions with postings involving given account at source (regular expression placed between ^ and $). |
destination | string Example: destination=users:001 Filter transactions with postings involving given account at destination (regular expression placed between ^ and $). |
startTime | string <date-time> Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). |
start_time | string <date-time> Deprecated Filter transactions that occurred after this timestamp.
The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
Deprecated, please use |
endTime | string <date-time> Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). |
end_time | string <date-time> Deprecated Filter transactions that occurred before this timestamp.
The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
Deprecated, please use |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
Deprecated, please use |
object Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
}
Create a new transaction to a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
preview | boolean Example: preview=true Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker. |
Request Body schema: application/jsonrequired
The request body must contain at least one of the following objects:
postings
: suitable for simple transactionsscript
: enabling more complex transactions with Numscript
timestamp | string <date-time> |
Array of objects (Posting) | |
object | |
reference | string |
object or null (Metadata1) |
Responses
Request samples
- Payload
{- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
- default
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
Get transaction from a ledger by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Set the metadata of a transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
Request Body schema: application/json
metadata
property name* additional property | any |
Responses
Request samples
- Payload
{- "property1": null,
- "property2": null
}
Response samples
- default
{- "errorCode": "INSUFFICIENT_FUND",
- "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds",
}
Revert a ledger transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <bigint> >= 0 Example: 1234 Transaction ID. |
query Parameters
disableChecks | boolean Allow to disable balances checks |
Responses
Response samples
- 201
- default
{- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
}
Create a new batch of transactions to a ledger
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
Request Body schema: application/jsonrequired
required | Array of objects (TransactionData) | ||||||||
Array
|
Responses
Request samples
- Payload
{- "transactions": [
- {
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "timestamp": "2019-08-24T14:15:22Z"
}
]
}
Response samples
- 200
- default
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": null,
- "property2": null
}, - "txid": 0,
- "preCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "orders:1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "orders:2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
Get the balances from a ledger's account
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:001 Filter balances involving given account, either as source or destination. |
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 The maximum number of results to return per page. |
after | string Example: after=users:003 Pagination cursor, will return accounts after given address, in descending order. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pagination_token | string Deprecated Example: pagination_token=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
Deprecated, please use |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "account1": {
- "USD": 100,
- "EUR": 23
}, - "account2": {
- "CAD": 20,
- "JPY": 21
}
}
]
}
}
Get the aggregated balances from selected accounts
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
query Parameters
address | string Example: address=users:001 Filter balances involving given account, either as source or destination. |
useInsertionDate | boolean Use insertion date instead of effective date |
Responses
Response samples
- 200
- default
{- "data": {
- "USD": 100,
- "EUR": 12
}
}
Create a payment
Create a payment
Authorizations:
Request Body schema: application/jsonrequired
reference required | string |
connectorID required | string |
createdAt required | string <date-time> |
amount required | integer <bigint> >= 0 |
type required | string (PaymentType) Enum: "PAY-IN" "PAYOUT" "TRANSFER" "OTHER" |
status required | string (PaymentStatus) Enum: "PENDING" "SUCCEEDED" "CANCELLED" "FAILED" "EXPIRED" "REFUNDED" "REFUNDED_FAILURE" "DISPUTE" "DISPUTE_WON" "DISPUTE_LOST" "OTHER" |
scheme required | string (PaymentScheme) Enum: "unknown" "other" "visa" "mastercard" "amex" "diners" "discover" "jcb" "unionpay" "alipay" "cup" "sepa debit" "sepa credit" "sepa" "apple pay" "google pay" "doku" "dragonpay" "maestro" "molpay" "a2a" "ach debit" "ach" "rtp" |
asset required | string |
sourceAccountID | string |
destinationAccountID | string |
Responses
Request samples
- Payload
{- "reference": "string",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 100,
- "type": "PAY-IN",
- "status": "PENDING",
- "scheme": "unknown",
- "asset": "USD",
- "sourceAccountID": "string",
- "destinationAccountID": "string"
}
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "reference": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "PAY-IN",
- "status": "PENDING",
- "initialAmount": 100,
- "amount": 100,
- "scheme": "unknown",
- "asset": "USD",
- "createdAt": "2019-08-24T14:15:22Z",
- "raw": { },
- "adjustments": [
- {
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "amount": 100,
- "raw": { }
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
List payments
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
query | string Filters used to filter resources. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "XXX",
- "reference": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "PAY-IN",
- "status": "PENDING",
- "initialAmount": 100,
- "amount": 100,
- "scheme": "unknown",
- "asset": "USD",
- "createdAt": "2019-08-24T14:15:22Z",
- "raw": { },
- "adjustments": [
- {
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "amount": 100,
- "raw": { }
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
Get a payment
Authorizations:
path Parameters
paymentId required | string Example: XXX The payment ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "reference": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "PAY-IN",
- "status": "PENDING",
- "initialAmount": 100,
- "amount": 100,
- "scheme": "unknown",
- "asset": "USD",
- "createdAt": "2019-08-24T14:15:22Z",
- "raw": { },
- "adjustments": [
- {
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "amount": 100,
- "raw": { }
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
Update metadata
Authorizations:
path Parameters
paymentId required | string Example: XXX The payment ID. |
Request Body schema: application/jsonrequired
property name* additional property | string |
Responses
Request samples
- Payload
{- "property1": "string",
- "property2": "string"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
List Transfer Initiations
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
query | string Filters used to filter resources. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "XXX",
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "scheduledAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "type": "TRANSFER",
- "amount": 0,
- "initialAmount": 0,
- "asset": "USD",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "relatedPayments": [
- {
- "paymentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string"
}
], - "relatedAdjustments": [
- {
- "adjustmentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
]
}
}
Create a TransferInitiation
Create a transfer initiation
Authorizations:
Request Body schema: application/jsonrequired
reference required | string |
scheduledAt required | string <date-time> |
description required | string |
sourceAccountID required | string |
destinationAccountID required | string |
connectorID | string |
provider | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" |
type required | string Enum: "TRANSFER" "PAYOUT" |
amount required | integer <bigint> |
asset required | string |
validated required | boolean |
object or null |
Responses
Request samples
- Payload
{- "reference": "XXX",
- "scheduledAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "TRANSFER",
- "amount": 0,
- "asset": "USD",
- "validated": true,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "scheduledAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "type": "TRANSFER",
- "amount": 0,
- "initialAmount": 0,
- "asset": "USD",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "relatedPayments": [
- {
- "paymentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string"
}
], - "relatedAdjustments": [
- {
- "adjustmentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
Get a transfer initiation
Authorizations:
path Parameters
transferId required | string Example: XXX The transfer ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "reference": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "scheduledAt": "2019-08-24T14:15:22Z",
- "description": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "type": "TRANSFER",
- "amount": 0,
- "initialAmount": 0,
- "asset": "USD",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "relatedPayments": [
- {
- "paymentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string"
}
], - "relatedAdjustments": [
- {
- "adjustmentID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "WAITING_FOR_VALIDATION",
- "error": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
Delete a transfer initiation
Delete a transfer initiation by its id.
Authorizations:
path Parameters
transferId required | string Example: XXX The transfer ID. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Update the status of a transfer initiation
Update a transfer initiation status
Authorizations:
path Parameters
transferId required | string Example: XXX The transfer ID. |
Request Body schema: application/jsonrequired
status required | string Enum: "WAITING_FOR_VALIDATION" "PROCESSING" "PROCESSED" "FAILED" "REJECTED" "VALIDATED" |
Responses
Request samples
- Payload
{- "status": "WAITING_FOR_VALIDATION"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Reverse a transfer initiation
Reverse transfer initiation
Authorizations:
path Parameters
transferId required | string Example: XXX The transfer ID. |
Request Body schema: application/jsonrequired
reference required | string |
description required | string |
amount required | integer <bigint> |
asset required | string |
required | object or null |
Responses
Request samples
- Payload
{- "reference": "XXX",
- "description": "string",
- "amount": 0,
- "asset": "USD",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Retry a failed transfer initiation
Retry a failed transfer initiation
Authorizations:
path Parameters
transferId required | string Example: XXX The transfer ID. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
List Pools
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
query | string Filters used to filter resources. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "string",
- "name": "string",
- "accounts": [
- "string"
]
}
]
}
}
Create a Pool
Create a Pool
Authorizations:
Request Body schema: application/jsonrequired
name required | string |
accountIDs required | Array of strings |
Responses
Request samples
- Payload
{- "name": "string",
- "accountIDs": [
- "string"
]
}
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "name": "string",
- "accounts": [
- "string"
]
}
}
Add an account to a pool
Add an account to a pool
Authorizations:
path Parameters
poolId required | string Example: XXX The pool ID. |
Request Body schema: application/jsonrequired
accountID required | string |
Responses
Request samples
- Payload
{- "accountID": "string"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Remove an account from a pool
Remove an account from a pool by its id.
Authorizations:
path Parameters
poolId required | string Example: XXX The pool ID. |
accountId required | string Example: XXX The account ID. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Create an account
Create an account
Authorizations:
Request Body schema: application/jsonrequired
reference required | string |
connectorID required | string |
createdAt required | string <date-time> |
type required | string (AccountType) Enum: "UNKNOWN" "INTERNAL" "EXTERNAL" |
defaultAsset | string |
accountName | string |
object or null (AccountMetadata) |
Responses
Request samples
- Payload
{- "reference": "string",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "type": "UNKNOWN",
- "defaultAsset": "string",
- "accountName": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "reference": "string",
- "connectorID": "string",
- "provider": "string",
- "defaultCurrency": "string",
- "defaultAsset": "string",
- "accountName": "string",
- "type": "UNKNOWN",
- "pools": [
- "string"
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "raw": { }
}
}
List accounts
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
query | string Filters used to filter resources. |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "reference": "string",
- "connectorID": "string",
- "provider": "string",
- "defaultCurrency": "string",
- "defaultAsset": "string",
- "accountName": "string",
- "type": "UNKNOWN",
- "pools": [
- "string"
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "raw": { }
}
]
}
}
Get an account
Authorizations:
path Parameters
accountId required | string Example: XXX The account ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "reference": "string",
- "connectorID": "string",
- "provider": "string",
- "defaultCurrency": "string",
- "defaultAsset": "string",
- "accountName": "string",
- "type": "UNKNOWN",
- "pools": [
- "string"
], - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "raw": { }
}
}
Get account balances
Authorizations:
path Parameters
accountId required | string Example: XXX The account ID. |
query Parameters
limit | integer <int64> The maximum number of results to return per page. |
asset | string Filter balances by currency. If not specified, all account's balances will be returned. |
from | string <date-time> Filter balances by date. If not specified, all account's balances will be returned. |
to | string <date-time> Filter balances by date. If not specified, default will be set to now. |
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "accountId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z",
- "currency": "string",
- "asset": "string",
- "balance": 0
}
]
}
}
Create a BankAccount in Payments and on the PSP
Create a bank account in Payments and on the PSP.
Authorizations:
Request Body schema: application/jsonrequired
country required | string |
connectorID required | string |
name required | string |
accountNumber | string |
iban | string |
swiftBicCode | string |
object or null (BankAccountMetadata) |
Responses
Request samples
- Payload
{- "country": "GB",
- "connectorID": "string",
- "name": "My account",
- "accountNumber": "string",
- "iban": "string",
- "swiftBicCode": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "country": "string",
- "connectorID": "string",
- "accountID": "string",
- "provider": "string",
- "iban": "string",
- "accountNumber": "string",
- "swiftBicCode": "string",
- "relatedAccounts": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": "string",
- "connectorID": "string",
- "accountID": "string"
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
List bank accounts created by user on Formance
List all bank accounts created by user on Formance.
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
sort | Array of strings Example: sort=date:asc&sort=status:desc Fields used to sort payments (default is date:desc). |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "string",
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "country": "string",
- "connectorID": "string",
- "accountID": "string",
- "provider": "string",
- "iban": "string",
- "accountNumber": "string",
- "swiftBicCode": "string",
- "relatedAccounts": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": "string",
- "connectorID": "string",
- "accountID": "string"
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
Get a bank account created by user on Formance
Authorizations:
path Parameters
bankAccountId required | string Example: XXX The bank account ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "country": "string",
- "connectorID": "string",
- "accountID": "string",
- "provider": "string",
- "iban": "string",
- "accountNumber": "string",
- "swiftBicCode": "string",
- "relatedAccounts": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": "string",
- "connectorID": "string",
- "accountID": "string"
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
Forward a bank account to a connector
Authorizations:
path Parameters
bankAccountId required | string Example: XXX The bank account ID. |
Request Body schema: application/jsonrequired
connectorID required | string |
Responses
Request samples
- Payload
{- "connectorID": "string"
}
Response samples
- 200
- default
{- "data": {
- "id": "string",
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "country": "string",
- "connectorID": "string",
- "accountID": "string",
- "provider": "string",
- "iban": "string",
- "accountNumber": "string",
- "swiftBicCode": "string",
- "relatedAccounts": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": "string",
- "connectorID": "string",
- "accountID": "string"
}
], - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
Update metadata of a bank account
Authorizations:
path Parameters
bankAccountId required | string Example: XXX The bank account ID. |
Request Body schema: application/jsonrequired
required | object or null (BankAccountMetadata) | ||
|
Responses
Request samples
- Payload
{- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Install a connector
Install a connector by its name and config.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
Request Body schema: application/jsonrequired
name required | string |
pollingPeriod | string Default: "120s" The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API. |
apiKey required | string |
pageSize | integer <int64> >= 0 Default: 10 Number of BalanceTransaction to fetch at each polling interval. |
Responses
Request samples
- Payload
{- "name": "My Stripe Account",
- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
Response samples
- 201
- default
{- "data": {
- "connectorID": "string"
}
}
Uninstall a connector Deprecated
Uninstall a connector by its name.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Uninstall a connector
Uninstall a connector by its name.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Read the config of a connector Deprecated
Read connector config
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
Responses
Response samples
- 200
- default
{- "data": {
- "name": "My Stripe Account",
- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
}
Update the config of a connector
Update connector config
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
Request Body schema: application/jsonrequired
name required | string |
pollingPeriod | string Default: "120s" The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API. |
apiKey required | string |
pageSize | integer <int64> >= 0 Default: 10 Number of BalanceTransaction to fetch at each polling interval. |
Responses
Request samples
- Payload
{- "name": "My Stripe Account",
- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Read the config of a connector
Read connector config
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "name": "My Stripe Account",
- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
}
Reset a connector Deprecated
Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
Reset a connector
Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] missing reference"
}
List tasks from a connector Deprecated
List all tasks associated with this connector.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "state": { },
- "error": "string",
- "descriptor": {
- "name": "string",
- "main": true,
- "account": "string"
}
}
]
}
}
List tasks from a connector
List all tasks associated with this connector.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "state": { },
- "error": "string",
- "descriptor": {
- "name": "string",
- "main": true,
- "account": "string"
}
}
]
}
}
Read a specific task of the connector Deprecated
Get a specific task associated to the connector.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
taskId required | string Example: task1 The task ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "state": { },
- "error": "string",
- "descriptor": {
- "name": "string",
- "main": true,
- "account": "string"
}
}
}
Read a specific task of the connector
Get a specific task associated to the connector.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
connectorId required | string Example: XXX The connector ID. |
taskId required | string Example: task1 The task ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "PENDING",
- "state": { },
- "error": "string",
- "descriptor": {
- "name": "string",
- "main": true,
- "account": "string"
}
}
}
Transfer funds between Connector accounts
Execute a transfer between two accounts.
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" "MANGOPAY" "MONEYCORP" "ATLAR" "ADYEN" "GENERIC" The name of the connector. |
Request Body schema: application/jsonrequired
amount required | integer <bigint> >= 0 |
asset required | string |
destination required | string |
source | string |
Responses
Request samples
- Payload
{- "amount": 100,
- "asset": "USD",
- "destination": "acct_1Gqj58KZcSIg2N2q",
- "source": "acct_1Gqj58KZcSIg2N2q"
}
Response samples
- 200
- default
{- "id": "string"
}
Search
ElasticSearch query engine
Authorizations:
Request Body schema: application/jsonrequired
ledgers | Array of strings |
after | Array of strings |
pageSize | integer <int64> >= 0 |
terms | Array of strings |
sort | string |
policy | string |
target | string |
cursor | string |
raw | object |
Responses
Request samples
- Payload
{- "ledgers": [
- "quickstart"
], - "after": [
- "users:002"
], - "pageSize": 0,
- "terms": [
- "destination=central_bank1"
], - "sort": "id:asc",
- "policy": "OR",
- "target": "string",
- "cursor": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "raw": {
- "query": {
- "match_all": { }
}
}
}
Response samples
- 200
{- "data": { },
- "cursor": {
- "pageSize": 0,
- "hasMore": true,
- "total": {
- "value": 1,
- "relation": "eq"
}, - "next": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "data": [
- { }
]
}
}
getTransactions
Authorizations:
query Parameters
pageSize | integer [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page |
walletID | string Example: walletID=wallet1 A wallet ID to filter on |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when the cursor is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "ledger": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "id": 0,
- "preCommitVolumes": {
- "property1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "property2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}, - "postCommitVolumes": {
- "property1": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "property2": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}
]
}
}
List all wallets
Authorizations:
query Parameters
name | string Example: name=wallet1 Filter on wallet name |
metadata | object Example: metadata[admin]=true Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. |
pageSize | integer [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when the pagination token is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "ledger": "string"
}
]
}
}
Create a new wallet
Authorizations:
Request Body schema: application/json
required | object Custom metadata to attach to this wallet. |
name required | string |
Responses
Request samples
- Payload
{- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string"
}
Response samples
- 201
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "ledger": "string"
}
}
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "balances": {
- "main": {
- "assets": {
- "property1": 0,
- "property2": 0
}
}
}, - "ledger": "string"
}
}
Update a wallet
Authorizations:
path Parameters
id required | string |
Request Body schema: application/json
required | object Custom metadata to attach to this wallet. | ||
|
Responses
Request samples
- Payload
{- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "string"
}
Response samples
- 200
- default
{- "balances": [
- {
- "name": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "priority": 0,
- "assets": {
- "property1": 0,
- "property2": 0
}
}
], - "availableFunds": {
- "property1": 0,
- "property2": 0
}, - "expiredFunds": {
- "property1": 0,
- "property2": 0
}, - "expirableFunds": {
- "property1": 0,
- "property2": 0
}, - "holdFunds": {
- "property1": 0,
- "property2": 0
}
}
Response samples
- 200
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "name": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "priority": 0
}
]
}
}
Create a balance
Authorizations:
path Parameters
id required | string |
Request Body schema: application/json
name required | string |
expiresAt | string <date-time> |
priority | integer <bigint> |
Responses
Request samples
- Payload
{- "name": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "priority": 0
}
Response samples
- 201
- default
{- "data": {
- "name": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "priority": 0
}
}
Debit a wallet
Authorizations:
path Parameters
id required | string |
Request Body schema: application/json
required | object (Monetary) |
pending | boolean Set to true to create a pending hold. If false, the wallet will be debited immediately. |
required | object Metadata associated with the wallet. |
description | string |
any (Subject) | |
balances | Array of strings |
timestamp | string <date-time> cannot be used in conjunction with |
Responses
Request samples
- Payload
{- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "pending": true
}
Response samples
- 201
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "walletID": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "destination": {
- "type": "string",
- "identifier": "string"
}
}
}
Credit a wallet
Authorizations:
path Parameters
id required | string |
Request Body schema: application/json
required | object (Monetary) |
required | object Metadata associated with the wallet. |
reference | string |
required | Array of any (Subject) |
balance | string The balance to credit |
timestamp | string <date-time> |
Responses
Request samples
- Payload
{- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "sources": [ ]
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "string"
}
Get all holds for a wallet
Authorizations:
query Parameters
pageSize | integer [ 1 .. 1000 ] Default: 15 Example: pageSize=100 The maximum number of results to return per page |
walletID | string Example: walletID=wallet1 The wallet to filter on |
metadata | object Example: metadata[admin]=true Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when the pagination token is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "walletID": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "destination": {
- "type": "string",
- "identifier": "string"
}
}
]
}
}
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "walletID": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "destination": {
- "type": "string",
- "identifier": "string"
}, - "remaining": 10,
- "originalAmount": 100
}
}
Confirm a hold
Authorizations:
path Parameters
hold_id required | string |
Request Body schema: application/json
amount | integer <bigint> Define the amount to transfer. |
final | boolean Define a final confirmation. Remaining funds will be returned to the wallet. |
Responses
Request samples
- Payload
{- "amount": 100,
- "final": true
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "string"
}
Get many configs
Sorted by updated date descending
Authorizations:
query Parameters
id | string Example: id=4997257d-dfb6-445b-929c-cbe2ab182818 Optional filter by Config ID |
endpoint | string Example: endpoint=https://example.com Optional filter by endpoint URL |
Responses
Response samples
- 200
- default
{- "cursor": {
- "hasMore": false,
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}
Insert a new config
Insert a new webhooks config.
The endpoint should be a valid https URL and be unique.
The secret is the endpoint's verification secret. If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
All eventTypes are converted to lower-case when inserted.
Authorizations:
Request Body schema: application/jsonrequired
name | string |
endpoint required | string |
secret | string |
eventTypes required | Array of strings |
Responses
Request samples
- Payload
{- "name": "customer_payment",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
]
}
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
Delete one config
Delete a webhooks config by ID.
Authorizations:
path Parameters
id required | string Example: 4997257d-dfb6-445b-929c-cbe2ab182818 Config ID |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
Test one config
Test a config by sending a webhook to its endpoint.
Authorizations:
path Parameters
id required | string Example: 4997257d-dfb6-445b-929c-cbe2ab182818 Config ID |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "webhookID": "ed6f2707-2d7c-4644-ad05-94c5b6604899",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "config": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "payload": "{\"data\":\"test\"}",
- "statusCode": 200,
- "retryAttempt": 1,
- "status": "success",
- "nextRetryAfter": "2019-08-24T14:15:22Z"
}
}
Activate one config
Activate a webhooks config by ID, to start receiving webhooks to its endpoint.
Authorizations:
path Parameters
id required | string Example: 4997257d-dfb6-445b-929c-cbe2ab182818 Config ID |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
Deactivate one config
Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint.
Authorizations:
path Parameters
id required | string Example: 4997257d-dfb6-445b-929c-cbe2ab182818 Config ID |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
Change the signing secret of a config
Change the signing secret of the endpoint of a webhooks config.
If not passed or empty, a secret is automatically generated. The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
Authorizations:
path Parameters
id required | string Example: 4997257d-dfb6-445b-929c-cbe2ab182818 Config ID |
Request Body schema: application/json
secret required | string |
Responses
Request samples
- Payload
{- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"
}
Response samples
- 200
- default
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
- "eventTypes": [
- "TYPE1",
- "TYPE2"
], - "active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
List triggers
List triggers
Authorizations:
query Parameters
name | string search by name |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}
Create trigger
Create trigger
Authorizations:
Request Body schema: application/json
event required | string |
workflowID required | string |
filter | string |
object | |
name | string |
Responses
Request samples
- Payload
{- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string"
}
Response samples
- 201
- default
{- "data": {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
}
Read trigger
Read trigger
Authorizations:
path Parameters
triggerID required | string The trigger id |
Responses
Response samples
- 200
- default
{- "data": {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
}
List triggers occurrences
List triggers occurrences
Authorizations:
path Parameters
triggerID required | string The trigger id |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "date": "2019-08-24T14:15:22Z",
- "workflowInstanceID": "string",
- "workflowInstance": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}, - "triggerID": "string",
- "event": { },
- "error": "string"
}
]
}
Response samples
- 200
- default
{- "data": [
- {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
]
}
Create workflow
Create a workflow
Authorizations:
Request Body schema: application/json
name | string |
required | Array of objects |
Responses
Request samples
- Payload
{- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}
Response samples
- 201
- default
{- "data": {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
}
Get a flow by id
Get a flow by id
Authorizations:
path Parameters
flowId required | string Example: xxx The flow id |
Responses
Response samples
- 200
- default
{- "data": {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
}
Run workflow
Run workflow
Authorizations:
path Parameters
workflowID required | string Example: xxx The flow id |
query Parameters
wait | boolean Wait end of the workflow before return |
Request Body schema: application/json
property name* additional property | string |
Responses
Request samples
- Payload
{- "property1": "string",
- "property2": "string"
}
Response samples
- 201
- default
{- "data": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
}
List instances of a workflow
List instances of a workflow
Authorizations:
query Parameters
workflowID | string Example: workflowID=xxx A workflow id |
running | boolean Example: running=true Filter running instances |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
]
}
Get a workflow instance by id
Get a workflow instance by id
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Responses
Response samples
- 200
- default
{- "data": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
}
Send an event to a running workflow
Send an event to a running workflow
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Request Body schema: application/json
name required | string |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "string"
}
Get a workflow instance history by id
Get a workflow instance history by id
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "name": "string",
- "input": {
- "amount": {
- "asset": "string",
- "amount": 0
}, - "destination": {
- "wallet": {
- "id": "string",
- "balance": "string"
}, - "account": {
- "id": "string",
- "ledger": "string"
}, - "payment": {
- "psp": "string"
}
}, - "source": {
- "wallet": {
- "id": "string",
- "balance": "string"
}, - "account": {
- "id": "string",
- "ledger": "string"
}, - "payment": {
- "id": "string"
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "timestamp": "2019-08-24T14:15:22Z"
}, - "error": "string",
- "terminated": true,
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z"
}
]
}
Get a workflow instance stage history
Get a workflow instance stage history
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
number required | integer The stage number |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "name": "string",
- "input": {
- "GetAccount": {
- "id": "string",
- "ledger": "string"
}, - "CreateTransaction": {
- "ledger": "string",
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}
}
}, - "RevertTransaction": {
- "ledger": "string",
- "id": "string"
}, - "StripeTransfer": {
- "connectorID": "string",
- "amount": 100,
- "asset": "USD",
- "destination": "acct_1Gqj58KZcSIg2N2q",
- "waitingValidation": false,
- "metadata": {
- "order_id": "6735"
}
}, - "GetPayment": {
- "id": "string"
}, - "ConfirmHold": {
- "id": "string"
}, - "CreditWallet": {
- "id": "string",
- "data": {
- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "sources": [ ]
}
}, - "DebitWallet": {
- "id": "string",
- "data": {
- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "pending": true
}
}, - "GetWallet": {
- "id": "string"
}, - "VoidHold": {
- "id": "string"
}, - "ListWallets": {
- "name": "string"
}
}, - "output": {
- "GetAccount": {
- "data": {
- "address": "users:001",
- "metadata": {
- "admin": "true"
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "effectiveVolumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}, - "CreateTransaction": {
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true
}
}, - "RevertTransaction": {
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "id": 0,
- "reverted": true
}
}, - "GetPayment": {
- "data": {
- "id": "XXX",
- "reference": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "PAY-IN",
- "status": "PENDING",
- "initialAmount": 100,
- "scheme": "visa",
- "asset": "USD",
- "createdAt": "2019-08-24T14:15:22Z",
- "raw": { },
- "adjustments": [
- {
- "status": "PENDING",
- "amount": 100,
- "date": "2019-08-24T14:15:22Z",
- "raw": { },
- "absolute": true
}
], - "metadata": {
- "key": "string"
}
}
}, - "DebitWallet": {
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "walletID": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "destination": {
- "type": "string",
- "identifier": "string"
}
}
}, - "GetWallet": {
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "balances": {
- "main": {
- "assets": {
- "property1": 0,
- "property2": 0
}
}
}, - "ledger": "string"
}
}, - "ListWallets": {
- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "ledger": "string"
}
]
}
}
}, - "error": "string",
- "terminated": true,
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "lastFailure": "string",
- "attempt": 0,
- "nextExecution": "2019-08-24T14:15:22Z"
}
]
}
List triggers
List triggers
Authorizations:
query Parameters
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
name | string search by name |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
}
}
Create trigger
Create trigger
Authorizations:
Request Body schema: application/json
event required | string |
workflowID required | string |
filter | string |
object | |
name | string |
Responses
Request samples
- Payload
{- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string"
}
Response samples
- 201
- default
{- "data": {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
}
Read trigger
Read trigger
Authorizations:
path Parameters
triggerID required | string The trigger id |
Responses
Response samples
- 200
- default
{- "data": {
- "event": "string",
- "workflowID": "string",
- "filter": "string",
- "vars": { },
- "name": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
}
Test trigger
Test trigger
Authorizations:
path Parameters
triggerID required | string The trigger id |
Request Body schema: application/json
property name* additional property | any |
Responses
Request samples
- Payload
{ }
Response samples
- 200
- default
{- "data": {
- "filter": {
- "match": true,
- "error": "string"
}, - "variables": {
- "property1": {
- "value": "string",
- "error": "string"
}, - "property2": {
- "value": "string",
- "error": "string"
}
}
}
}
List triggers occurrences
List triggers occurrences
Authorizations:
path Parameters
triggerID required | string The trigger id |
query Parameters
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "date": "2019-08-24T14:15:22Z",
- "workflowInstanceID": "string",
- "workflowInstance": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}, - "triggerID": "string",
- "error": "string",
- "event": { }
}
]
}
}
List registered workflows
List registered workflows
Authorizations:
query Parameters
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
]
}
}
Create workflow
Create a workflow
Authorizations:
Request Body schema: application/json
name | string |
required | Array of objects |
Responses
Request samples
- Payload
{- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}
Response samples
- 201
- default
{- "data": {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
}
Get a flow by id
Get a flow by id
Authorizations:
path Parameters
flowId required | string Example: xxx The flow id |
Responses
Response samples
- 200
- default
{- "data": {
- "config": {
- "name": "string",
- "stages": [
- {
- "property1": null,
- "property2": null
}
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string"
}
}
Run workflow
Run workflow
Authorizations:
path Parameters
workflowID required | string Example: xxx The flow id |
query Parameters
wait | boolean Wait end of the workflow before return |
Request Body schema: application/json
property name* additional property | string |
Responses
Request samples
- Payload
{- "property1": "string",
- "property2": "string"
}
Response samples
- 201
- default
{- "data": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
}
List instances of a workflow
List instances of a workflow
Authorizations:
query Parameters
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
workflowID | string Example: workflowID=xxx A workflow id |
running | boolean Example: running=true Filter running instances |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
]
}
}
Get a workflow instance by id
Get a workflow instance by id
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Responses
Response samples
- 200
- default
{- "data": {
- "workflowID": "string",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": [
- {
- "stage": 0,
- "instanceID": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
], - "terminated": true,
- "terminatedAt": "2019-08-24T14:15:22Z",
- "error": "string"
}
}
Send an event to a running workflow
Send an event to a running workflow
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Request Body schema: application/json
name required | string |
Responses
Request samples
- Payload
{- "name": "string"
}
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "string"
}
Get a workflow instance history by id
Get a workflow instance history by id
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "name": "string",
- "input": {
- "amount": {
- "asset": "string",
- "amount": 0
}, - "destination": {
- "wallet": {
- "id": "string",
- "balance": "string"
}, - "account": {
- "id": "string",
- "ledger": "string"
}, - "payment": {
- "psp": "string"
}
}, - "source": {
- "wallet": {
- "id": "string",
- "balance": "string"
}, - "account": {
- "id": "string",
- "ledger": "string"
}, - "payment": {
- "id": "string"
}
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "timestamp": "2019-08-24T14:15:22Z"
}, - "error": "string",
- "terminated": true,
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z"
}
]
}
Get a workflow instance stage history
Get a workflow instance stage history
Authorizations:
path Parameters
instanceID required | string Example: xxx The instance id |
number required | integer The stage number |
Responses
Response samples
- 200
- default
{- "data": [
- {
- "name": "string",
- "input": {
- "GetAccount": {
- "id": "string",
- "ledger": "string"
}, - "CreateTransaction": {
- "ledger": "string",
- "data": {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "script": {
- "plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
- "vars": {
- "user": "users:042"
}
}, - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}
}
}, - "StripeTransfer": {
- "connectorID": "string",
- "amount": 100,
- "asset": "USD",
- "destination": "acct_1Gqj58KZcSIg2N2q",
- "waitingValidation": false,
- "metadata": {
- "order_id": "6735"
}
}, - "GetPayment": {
- "id": "string"
}, - "ConfirmHold": {
- "id": "string"
}, - "CreditWallet": {
- "id": "string",
- "data": {
- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "sources": [ ]
}
}, - "DebitWallet": {
- "id": "string",
- "data": {
- "amount": {
- "asset": "USD/2",
- "amount": 100
}, - "metadata": {
- "key": ""
}, - "pending": true
}
}, - "GetWallet": {
- "id": "string"
}, - "VoidHold": {
- "id": "string"
}, - "ListWallets": {
- "name": "string"
}
}, - "output": {
- "GetAccount": {
- "data": {
- "address": "users:001",
- "metadata": {
- "admin": "true"
}, - "volumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}, - "effectiveVolumes": {
- "USD": {
- "input": 100,
- "output": 10,
- "balance": 90
}, - "EUR": {
- "input": 100,
- "output": 10,
- "balance": 90
}
}
}
}, - "CreateTransaction": {
- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "postings": [
- {
- "amount": 100,
- "asset": "COIN",
- "destination": "users:002",
- "source": "users:001"
}
], - "reference": "ref:001",
- "metadata": {
- "admin": "true"
}, - "txid": 0
}
]
}, - "GetPayment": {
- "data": {
- "id": "XXX",
- "reference": "string",
- "sourceAccountID": "string",
- "destinationAccountID": "string",
- "connectorID": "string",
- "provider": "STRIPE",
- "type": "PAY-IN",
- "status": "PENDING",
- "initialAmount": 100,
- "scheme": "visa",
- "asset": "USD",
- "createdAt": "2019-08-24T14:15:22Z",
- "raw": { },
- "adjustments": [
- {
- "status": "PENDING",
- "amount": 100,
- "date": "2019-08-24T14:15:22Z",
- "raw": { },
- "absolute": true
}
], - "metadata": {
- "key": "string"
}
}
}, - "DebitWallet": {
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "walletID": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "destination": {
- "type": "string",
- "identifier": "string"
}
}
}, - "GetWallet": {
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "balances": {
- "main": {
- "assets": {
- "property1": 0,
- "property2": 0
}
}
}, - "ledger": "string"
}
}, - "ListWallets": {
- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "ledger": "string"
}
]
}
}
}, - "error": "string",
- "terminated": true,
- "startedAt": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "lastFailure": "string",
- "attempt": 0,
- "nextExecution": "2019-08-24T14:15:22Z"
}
]
}
Create a policy
Create a policy
Authorizations:
Request Body schema: application/jsonrequired
name required | string |
ledgerName required | string |
required | object |
paymentsPoolID required | string |
Responses
Request samples
- Payload
{- "name": "XXX",
- "ledgerName": "default",
- "ledgerQuery": { },
- "paymentsPoolID": "XXX"
}
Response samples
- 201
- default
{- "data": {
- "id": "XXX",
- "name": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "ledgerName": "default",
- "ledgerQuery": { },
- "paymentsPoolID": "XXX"
}
}
List policies
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "XXX",
- "name": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "ledgerName": "default",
- "ledgerQuery": { },
- "paymentsPoolID": "XXX"
}
]
}
}
Get a policy
Authorizations:
path Parameters
policyID required | string Example: XXX The policy ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "name": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "ledgerName": "default",
- "ledgerQuery": { },
- "paymentsPoolID": "XXX"
}
}
Reconcile using a policy
Reconcile using a policy
Authorizations:
path Parameters
policyID required | string Example: XXX The policy ID. |
Request Body schema: application/jsonrequired
reconciledAtLedger required | string <date-time> |
reconciledAtPayments required | string <date-time> |
Responses
Request samples
- Payload
{- "reconciledAtLedger": "2021-01-01T00:00:00.000Z",
- "reconciledAtPayments": "2021-01-01T00:00:00.000Z"
}
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "policyID": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "reconciledAtLedger": "2021-01-01T00:00:00.000Z",
- "reconciledAtPayments": "2021-01-01T00:00:00.000Z",
- "status": "COMPLETED",
- "paymentsBalances": {
- "property1": 0,
- "property2": 0
}, - "ledgerBalances": {
- "property1": 0,
- "property2": 0
}, - "driftBalances": {
- "property1": 0,
- "property2": 0
}, - "error": "string"
}
}
List reconciliations
Authorizations:
query Parameters
pageSize | integer <int64> [ 1 .. 1000 ] Example: pageSize=100 The maximum number of results to return per page. |
cursor | string Example: cursor=aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
Responses
Response samples
- 200
- default
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "XXX",
- "policyID": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "reconciledAtLedger": "2021-01-01T00:00:00.000Z",
- "reconciledAtPayments": "2021-01-01T00:00:00.000Z",
- "status": "COMPLETED",
- "paymentsBalances": {
- "property1": 0,
- "property2": 0
}, - "ledgerBalances": {
- "property1": 0,
- "property2": 0
}, - "driftBalances": {
- "property1": 0,
- "property2": 0
}, - "error": "string"
}
]
}
}
Get a reconciliation
Authorizations:
path Parameters
reconciliationID required | string Example: XXX The reconciliation ID. |
Responses
Response samples
- 200
- default
{- "data": {
- "id": "XXX",
- "policyID": "XXX",
- "createdAt": "2021-01-01T00:00:00.000Z",
- "reconciledAtLedger": "2021-01-01T00:00:00.000Z",
- "reconciledAtPayments": "2021-01-01T00:00:00.000Z",
- "status": "COMPLETED",
- "paymentsBalances": {
- "property1": 0,
- "property2": 0
}, - "ledgerBalances": {
- "property1": 0,
- "property2": 0
}, - "driftBalances": {
- "property1": 0,
- "property2": 0
}, - "error": "string"
}
}