Skip to main content

Integration for Onboarding of New Clients

Following this guide you will be able to automatically add a new client to the Quiddly platform using the Quiddly API.

Payment Flow Diagram

Create the Client​

Start by creating the client.

POST https://{alias}signup.{domain}/api/clients

Headers
Content-Type: application/json

Request
{
"userPassword": "Password!", // Password for the user. Must be provided for obtaining token
"identificationNumber": "5592252174", // Required must be a valid swedish CIN-number 10 digits
"name": "Quiddly AB",
"addressInformation": {
"name": "Quiddly AB",
"address": "Address",
"zip": "12345",
"city": "City",
"countryCode": "SE"
},
"contactInformation": {
"name": "John Doe",
"email": "[email protected]",
"phone": "+46731234567",
"cellPhone": "+46731234567",
"documentEmail": "[email protected]",
"documentPhone": "+46731234567"
},
"payoutAccounts": [
{
"currency": "SEK",
"bankName": "My bank",
"bankGiro": "123-4567",
"plusGiro": null,
"accountNumber": null,
"bic": null,
"iban": null,
"useChannel": "BANKGIRO"
}
],
"extraFeatures": {
"expressDelivery": true,
"colorPrint": false
}
}

Request a Client Token​

Once the client has been created with contact information email and password you can retrieve the authentication token for the client.

POST https://{alias}api.{domain}/authenticate

Headers
Content-Type: application/json

Request
{
"username": "[email protected]",
"password": "Password!"
}

Response
{
"idToken": "ey...", // id_token is valud for 86400 seconds
"tokenType": "Bearer"
}

Create a Client Service Account​

Last step is to create and retrieve an integration service account token. This token will be used for all integration API calls for the client. Please store this token in a safe place.

Create the service account and use the returned id to generate a token

POST https://{alias}api.{domain}/service-accounts

Headers
Content-Type: application/json

Request
{
"name": "integration", // the name of your service account
"active": true
}

Response
{
"id": "[email protected].{alias}.{domain}",
"name": "integration",
"clientId": "C.100101",
"active": true,
"is_service_user": true
}

Generate the Token with the Service Account ID​

PUT https://{alias}api.{domain}/service-accounts/{response.id}/generate-token

Response
{
"tokenType": "Bearer",
"idToken": "eyJ0..."
}

To call the Quiddly API provide following header in each call Authorization: {tokenType} {idToken}