The SDK helps you interact with the Formance API and integrate it with your application.
Create OAuth client credentials
To use the Formance API, create OAuth client credentials using fctl.
fctl auth client create getting-started-client
This creates new OAuth client credentials with the name getting-started-client. You can use any name.
Output:
You are about to create a new OAuth2 client.
Do you want to continue [Y/n]: y
# highlight-next-line
ID | 6a936dfe-xxxx-yyyy-zzzz-9019a1e9b9e3
Name | getting-started-client
Description |
Public | No
Redirect URIs |
Post logout redirect URIs |
Scopes |
The ID is the OAuth client ID. You will need this to authenticate with the Formance API.
Create a new OAuth client secret:
fctl auth client secrets create 6a936dfe-xxxx-yyyy-zzzz-9019a1e9b9e3 getting-started-secret
Output:
You are about to create a new client secret.
Do you want to continue [Y/n]: y
ID | 3bddd5f6-xxxx-yyyy-zzzz-e8cd839c9d79
Name | getting-started-secret
# highlight-next-line
Clear | 20bd58c4-xxxx-yyyy-zzzz-dc05258bc959
The Clear is the OAuth client secret. You will need this to authenticate with the Formance API.
The client secret is only shown once. Save it securely. If you lose it, you will need to create a new one.
Retrieve the API endpoint
Retrieve your stack’s unique API endpoint:
fctl stack show --name=playground
Replace playground with your stack name if different.
Output:
# Information
ID | wxyz |
Name | playground |
Region | aws-eu-west-1-sandbox |
Status | ACTIVE |
Effective status | READY |
# Versions
Webhooks | 0.7.1 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/webhooks
Orchestration | 0.1.7 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/orchestration
Auth | 0.4.4 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/auth
Wallets | 0.4.6 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/wallets
Ledger | v1.10.13 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/ledger
Payments | 0.9.7 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/payments
Search | 0.10.0 | https://gywzymfjlvli-wxyz.sandbox.formance.cloud/api/search
# Metadata
github.com/formancehq/fctl/protected | Yes
The API endpoint is the host portion of the URL. In this case, it is https://gywzymfjlvli-wxyz.sandbox.formance.cloud.
Language-specific SDK
Continue with the SDK documentation for your language: TypeScript/JavaScript or Golang.