It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
- 🛠 Make your SDK feel handcrafted by customizing it
- ♻️ Refine your SDK quickly by iterating locally with the Speakeasy CLI
- 🎁 Publish your SDK to package managers by configuring automatic publishing
- ✨ When ready to productionize, delete this section from the README
Formance Stack API: Open, modular foundation for unique payments flows
This API is documented in OpenAPI format.
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.
The SDK relies on Composer to manage its dependencies.
To install the SDK and add it as a dependency to an existing composer.json
file:
composer require "formance/formance-sdk"
declare(strict_types=1);
require 'vendor/autoload.php';
use formance\stack;
use formance\stack\Models\Operations;
$sdk = stack\SDK::builder()->build();
try {
$requestSecurity = new Operations\GetVersionsSecurity(
authorization: "<YOUR_AUTHORIZATION_HERE>",
);
$response = $sdk->getVersions($requestSecurity);
if ($response->getVersionsResponse !== null) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}
Available methods
- getVersions - Show stack version information
- cancelEvent - Cancel a running workflow
- createTrigger - Create trigger
- createWorkflow - Create workflow
- deleteTrigger - Delete trigger
- deleteWorkflow - Delete a flow by id
- getInstance - Get a workflow instance by id
- getInstanceHistory - Get a workflow instance history by id
- getInstanceStageHistory - Get a workflow instance stage history
- getWorkflow - Get a flow by id
- listInstances - List instances of a workflow
- listTriggers - List triggers
- listTriggersOccurrences - List triggers occurrences
- listWorkflows - List registered workflows
- orchestrationgetServerInfo - Get server info
- readTrigger - Read trigger
- runWorkflow - Run workflow
- sendEvent - Send an event to a running workflow
- addAccountToPool - Add an account to a pool
- connectorsTransfer - Transfer funds between Connector accounts
- createAccount - Create an account
- createBankAccount - Create a BankAccount in Payments and on the PSP
- createPayment - Create a payment
- createPool - Create a Pool
- createTransferInitiation - Create a TransferInitiation
- deletePool - Delete a Pool
- deleteTransferInitiation - Delete a transfer initiation
- forwardBankAccount - Forward a bank account to a connector
- getAccountBalances - Get account balances
- getBankAccount - Get a bank account created by user on Formance
getConnectorTask- Read a specific task of the connector⚠️ Deprecated- getConnectorTaskV1 - Read a specific task of the connector
- getPayment - Get a payment
- getPool - Get a Pool
- getPoolBalances - Get pool balances
- getTransferInitiation - Get a transfer initiation
- installConnector - Install a connector
- listAllConnectors - List all installed connectors
- listBankAccounts - List bank accounts created by user on Formance
- listConfigsAvailableConnectors - List the configs of each available connector
listConnectorTasks- List tasks from a connector⚠️ Deprecated- listConnectorTasksV1 - List tasks from a connector
- listPayments - List payments
- listPools - List Pools
- listTransferInitiations - List Transfer Initiations
- paymentsgetAccount - Get an account
- paymentsgetServerInfo - Get server info
- paymentslistAccounts - List accounts
readConnectorConfig- Read the config of a connector⚠️ Deprecated- readConnectorConfigV1 - Read the config of a connector
- removeAccountFromPool - Remove an account from a pool
resetConnector- Reset a connector⚠️ Deprecated- resetConnectorV1 - Reset a connector
- retryTransferInitiation - Retry a failed transfer initiation
- reverseTransferInitiation - Reverse a transfer initiation
- udpateTransferInitiationStatus - Update the status of a transfer initiation
uninstallConnector- Uninstall a connector⚠️ Deprecated- uninstallConnectorV1 - Uninstall a connector
- updateBankAccountMetadata - Update metadata of a bank account
- updateConnectorConfigV1 - Update the config of a connector
- updateMetadata - Update metadata
- createPolicy - Create a policy
- deletePolicy - Delete a policy
- getPolicy - Get a policy
- getReconciliation - Get a reconciliation
- listPolicies - List policies
- listReconciliations - List reconciliations
- reconcile - Reconcile using a policy
- reconciliationgetServerInfo - Get server info
- search - search.v1
- searchgetServerInfo - Get server info
- createTransactions - Create a new batch of transactions to a ledger
- addMetadataOnTransaction - Set the metadata of a transaction by its ID
- addMetadataToAccount - Add metadata to an account
- countAccounts - Count the accounts from a ledger
- countTransactions - Count the transactions from a ledger
- createTransaction - Create a new transaction to a ledger
- getAccount - Get account by its address
- getBalances - Get the balances from a ledger's account
- getBalancesAggregated - Get the aggregated balances from selected accounts
- getInfo - Show server information
- getLedgerInfo - Get information about a ledger
- getMapping - Get the mapping of a ledger
- getTransaction - Get transaction from a ledger by its ID
- listAccounts - List accounts from a ledger
- listLogs - List the logs from a ledger
- listTransactions - List transactions from a ledger
- readStats - Get statistics from a ledger
- revertTransaction - Revert a ledger transaction by its ID
runScript- Execute a Numscript⚠️ Deprecated- updateMapping - Update the mapping of a ledger
- cancelEvent - Cancel a running workflow
- createTrigger - Create trigger
- createWorkflow - Create workflow
- deleteTrigger - Delete trigger
- deleteWorkflow - Delete a flow by id
- getInstance - Get a workflow instance by id
- getInstanceHistory - Get a workflow instance history by id
- getInstanceStageHistory - Get a workflow instance stage history
- getServerInfo - Get server info
- getWorkflow - Get a flow by id
- listInstances - List instances of a workflow
- listTriggers - List triggers
- listTriggersOccurrences - List triggers occurrences
- listWorkflows - List registered workflows
- readTrigger - Read trigger
- runWorkflow - Run workflow
- sendEvent - Send an event to a running workflow
- testTrigger - Test trigger
- confirmHold - Confirm a hold
- createBalance - Create a balance
- createWallet - Create a new wallet
- creditWallet - Credit a wallet
- debitWallet - Debit a wallet
- getBalance - Get detailed balance
- getHold - Get a hold
- getHolds - Get all holds for a wallet
- getTransactions
- getWallet - Get a wallet
- getWalletSummary - Get wallet summary
- listBalances - List balances of a wallet
- listWallets - List all wallets
- updateWallet - Update a wallet
- voidHold - Cancel a hold
- walletsgetServerInfo - Get server info
- activateConfig - Activate one config
- changeConfigSecret - Change the signing secret of a config
- deactivateConfig - Deactivate one config
- deleteConfig - Delete one config
- getManyConfigs - Get many configs
- insertConfig - Insert a new config
- testConfig - Test one config
- createClient - Create client
- createSecret - Add a secret to a client
- deleteClient - Delete client
- deleteSecret - Delete a secret from a client
- getOIDCWellKnowns - Retrieve OpenID connect well-knowns.
- getServerInfo - Get server info
- listClients - List clients
- listUsers - List users
- readClient - Read client
- readUser - Read user
- updateClient - Update client
- addMetadataOnTransaction - Set the metadata of a transaction by its ID
- addMetadataToAccount - Add metadata to an account
- countAccounts - Count the accounts from a ledger
- countTransactions - Count the transactions from a ledger
- createBulk - Bulk request
- createLedger - Create a ledger
- createTransaction - Create a new transaction to a ledger
- deleteAccountMetadata - Delete metadata by key
- deleteLedgerMetadata - Delete ledger metadata by key
- deleteTransactionMetadata - Delete metadata by key
- exportLogs - Export logs
- getAccount - Get account by its address
- getBalancesAggregated - Get the aggregated balances from selected accounts
- getInfo - Show server information
- getLedger - Get a ledger
- getLedgerInfo - Get information about a ledger
- getTransaction - Get transaction from a ledger by its ID
- getVolumesWithBalances - Get list of volumes with balances for (account/asset)
- importLogs
- listAccounts - List accounts from a ledger
- listLedgers - List ledgers
- listLogs - List the logs from a ledger
- listTransactions - List transactions from a ledger
- readStats - Get statistics from a ledger
- revertTransaction - Revert a ledger transaction by its ID
- updateLedgerMetadata - Update ledger metadata
You can override the default server globally by passing a server index to the server_idx: int
optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
# | Server | Variables |
---|---|---|
0 | http://localhost |
None |
1 | https://{organization}.{environment}.formance.cloud |
environment (default is sandbox ), organization (default is orgID-stackID ) |
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
environment: stack\ServerEnvironment
organization: string
The default server can also be overridden globally by passing a URL to the server_url: str
optional parameter when initializing the SDK client instance. For example:
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!