Quickstart
This guide lets you familiarize yourself with Swan's interfaces and API in less than 10 minutes.

Get access to Swan

To get access you will need to fill out this form.
Once your request is processed, you will receive an invitation via email. We will verify your email and phone number. You will then need to authenticate and verify your identity using the invite link.

Configure your banking experience

Once you have access to the dashboard, you can start testing our product via the Sandbox. The Sandbox is just like Swan, but all the accounts are fake. It lets you try out all our available features, and test how easily you can integrate them into your processes or products.
First of all, you should personalize our interfaces with your branding. Go to Settings > Branding to upload your logo and pick your accent color. We will display that information to your users when they use our interfaces.
Our administration dashboard
If you want to use our API you will also need to configure it. Go to API to get your credentials. You also need to whitelist all your URLs. Any URL not in Redirect URLs will be considered malicious and we won't redirect a user to it. For security purposes, you need to add all URLs you use, you can't add only the domain.

Create your first account

Onboard the user

To create your first bank account you can head over to Onboarding and choose the public URL corresponding to your use case. Let's say you want to open accounts for individuals; you can do so by using the first link. This generic URL can be used by anyone to create an account on your project. It will redirect you to an onboarding form that lets us collect the information necessary to open the account.
You can also create a unique onboarding URL for a specific client through our API. To do so, call the onboardIndividualAccountHoldermutation. It will return a unique link to a pre-filled form. This call must be done with a project access token (click "Connected to the sandbox as the project" on the API Explorer).
Request
Reponse
1
mutation MyMutation {
2
onboardIndividualAccountHolder(
3
input: {
4
monthlyIncome: Between500And1500
5
language: "en-EN"
6
employmentStatus: Employee
8
accountName: "Jon Doe Personnal Account"
9
}
10
) {
11
... on OnboardIndividualAccountHolderSuccessPayload {
12
__typename
13
onboarding {
14
id
15
onboardingUrl
16
}
17
}
18
... on ForbiddenRejection {
19
__typename
20
message
21
}
22
}
23
}
Copied!
1
{
2
"data": {
3
"onboardIndividualAccountHolder": {
4
"__typename": "OnboardIndividualAccountHolderSuccessPayload",
5
"onboarding": {
6
"id": "YOUR_PROJECT_ID",
7
"onboardingUrl": "https://api.banking.sandbox.swan.io/projects/YOUR_PROJECT_ID/onboardings/UNIQUE_ONBOARDING_ID?lang=en-EN"
8
}
9
}
10
}
11
}
Copied!
In this example you can provide the onboardingUrl to your clients. Once the onboarding is done we will redirect the user to the redirectUrl you configured. In this example, since a redirectUrlwas not configured, the user will be redirected to our web banking interface.

Access the account

At Swan, everything can be accessed either through our API or through the web banking interface. The same goes for account information. To get account balances, IBANs and all other account-related data, you can use the account query.
Request
Response
1
query MyQuery {
2
account(accountId: "{{YOUR_ACCOUNT_ID}}") {
3
BIC
4
IBAN
5
balances {
6
available {
7
currency
8
value
9
}
10
booked {
11
currency
12
value
13
}
14
pending {
15
currency
16
value
17
}
18
}
19
cashAccountType
20
currency
21
name
22
number
23
paymentLevel
24
statusInfo {
25
status
26
}
27
}
28
}
Copied!
1
{
2
"data": {
3
"account": {
4
"BIC": "",
5
"IBAN": null,
6
"balances": {
7
"available": {
8
"currency": "EUR",
9
"value": "0"
10
},
11
"booked": {
12
"currency": "EUR",
13
"value": "0"
14
},
15
"pending": {
16
"currency": "EUR",
17
"value": "0"
18
}
19
},
20
"cashAccountType": "Current",
21
"currency": "EUR",
22
"name": "My personnal Account",
23
"number": "10380349456",
24
"paymentLevel": "Limited",
25
"statusInfo": {
26
"status": "Opened"
27
}
28
}
29
}
30
}
Copied!
You can also explore our web banking interface to familiarize yourself with our features. As you can see in this API response, the IBAN is not available as long as the account holder is not validated.

Validate the new account

Like a lot of critical domains, banking services are highly regulated. You cannot simply "Sign up" without first going through a compliance check. At Swan, the compliance process takes place in two steps: identity verification and document collection. Identity verification is done automatically and is processed in about 10 minutes, while document collection is handled by our compliance department.
In the sandbox you can simulate those two processes with Sandbox User:
  • Identity verification: Go to Sandbox users to edit your current Sandbox User and click on "Identity Verified"
  • Compliance review: Go to Sandbox users to edit your current Sandbox User and select Verified on the "Verification Status" input.
All of Swan's features are available as soon as your account is validated.

Execute the first payment

Credit your account

When you create an account you usually want to credit it with money. In real life, you would do this with a SEPA Credit Transfer from another account using your newly acquired IBAN. In the sandbox, the accounts are fake so you will need to simulate this. Go to Event Simulator > SEPA Credit Transfers > Receive an incoming Transfer, then describe the transfer you wish to simulate. The money will be instantly credited to your account.

Initiate a transfer

If you want to use this money you can make a payment by performing a SEPA transfer. Use the Payments tab in the web banking interface, or do it using our API. The initiateCreditTransfers mutation allows you to make one or more SEPA credit transfers to one or more IBANs.
Request
Response
1
mutation MyMutation {
2
initiateCreditTransfers(
3
input: {
4
creditTransfers: {
5
amount: { value: "100", currency: "EUR" }
6
label: "First payments Label"
7
reference: "Reference 123"
8
sepaBeneficiary: {
9
iban: "FR4817569000304133391968B38"
10
name: "My creditor"
11
isMyOwnIban: false
12
save: false
13
}
14
}
15
consentRedirectUrl: "{{YOUR_REDIRECT_URL}}"
16
accountNumber: "{{YOUR_ACCOUNT_NUMBER}}"
17
}
18
) {
19
... on InitiateCreditTransfersSuccessPayload {
20
__typename
21
payment {
22
id
23
statusInfo {
24
status
25
... on PaymentConsentPending {
26
__typename
27
consent {
28
consentUrl
29
}
30
}
31
}
32
}
33
}
34
... on AccountNotFoundRejection {
35
id
36
message
37
}
38
... on ForbiddenRejection {
39
__typename
40
message
41
}
42
}
43
}
44
Copied!
1
{
2
"data": {
3
"initiateCreditTransfers": {
4
"__typename": "InitiateCreditTransfersSuccessPayload",
5
"payment": {
6
"id": "cto_a1e70fc4a95cbc32d2ad0ea31c0ee475",
7
"statusInfo": {
8
"status": "ConsentPending",
9
"__typename": "PaymentConsentPending",
10
"consent": {
11
"consentUrl": "https://identity.swan.io/consent?consentId=7a7ea958-0d42-4e7a-ac94-5074833e298d&env=Sandbox"
12
}
13
}
14
}
15
}
16
}
17
}
Copied!
Don't forget to change the consentRedirectUrl and the accountNumber with your account number.
If you try this request, you will see that we fetch the consentUrl. At Swan, like any other bank, we need to comply with PSD2, so we provide you with an easy-to-use two-factor authentication. We use a process called consent, which sends a notification to the user whenever a sensitive operation needs to be validated. Open theconsentUrl on your browser to receive a notification asking to confirm the credit transfer. Once that is done, we redirect you to the URL you specified in consentRedirectUrl.
To follow the transaction lifecycle you can do a query to get all the account's payments.
Request
Response
1
query MyQuery {
2
accounts {
3
edges {
4
node {
5
transactions {
6
edges {
7
node {
8
amount {
9
currency
10
value
11
}
12
statusInfo {
13
status
14
}
15
id
16
createdAt
17
type
18
}
19
}
20
}
21
}
22
}
23
}
24
}
25
Copied!
1
{
2
"data": {
3
"accounts": {
4
"edges": [
5
{
6
"node": {
7
"transactions": {
8
"edges": [
9
{
10
"node": {
11
"amount": {
12
"currency": "EUR",
13
"value": "100.00"
14
},
15
"statusInfo": {
16
"status": "Pending"
17
},
18
"id": "bosco_26a1c375afc9dadc0f98fc041a8a2906",
19
"createdAt": "2021-08-26T15:26:22.492Z",
20
"type": "SepaCreditTransferOut"
21
}
22
}
23
]
24
}
25
}
26
]
27
}
28
}
29
}
Copied!
As you can see above, the transaction status is Pending, meaning that the transaction was initiated but not yet sent to the beneficiary. In real life, the transaction would automatically be sent to the SEPA Network within a few hours. In the sandbox you can go to Event Simulator > SEPA Credit Transfers > Book an outgoing Transfer and enter the transaction to simulate the event. If you try the last request again, you will see that the status has changed to Booked !

Next steps

Bravo, you've completed Swan's Quickstart guide! You are now familiar with the onboarding process, the administration dashboard, and how to execute a payment. Feel free to explore our other features by yourself, including features like cards, standing orders, account memberships or payment control.
Or continue on with the next guide: How to use our API
Last modified 2mo ago