account-onboarding

Integrate to PayEx Account onboarding API 

Changelog

Introduction

The account-onboarding API handle the onboarding process of accounts. Create account, upgrade of creditlimit. The onboard process may include   payment flows for split-payments and credit accounts for retail finance scenarios. The api contains redirect scenarios for  account onboarding, upgrades and authentication.

AccountOnboarding.png

Route description

Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below

The below route is an example of a route towards resource3Id, to operate on this resource you must also include the ids of its parentresources in the route.
api.payex.com/ledger/{Subdomain}/v1/{LedgerNumber}/resource1/{resource1Id}/resource2/{resource2Id}/resource3/{resource3Id}

Route segmentDescription
SubdomainIn this part of the API it will be credit-account
LedgerNumberThe ledger identifier/number at PayEx
resource1IdIdentifier of resource1
resource2Ididentifier of resource2, subresource to resource1
resource3Ididentifier of resource3, subresource to resource2

1. Offers

List all offers

1.1 Get list of Offers

Request
GET /ledger/account-onboarding/v2/{ownerNo}/offers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved offers

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "items": [
    {
     "accountProfile": "kontotyp-1",
     "title": "kontotyp 1",
     "currency": "SEK",
     "maxCreditLimit": 50000.00,
     "reminderFee": 35.00,
     "penaltyInterestRate": 18.00,
     "termsAndConditions": {
       "standardEuropeanAgreements": "https://www.payex.com/term-and-conditions/no/-----.pdf",
       "accountTerms": "https://www.payex.com/term-and-conditions/no/-----.pdf"
      },
     "operations": [
        {
         "rel": "create-account-without-application",
         "method": "POST",
         "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/create-account-without-application"
        },
        {
         "rel": "add-application",
         "method": "POST",
         "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications"
        }
      ],
     "@id": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1"
    },
    {
     "accountProfile": "kontotyp-2",
     "title": "kontotyp 2",
     "currency": "SEK",
     "maxCreditLimit": 50000.00,
     "reminderFee": 35.00,
     "penaltyInterestRate": 20.00,
     "termsAndConditions": {
       "standardEuropeanAgreements": "https://www.payex.com/term-and-conditions/no/-----.pdf",
       "accountTerms": "https://www.payex.com/term-and-conditions/no/-----.pdf"
      },
     "operations": [
        {
         "rel": "create-account-without-application",
         "method": "POST",
         "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-2/create-account-without-application"
        },
        {
         "rel": "add-application",
         "method": "POST",
         "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-2/applications"
        }
      ],
     "@id": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-2"
    }
  ],
 "navigation": {
   "@id": "/ledger/account-onboarding/v2/xxx/offers"
  }
}

Possible problems

Http status Problem type Description
404 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 resource-unavailable Occurs if the requested profile is not available. 
409 validation Occurs if the validation of the resource's state fails. 
500 fatal Unexpected error, logs may give details about the problem 

View a specific offer

1.2 Get specific Offer

Request
GET /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile} HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved offer

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "accountProfile": "kontotyp-1",
 "title": "kontotyp 1",
 "currency": "SEK",
 "maxCreditLimit": 50000.00,
 "reminderFee": 35.00,
 "penaltyInterestRate": 18.00,
 "termsAndConditions": {
   "standardEuropeanAgreements": "https://www.payex.com/term-and-conditions/no/-----.pdf",
   "accountTerms": "https://www.payex.com/term-and-conditions/no/-----.pdf"
  },
 "operations": [
    {
     "rel": "create-account-without-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/create-account-without-application"
    },
    {
     "rel": "add-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications"
    }
  ]
}

Possible problems

Http status Problem type Description
404 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 resource-unavailable Occurs if the requested profile is not available. 
409 validation Occurs if the validation of the resource's state fails. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
accountProfile string   
title string  Name of the offer
currency string 
  • SEK
  • NOK
  • DKK
  • EUR
 
maxCreditLimit number Type: double
Max: 100000000
Min: 0 
Max credit limit for account profile, can't have more than 2 decimal places
reminderFee number Type: double
Max: 100000000
Min: 0 
Reminder fee
penaltyInterestRate number Type: double
Max: 100000000
Min: 0 
Penalty interest rate
termsAndConditions object    
   standardEuropeanAgreements string  Standard european agreements
   accountTerms string  Account terms
applications dynamic    
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

2. Applications

Get existing application

2.1 Get specific Application

Request
GET /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId} HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved application

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "applicationId": "123e4567-e89b-12d3-a456-426614174000",
 "specialIntent": "new-account-for-invoice-conversion",
 "languageCode": "Sv",
 "ipAddress": "1.1.1.X",
 "msisdn": "46701234456",
 "emailAddress": "test@testshop.se",
 "customerNo": "951753456",
 "nationalConsumerIdentifier": {
   "value": "19101010-1010",
   "countryCode": "SE"
  },
 "creditLimit": 5000.00,
 "signBankidSe": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "kycAnswers": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers",
 "createdAccount": {
   "accountNo": "1234567"
  },
 "status": "AwaitingSign",
 "applicationOptions": {
   "customerPreAuthenticated": false
  },
 "kycQuestions": [
    {
     "questionText": "What is your current employment?",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "selfemployed",
           "answerText": "Own business"
          },
          {
           "answerCode": "private_employee",
           "answerText": "Private employee"
          },
          {
           "answerCode": "goverment_employee",
           "answerText": "Government employee"
          }
        ]
      },
     "questionCode": "employment"
    },
    {
     "questionText": "What is your yearly income",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "incomeinterval1",
           "answerText": "0-100 000 SEK"
          },
          {
           "answerCode": "incomeinterval2",
           "answerText": "100 001-200 000 SEK"
          },
          {
           "answerCode": "incomeinterval3",
           "answerText": "200 001-300 000 SEK"
          },
          {
           "answerCode": "incomeinterval4",
           "answerText": "Over 300 001 SEK"
          }
        ]
      },
     "questionCode": "income"
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/verify-application"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-no"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
500 fatal Unexpected error, logs may give details about the problem 

2.2 Create Application

Add application to offer

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "creditLimit": 5000.00,
 "nationalConsumerIdentifier": {
   "value": "19101010-1010",
   "countryCode": "SE"
  },
 "customerNo": "951753456",
 "emailAddress": "test@testshop.se",
 "msisdn": "46701234456",
 "ipAddress": "1.1.1.X",
 "languageCode": "Sv",
 "specialIntent": "new-account-for-invoice-conversion",
 "applicationOptions": {
   "customerPreAuthenticated": false
  }
}

Request object specification

Property Data typeFormatRequiredDescription
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Yes Credit limit on account applied for, can't have more than 2 decimal places
nationalConsumerIdentifier object   Yes  
   value string  Yes  
   countryCode string Pattern: SE|NO|DK|FI Yes  
customerNo string  No The identifier of the customer
emailAddress string Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+|\[[A-Fa-f\d\:]+\])(?<!\.)$ No The customers Email
msisdn string Pattern: ^[+]{1}\d{4,14}$ No Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
ipAddress string Pattern: [a-z0-9.:/]* No Senders ip address
languageCode string 
  • Sv
  • En
  • No
  • Dk
Yes  
specialIntent string  No Optional instruction used in special cases. Possible values (NewAccountForInvoiceConversion)
applicationOptions object   No  
   customerPreAuthenticated boolean  Yes Optional flag used when the customer is pre-authenticated. Defaults to false

Example of response on successfully created application

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "applicationId": "123e4567-e89b-12d3-a456-426614174000",
 "specialIntent": "new-account-for-invoice-conversion",
 "languageCode": "Sv",
 "ipAddress": "1.1.1.X",
 "msisdn": "46701234456",
 "emailAddress": "test@testshop.se",
 "customerNo": "951753456",
 "nationalConsumerIdentifier": {
   "value": "19101010-1010",
   "countryCode": "SE"
  },
 "creditLimit": 5000.00,
 "signBankidSe": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "kycAnswers": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers",
 "status": "AwaitingSign",
 "applicationOptions": {
   "customerPreAuthenticated": false
  },
 "@id": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000",
 "kycQuestions": [
    {
     "questionText": "What is your current employment?",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "selfemployed",
           "answerText": "Own business"
          },
          {
           "answerCode": "private_employee",
           "answerText": "Private employee"
          },
          {
           "answerCode": "goverment_employee",
           "answerText": "Government employee"
          }
        ]
      },
     "questionCode": "employment"
    },
    {
     "questionText": "What is your yearly income",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "incomeinterval1",
           "answerText": "0-100 000 SEK"
          },
          {
           "answerCode": "incomeinterval2",
           "answerText": "100 001-200 000 SEK"
          },
          {
           "answerCode": "incomeinterval3",
           "answerText": "200 001-300 000 SEK"
          },
          {
           "answerCode": "incomeinterval4",
           "answerText": "Over 300 001 SEK"
          }
        ]
      },
     "questionCode": "income"
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/verify-application"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-no"
    }
  ]
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
409 customer-mismatch Occurs if the customer NationalIdentifier value doesn't match with the provided CustomerNo value. 
409 customer-missing Occurs if the customer with the provided customerNo isn't found and the company doesn't support creating a customer on requested CustomerNo. 
409 account-profile-exists Occurs if an account with the provided accountProfile already exists. 
422 invalid-special-intent Occurs if the provided special intent is invalid. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Credit limit on account applied for, can't have more than 2 decimal places
nationalConsumerIdentifier object    
   value string   
   countryCode string Pattern: SE|NO|DK|FI  
customerNo string  The identifier of the customer
emailAddress string Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+|\[[A-Fa-f\d\:]+\])(?<!\.)$ The customers Email
msisdn string Pattern: ^[+]{1}\d{4,14}$ Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
ipAddress string Pattern: [a-z0-9.:/]* Senders ip address
languageCode string 
  • Sv
  • En
  • No
  • Dk
 
specialIntent string  Optional instruction used in special cases. Possible values (NewAccountForInvoiceConversion)
applicationOptions object    
   customerPreAuthenticated boolean  Optional flag used when the customer is pre-authenticated. Defaults to false
applicationId string  ApplicationId
status string 
  • AwaitingComplementaryInfo
  • AwaitingVerification
  • AwaitingSign
  • Rejected
  • InitializedDigitalSign
  • SignRejectedOrFailed
  • SignMismatch
  • Approved
 
createdAccount object    
   accountNo string  Account number
kycQuestions array    
   questionCode string  The code definition of the question
   questionText string  The translated text of the question
   answer object    
      type string  The type of the expected answer: single | multi | text
      required boolean  If the answer is required
      textValidationRegEx string  The regex the answer should match
      possibleAnswers array    
         answerCode string  The code definition of the answer
         answerText string  The translated text of the answer
         subQuestions array    
kycAnswers dynamic   The kyc resource
signBankidSe dynamic   The sign bankid se resource
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

3. Kyc-answers

Get the submited answers to kyc questions

3.1 Get list of Kyc-answers

Request
GET /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved kyc answers

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 kyc-not-configured Occurs if the application does not support KYC answers due to the account profile not being configured with any. 
500 fatal Unexpected error, logs may give details about the problem 

3.2 Create Kyc-answer

Submit answers to kyc questions

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ]
}

Request object specification

Property Data typeFormatRequiredDescription
answers array   Yes  
   questionCode string  Yes The code definition of the question
   answerCode string  Yes The code definition of the answer

Example of response on successfully created kyc answers

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ],
 "@id": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
}

Possible problems

Http status Problem type Description
400 validation Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 validation Occurs if the validation of the resource's state fails. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 kyc-not-configured Occurs if the application does not support KYC answers due to the account profile not being configured with any. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
answers array    
   questionCode string  The code definition of the question
   answerCode string  The code definition of the answer

4. Verify-application

4.1 Create Verify-application

Verify the application and does a credit check if needed

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/verify-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
422 credit-check-declined Occurs if the credit check is denied. 
500 fatal Unexpected error, logs may give details about the problem 

5. Begin-sign-bankid-se

5.1 Create Begin-sign-bankid-se

Initiate bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/begin-sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "callbackUrl": "https://myCallbackUrl"
}

Request object specification

Property Data typeFormatRequiredDescription
callbackUrl string  No If callback should be done on status change, it is done to the callback url. If empty no callback is done.

Example of response on successfully created begin sign bankid se. The signing process is carried out in a background process even after the response is returned.

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "autoStartToken": "cdc9b137-f7ef-4f75-af57-3b6e2eb15886",
 "operations": []
}

Possible problems

Http status Problem type Description
400 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
callbackUrl string  If callback should be done on status change, it is done to the callback url. If empty no callback is done.
autoStartToken string  Guid from BankID. Used when starting the BankID application on mobile phones
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

6. Sign-bankid-se

Retrieve bankid signing process data

6.1 Get list of Sign-bankid-se

Request
GET /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved sign bankid se. This should be polled. The resource is updated in the signing process running in the background.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
500 fatal Unexpected error, logs may give details about the problem 

6.2 Create Sign-bankid-se

Initiate bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl"
}

Request object specification

Property Data typeFormatRequiredDescription
endUserIp string  Yes IP address of the end user.
callbackUrl string  No If callback should be done on status change, it is done to the callback url. If empty no callback is done.

Example of response on successfully created sign bankid se. The signing process is carried out in a background process even after the response is returned.

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl",
 "@id": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/offers/kontotyp-1/applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
400 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
endUserIp string  IP address of the end user.
callbackUrl string  If callback should be done on status change, it is done to the callback url. If empty no callback is done.
autostartToken string Type: uuid Autostart token to start BankId on the device client's current device.
qrCodeImageDataUrl string  QR code in Base64 that the end user needs to scan on another device than the one used to initiate.
status string 
  • 0
  • 1
  • 2
 
hintCode string 
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
 
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

7. Cancel

7.1 Create Cancel

Cancel bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/sign-bankid-se/cancel HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 invalid-bank-id-state Occurs if the bankId state is invalid for the request to be made. 
500 fatal Unexpected error, logs may give details about the problem 

8. Limit-upgrade-applications

Get existing limit upgrade application

8.1 Get specific Limit-upgrade-application

Request
GET /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId} HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully created limit upgrade application

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "limitUpgradeApplicationId": "123e4567-e89b-12d3-a456-426614174000",
 "specialIntent": "limit-upgrade-for-invoice-conversion",
 "languageCode": "Sv",
 "accountNo": "123456",
 "creditLimit": 5000.00,
 "applicationOptions": {
   "customerPreAuthenticated": false
  },
 "signBankidSe": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "kycAnswers": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers",
 "status": "AwaitingSign",
 "kycQuestions": [
    {
     "questionText": "What is your current employment?",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "selfemployed",
           "answerText": "Own business"
          },
          {
           "answerCode": "private_employee",
           "answerText": "Private employee"
          },
          {
           "answerCode": "goverment_employee",
           "answerText": "Government employee"
          }
        ]
      },
     "questionCode": "employment"
    },
    {
     "questionText": "What is your yearly income",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "incomeinterval1",
           "answerText": "0-100 000 SEK"
          },
          {
           "answerCode": "incomeinterval2",
           "answerText": "100 001-200 000 SEK"
          },
          {
           "answerCode": "incomeinterval3",
           "answerText": "200 001-300 000 SEK"
          },
          {
           "answerCode": "incomeinterval4",
           "answerText": "Over 300 001 SEK"
          }
        ]
      },
     "questionCode": "income"
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/verify-application"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-no"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
500 fatal Unexpected error, logs may give details about the problem 

8.2 Create Limit-upgrade-application

Add limit upgrade application

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "creditLimit": 5000.00,
 "accountNo": "123456",
 "languageCode": "Sv",
 "specialIntent": "limit-upgrade-for-invoice-conversion",
 "applicationOptions": {
   "customerPreAuthenticated": false
  }
}

Request object specification

Property Data typeFormatRequiredDescription
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Yes Credit limit on account applied for, can't have more than 2 decimal places
accountNo string  Yes The identifier of the account
languageCode string 
  • Sv
  • En
  • No
  • Dk
Yes  
specialIntent string  No Optional instruction used in special cases. Possible values (IncreaseLimitForInvoiceConversion)
applicationOptions object   No  
   customerPreAuthenticated boolean  Yes Optional flag used when the customer is pre-authenticated. Defaults to false

Example of response on successfully created limit upgrade application

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "limitUpgradeApplicationId": "123e4567-e89b-12d3-a456-426614174000",
 "specialIntent": "limit-upgrade-for-invoice-conversion",
 "languageCode": "Sv",
 "accountNo": "123456",
 "creditLimit": 5000.00,
 "applicationOptions": {
   "customerPreAuthenticated": false
  },
 "signBankidSe": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "kycAnswers": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers",
 "status": "AwaitingSign",
 "@id": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000",
 "kycQuestions": [
    {
     "questionText": "What is your current employment?",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "selfemployed",
           "answerText": "Own business"
          },
          {
           "answerCode": "private_employee",
           "answerText": "Private employee"
          },
          {
           "answerCode": "goverment_employee",
           "answerText": "Government employee"
          }
        ]
      },
     "questionCode": "employment"
    },
    {
     "questionText": "What is your yearly income",
     "answer": {
       "type": "single",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "incomeinterval1",
           "answerText": "0-100 000 SEK"
          },
          {
           "answerCode": "incomeinterval2",
           "answerText": "100 001-200 000 SEK"
          },
          {
           "answerCode": "incomeinterval3",
           "answerText": "200 001-300 000 SEK"
          },
          {
           "answerCode": "incomeinterval4",
           "answerText": "Over 300 001 SEK"
          }
        ]
      },
     "questionCode": "income"
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/verify-application"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/begin-sign-bankid-no"
    }
  ]
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if a valid account is not available. 
409 account-status Occurs if the account status is invalid for the request to be made. 
409 credit-limit-already-sufficient Occurs if the requested credit limit is invalid because it is already sufficient. 
422 invalid-special-intent Occurs if the provided special intent is invalid. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Credit limit on account applied for, can't have more than 2 decimal places
accountNo string  The identifier of the account
languageCode string 
  • Sv
  • En
  • No
  • Dk
 
specialIntent string  Optional instruction used in special cases. Possible values (IncreaseLimitForInvoiceConversion)
applicationOptions object    
   customerPreAuthenticated boolean  Optional flag used when the customer is pre-authenticated. Defaults to false
limitUpgradeApplicationId string  LimitUpgradeApplicationId
status string 
  • AwaitingComplementaryInfo
  • AwaitingVerification
  • AwaitingSign
  • Rejected
  • InitializedDigitalSign
  • SignRejectedOrFailed
  • SignMismatch
  • Approved
 
kycAnswers dynamic   The kyc resource
signBankidSe dynamic   The sign bankid se resource
kycQuestions array    
   questionCode string  The code definition of the question
   questionText string  The translated text of the question
   answer object    
      type string  The type of the expected answer: single | multi | text
      required boolean  If the answer is required
      textValidationRegEx string  The regex the answer should match
      possibleAnswers array    
         answerCode string  The code definition of the answer
         answerText string  The translated text of the answer
         subQuestions array    
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

9. Kyc-answers

Get the submited answers to kyc questions

9.1 Get list of Kyc-answers

Request
GET /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved kyc answers

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 kyc-not-configured Occurs if the application does not support KYC answers due to the account profile not being configured with any. 
500 fatal Unexpected error, logs may give details about the problem 

9.2 Create Kyc-answer

Submit answers to kyc questions

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ]
}

Request object specification

Property Data typeFormatRequiredDescription
answers array   Yes  
   questionCode string  Yes The code definition of the question
   answerCode string  Yes The code definition of the answer

Example of response on successfully created kyc answers

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "answers": [
    {
     "questionCode": "employment",
     "answerCode": "selfemployed"
    },
    {
     "questionCode": "monthlyincome",
     "answerCode": "monthlyincomeinterval2"
    },
    {
     "questionCode": "ispep",
     "answerCode": "false"
    }
  ],
 "@id": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/kyc-answers"
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 validation Occurs if the validation of the resource's state fails. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 kyc-not-configured Occurs if the application does not support KYC answers due to the account profile not being configured with any. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
answers array    
   questionCode string  The code definition of the question
   answerCode string  The code definition of the answer

10. Verify-application

10.1 Create Verify-application

Verify the application and does a credit check if needed

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/verify-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
422 credit-check-declined Occurs if the credit check is denied. 
500 fatal Unexpected error, logs may give details about the problem 

11. Begin-sign-bankid-no

11.1 Create Begin-sign-bankid-no

Initiate Norwegain bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/begin-sign-bankid-no HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "completeUrl": "https://sucessful-page?id=123",
 "cancelUrl": "https://unsucessful-page?id=123",
 "callbackUrl": "https://my-callback-url?id=123"
}

Request object specification

Property Data typeFormatRequiredDescription
completeUrl string  No Url to redirect the user from Signicat Signing when signing has been completed
cancelUrl string  No Url to redirect the user from Signicat Signing when user choose to cancel the ongoing signing
callbackUrl string  No Specify a callback url that will be called to notify about status change. If empty no callback is done. Supported HTTP request methods [GET]

Example of successful response. This response has started a background process that begin polling for update about the signing for a limited time.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "signingUrl": "https://example-signicat.com/std/docaction/profile-identify?request_id=123456abcdefg"
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  Url to Signicat Signing. The url to the signing order can be signed by who ever has Norwegian BankId so be sure it's the customer of the account that signs else the onboarding will fail later on

12. Begin-sign-bankid-no

12.1 Create Begin-sign-bankid-no

Initiate Norwegain bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/begin-sign-bankid-no HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "completeUrl": "https://sucessful-page?id=123",
 "cancelUrl": "https://unsucessful-page?id=123",
 "callbackUrl": "https://my-callback-url?id=123"
}

Request object specification

Property Data typeFormatRequiredDescription
completeUrl string  No Url to redirect the user from Signicat Signing when signing has been completed
cancelUrl string  No Url to redirect the user from Signicat Signing when user choose to cancel the ongoing signing
callbackUrl string  No Specify a callback url that will be called to notify about status change. If empty no callback is done. Supported HTTP request methods [GET]

Example of successful response. This response has started a background process that begin polling for update about the signing for a limited time.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "signingUrl": "https://example-signicat.com/std/docaction/profile-identify?request_id=123456abcdefg"
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  Url to Signicat Signing. The url to the signing order can be signed by who ever has Norwegian BankId so be sure it's the customer of the account that signs else the onboarding will fail later on

13. Begin-sign-bankid-se

13.1 Create Begin-sign-bankid-se

Initiate bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/begin-sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "callbackUrl": "https://myCallbackUrl"
}

Request object specification

Property Data typeFormatRequiredDescription
callbackUrl string  No If callback should be done on status change, it is done to the callback url. If empty no callback is done.

Example of response on successfully created begin sign bankid se. The signing process is carried out in a background process even after the response is returned.

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "autoStartToken": "cdc9b137-f7ef-4f75-af57-3b6e2eb15886",
 "operations": []
}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
callbackUrl string  If callback should be done on status change, it is done to the callback url. If empty no callback is done.
autoStartToken string  Guid from BankID. Used when starting the BankID application on mobile phones
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]

14. Sign-bankid-se

Retrieve bankid signing process data

14.1 Get list of Sign-bankid-se

Request
GET /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Example of response on successfully retrieved sign bankid se. This should be polled. The resource is updated in the signing process running in the background.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested resource isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
500 fatal Unexpected error, logs may give details about the problem 

14.2 Create Sign-bankid-se

Initiate bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl"
}

Request object specification

Property Data typeFormatRequiredDescription
endUserIp string  Yes IP address of the end user.
callbackUrl string  No If callback should be done on status change, it is done to the callback url. If empty no callback is done.

Example of response on successfully created sign bankid se. The signing process is carried out in a background process even after the response is returned.

Response
HTTP/1.1 201 Created
Content-Type: application/json

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "@id": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se",
 "endUserIp": "194.168.2.25",
 "callbackUrl": "https://myCallbackUrl",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/account-onboarding/v2/xxx/limit-upgrade-applications/123e4567-e89b-12d3-a456-426614174000/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
400 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
endUserIp string  IP address of the end user.
callbackUrl string  If callback should be done on status change, it is done to the callback url. If empty no callback is done.
autostartToken string Type: uuid Autostart token to start BankId on the device client's current device.
qrCodeImageDataUrl string  QR code in Base64 that the end user needs to scan on another device than the one used to initiate.
status string 
  • 0
  • 1
  • 2
 
hintCode string 
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
 
operations array  List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
@id string  Uri identifier of the current resource

15. Begin-sign-mitid-dk

15.1 Create Begin-sign-mitid-dk

Initiate Danish mitid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/applications/{applicationId}/begin-sign-mitid-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}

Request object specification

Property Data typeFormatRequiredDescription
completeUrl string  No Url to redirect the user from Signicat Signing when signing has been completed
cancelUrl string  No Url to redirect the user from Signicat Signing when user choose to cancel the ongoing signing
callbackUrl string  No Specify a callback url that will be called to notify about status change. If empty no callback is done. Supported HTTP request methods [GET]

Example of successful response. This response has started a background process that begins polling for update about the signing for a limited time.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  Url to Signicat Signing. The url to the signing order can be signed by who ever has Danish BankId so be sure it's the customer of the account that signs else the onboarding will fail later on

16. Begin-sign-mitid-dk

16.1 Create Begin-sign-mitid-dk

Initiate Danish mitid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/begin-sign-mitid-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}

Request object specification

Property Data typeFormatRequiredDescription
completeUrl string  No Url to redirect the user from Signicat Signing when signing has been completed
cancelUrl string  No Url to redirect the user from Signicat Signing when user choose to cancel the ongoing signing
callbackUrl string  No Specify a callback url that will be called to notify about status change. If empty no callback is done. Supported HTTP request methods [GET]

Example of successful response. This response has started a background process that begins polling for update about the signing for a limited time.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{}

Possible problems

Http status Problem type Description
400 validation Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 company-not-configured Occurs when operations is not supported with the ledger current configuration. This configuration may or may not be immutable. 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  Url to Signicat Signing. The url to the signing order can be signed by who ever has Danish BankId so be sure it's the customer of the account that signs else the onboarding will fail later on

17. Cancel

17.1 Create Cancel

Cancel bankid signing process

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}/sign-bankid-se/cancel HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Occurs if the requested application isn't found. 
404 resource-unavailable Occurs if the requested resource is unavailable when retrieving it from the cache. 
409 invalid-application-state Occurs if the application state is invalid for the request to be made. 
409 invalid-bank-id-state Occurs if the bankId state is invalid for the request to be made. 
500 fatal Unexpected error, logs may give details about the problem 

18. Create-account-without-application

18.1 Create Create-account-without-application

Create a new account for a consumer, with the selected offer. Only one account i permitted for a combination of consumer and offer

Request
POST /ledger/account-onboarding/v2/{ownerNo}/offers/{accountProfile}/create-account-without-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "customerNo": "951753456",
 "creditLimit": 5000.00
}

Request object specification

Property Data typeFormatRequiredDescription
customerNo string  Yes The identifier of the customer
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Yes Credit limit on account applied for, can't have more than 2 decimal places

Example of response on successfully created account.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "accountNo": "123456",
 "customerNo": "951753456",
 "creditLimit": 5000.00
}

Possible problems

Http status Problem type Description
400 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
400 not-found occurs if the customer supplied does not exist 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
customerNo string  The identifier of the customer
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Credit limit on account applied for, can't have more than 2 decimal places
accountNo string  Account number

19. Limit-upgrade-without-application

19.1 Create Limit-upgrade-without-application

Update limit for a account, it's possible to both lower and increase the amount.

Request
POST /ledger/account-onboarding/v2/{ownerNo}/limit-upgrade-without-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "accountNo": "123456",
 "creditLimit": 5000.00
}

Request object specification

Property Data typeFormatRequiredDescription
accountNo string  Yes The identifier of the account
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Yes Credit limit on account applied for, can't have more than 2 decimal places

Example of response on successfully updated account limit.

Response
HTTP/1.1 200 OK
Content-Type: application/json

{
 "accountNo": "123456",
 "creditLimit": 5000.00
}

Possible problems

Http status Problem type Description
400 validation occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 
400 account-name-not-found occurs if account isn't found. 
409 company-not-configured occurs if company supplied isn't configured 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
@id string  Uri identifier of the current resource
accountNo string  The identifier of the account
creditLimit number Type: double
Pattern: ^\d+.?(\d{1,2})?$
Max: 100000000
Min: 0 
Credit limit on account applied for, can't have more than 2 decimal places

Problems

All errors from the api are returned in the form of "problems" (response body), except for the http status code itself.
The problem object contain more detailed info on what the error is. The "type" property can be used to programmatically interpret the error as it contains a code definition of the problem.
Other properties can be useful for logging and subsequent troubleshooting. Some problems are extended with additional parameters so it may be a good idea to log response body as raw data to include these.

Problems of type validation does contain an additional list ("Problems") that describes exactly which parameter that failed the validation

Example

Response
HTTP/1.1 400 Error
Content-Type: application/problem+json

{
  "Type" : "ledger/{domain}/v1/problems/validation",
  "Title" : "A validation error occurred",
  "Status" : 400,
  "Instance" : "215d4206-ca35-4f43-85ad-169c8f6d4ec1",
  "Detail" : "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
  "Problems" :
      {
        "amount" : [
           "Expected value between [0,01]-[79228162514264337593543950335] actual [0]"
         ]
      }
}

 

Created by David Persson on 2024/02/21 07:45