English
Swan
Your Swan project’s accounts and transactions — to match a payment with an email and react to each transaction.
A Swan connection lets the Swan node list a Swan project’s accounts and their balances, get an account and find transactions — for example to match a payment announced by email. It also serves the Swan — transaction trigger. Swan is an embedded bank (accounts, IBANs, cards) for platforms and businesses.
The connection holds the project’s environment, client ID and client secret. The server exchanges them for a project token (POST https://oauth.swan.io/oauth2/token, “client credentials” flow), valid one hour, and queries the GraphQL API of the chosen environment, always from the server. The secret is encrypted at rest and never appears in a workflow.
At a glance
- Identifier:
swan - Family: Service
- Set up by: A member (personal) or an administrator (shared with the organisation)
- Authentication: API key or token
- Credential type:
service:swan - Official API documentation: https://docs.swan.io/developers/
- Environments: Sandbox (
sandbox) —https://api.swan.io/sandbox-partner; Live (live) —https://api.swan.io/live-partner - Rate limit applied by Loop & Roll: 5 requests per second and per connection; up to 3 attempts on a 429 or a 5xx
- Connection test: Yes
Step by step
The same steps are shown in the connection form of the app.
- In the Swan dashboard, open “Developers” then “API”.
- Copy the project’s client ID and client secret (sandbox or live).
- Choose the matching environment and paste them below.
Connection fields
| Field | Kind | Required | Notes |
|---|---|---|---|
Environment (environment) | Choice | Yes | sandbox (Sandbox), live (Live) Default: sandbox |
Client ID (clientId) | Text | Yes | |
Client secret (clientSecret) | Secret — never shown again | Yes |
Before you start
- Read-only. A project token reads the whole project (accounts, transactions). A transfer requires a user’s token and their consent, out of reach of a server connection: no node initiates a transfer or moves money.
- Sandbox or live. The sandbox is self-service; live follows Swan’s go-live procedure. Choose the environment that matches the credentials.
| Environment | GraphQL API |
|---|---|
| Sandbox | https://api.swan.io/sandbox-partner/graphql |
| Live | https://api.swan.io/live-partner/graphql |
Add the connection
- In the Swan dashboard, open Developers then API.
- Copy the project’s client ID and client secret (sandbox or live).
- In Connections, Third-party services section, click Connect on the Swan card. Give it a Name, choose the Scope (Personal or Organisation) and the Environment, paste the Client ID and Client secret, then click Create the connection.
- Click Configure, then Test the connection: the
projectInfoquery shows the project name.
Calls used
Every action is a GraphQL read (POST /graphql):
| Action | Swan query |
|---|---|
| List accounts | accounts |
| Get an account and its balances | account(accountId) |
| Find transactions | transactions (the whole project) or account(accountId) { transactions } |
| Trigger | transactions, filtered on the change date |
Pace
Swan accepts 2,000 requests per five-minute window per IP address. Loop & Roll sends at most five requests per second per connection.
Common errors
| Message or code | Cause | What to do |
|---|---|---|
Test: “the service rejects the key” (integration.unauthorized) | Client ID or secret refused, or from another environment than the one chosen. | Check the environment and copy the credentials again in Configure. |
node_service_failed | Swan refused the query: a GraphQL error, returned in a 200 response. Replaying the same query would return the same error. | Fix the node settings. |
integration.rate_limited | Swan limit exceeded, after retries. | Transient: the engine resumes the step later. |
integration.unavailable | Network or Swan outage, after retries. | Transient: the engine resumes the step later. |
integration.connection_unusable | The connection was deleted, is not active or is out of your scope. | Pick a valid connection in the node. |
Nodes that use this connection
- Swan — transaction —
trigger.swan - Swan —
swan.api