Formance Stack API (v1.0.20230523)
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
}, - "id": "string",
- "scopes": [
- "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) |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 201
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "scopes": [
- "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
}, - "id": "string",
- "scopes": [
- "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) |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "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
}, - "id": "string",
- "scopes": [
- "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"
}
}
Create scope
Create scope
Authorizations:
Request Body schema: application/json
label required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 201
{- "data": {
- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "transient": [
- "string"
]
}
}
Update scope
Update scope
Authorizations:
path Parameters
scopeId required | string Scope ID |
Request Body schema: application/json
label required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "data": {
- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "transient": [
- "string"
]
}
}
Response samples
- 200
{- "data": [
- {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "scopes": [
- "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) |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 201
{- "data": {
- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "string"
], - "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "scopes": [
- "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
}, - "id": "string",
- "scopes": [
- "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) |
Responses
Request samples
- Payload
{- "public": true,
- "redirectUris": [
- "string"
], - "description": "string",
- "name": "string",
- "trusted": true,
- "postLogoutRedirectUris": [
- "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
}, - "id": "string",
- "scopes": [
- "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"
}
}
Create scope
Create scope
Authorizations:
Request Body schema: application/json
label required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 201
{- "data": {
- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "transient": [
- "string"
]
}
}
Update scope
Update scope
Authorizations:
path Parameters
scopeId required | string Scope ID |
Request Body schema: application/json
label required | string |
object (Metadata) |
Responses
Request samples
- Payload
{- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
{- "data": {
- "label": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "id": "string",
- "transient": [
- "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 $). |
metadata | object Example: metadata[admin]=true 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": "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. |
address | string Example: address=users:.+ Filter accounts by address pattern (regular expression placed between ^ and $). |
metadata | object Example: metadata[admin]=true 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. |
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": [
- {
- "address": "users:001",
- "metadata": {
- "admin": "true"
}
}
]
}
}
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"
}, - "volumes": {
- "COIN": {
- "input": 100,
- "output": 0
}
}, - "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:
|
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. |
async | boolean Example: async=true Set async mode. |
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",
}
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). |
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). |
metadata | object Example: metadata[admin]=true Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below. |
Responses
Response samples
- default
{- "errorCode": "VALIDATION",
- "errorMessage": "[VALIDATION] invalid 'cursor' query param",
}
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 ] Example: pageSize=100 The maximum number of results to return per page. |
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). |
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). |
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. |
metadata | object Example: metadata[admin]=true Filter transactions by metadata key value pairs. |
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": {
- "admin": "true"
}, - "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
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. |
async | boolean Example: async=true Set async mode. |
header Parameters
Idempotency-Key | string Use an idempotency key |
Request Body schema: application/json
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 |
required | object (ledgerMetadata) |
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"
}, - "txid": 0
}
}
Get transaction from a ledger by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <int64> >= 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": {
- "admin": "true"
}, - "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 <int64> >= 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. |
async | boolean Example: async=true Set async mode. |
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",
}
Revert a ledger transaction by its ID
Authorizations:
path Parameters
ledger required | string Example: ledger001 Name of the ledger. |
txid required | integer <int64> >= 0 Example: 1234 Transaction ID. |
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"
}, - "txid": 0
}
}
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 ] 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": [
- {
- "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. |
Responses
Response samples
- 200
- default
{- "data": {
- "USD": 100,
- "EUR": 12
}
}
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). |
Responses
Response samples
- 200
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "XXX",
- "reference": "string",
- "accountID": "string",
- "type": "PAY-IN",
- "provider": "STRIPE",
- "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"
}
}
]
}
}
Get a payment
Authorizations:
path Parameters
paymentId required | string Example: XXX The payment ID. |
Responses
Response samples
- 200
{- "data": {
- "id": "XXX",
- "reference": "string",
- "accountID": "string",
- "type": "PAY-IN",
- "provider": "STRIPE",
- "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"
}
}
}
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). |
Responses
Response samples
- 200
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": "STRIPE",
- "reference": "string",
- "type": "TARGET"
}
]
}
}
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" The name of the connector. |
Request Body schema: application/json
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
{- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
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" The name of the connector. |
Responses
Response samples
- 200
{- "data": {
- "pollingPeriod": "60s",
- "apiKey": "XXX",
- "pageSize": 50
}
}
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" The name of the connector. |
Responses
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" 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
{- "cursor": {
- "pageSize": 15,
- "hasMore": false,
- "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
- "next": "",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorId": "7200b21f-cb26-4f4f-9504-421d49021e96",
- "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" The name of the connector. |
taskId required | string Example: task1 The task ID. |
Responses
Response samples
- 200
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "connectorId": "7200b21f-cb26-4f4f-9504-421d49021e96",
- "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" The name of the connector. |
Request Body schema: application/json
amount required | integer <int64> >= 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
{- "id": "string"
}
List transfers and their statuses
List transfers
Authorizations:
path Parameters
connector required | string (Connector) Enum: "STRIPE" "DUMMY-PAY" "WISE" "MODULR" "CURRENCY-CLOUD" "BANKING-CIRCLE" The name of the connector. |
Responses
Response samples
- 200
{- "data": [
- {
- "id": "string",
- "amount": 0,
- "asset": "string",
- "destination": "string",
- "source": "string",
- "currency": "string",
- "status": "string",
- "error": "string"
}
]
}
Transfer funds between Stripe accounts
Execute a transfer between two Stripe accounts.
Authorizations:
Request Body schema: application/json
amount | integer <int64> >= 0 |
asset | string |
destination | string |
metadata | object A set of key/value pairs that you can attach to a transfer object. It can be useful for storing additional information about the transfer in a structured format. |
Responses
Request samples
- Payload
{- "amount": 100,
- "asset": "USD",
- "destination": "acct_1Gqj58KZcSIg2N2q",
- "metadata": {
- "order_id": "6735"
}
}
Response samples
- 200
{ }
Search
ElasticSearch query engine
Authorizations:
Request Body schema: application/json
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": "txid: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"
}, - "txid": 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
{- "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 <int64> |
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 |
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 |
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 <int64> 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/json
endpoint required | string |
secret | string |
eventTypes required | Array of strings |
Responses
Request samples
- Payload
{- "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"
}
}
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"
}
}
}, - "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": {
- "amount": 100,
- "asset": "USD",
- "destination": "acct_1Gqj58KZcSIg2N2q",
- "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"
}
}, - "output": {
- "GetAccount": {
- "data": {
- "address": "users:001",
- "type": "virtual",
- "metadata": {
- "admin": "true"
}, - "volumes": {
- "COIN": {
- "input": 100,
- "output": 0
}
}, - "balances": {
- "COIN": 100
}
}
}, - "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
}
}, - "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"
}, - "txid": 0
}
}, - "GetPayment": {
- "data": {
- "id": "XXX",
- "reference": "string",
- "accountID": "string",
- "type": "PAY-IN",
- "provider": "STRIPE",
- "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"
}
}
}, - "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"
}
]
}