public-account-transaction-230301

1. Account-applications

Get an ongoing application for a new credit account

1.1 Get list of Account-applications

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Initiate new account-application

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

{
 "status": "AwaitingComplementaryInfo",
 "kycQuestions": [
    {
     "questionCode": "IsPep",
     "questionText": "Customer is PEP (Politically exposed person)",
     "answer": {
       "type": "Boolean",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "IsPepYes",
           "answerText": "Yes"
          },
          {
           "answerCode": "IsPepNo",
           "answerText": "No"
          }
        ]
      }
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/verify-application"
    },
    {
     "rel": "redirect-kalp-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/redirect-kalp-dk"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-bankid-no"
    }
  ],
 "countryCode": "SE"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

1.2 Create Account-application

Begins the application for creating of a new credit account

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Initiate new account-application

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

{
 "status": "AwaitingComplementaryInfo",
 "kycQuestions": [
    {
     "questionCode": "IsPep",
     "questionText": "Customer is PEP (Politically exposed person)",
     "answer": {
       "type": "Boolean",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "IsPepYes",
           "answerText": "Yes"
          },
          {
           "answerCode": "IsPepNo",
           "answerText": "No"
          }
        ]
      }
    }
  ],
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/verify-application"
    },
    {
     "rel": "redirect-kalp-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/redirect-kalp-dk"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/begin-sign-bankid-no"
    }
  ],
 "countryCode": "SE",
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 application-exists An Application resource already exists for this PreAuthorization 
409 invalid-state Invalid state for any of the targeted resources, see detail for more information 
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
status string  Current status of the application, one of the following (ignore case sensitivity): AwaitingComplementaryInfo | AwaitingVerification | AwaitingSign | Rejected | InitilizedDigitalSign | SignRejectedOrFailed | Approved
kycQuestions array    
   questionCode string  
   questionText string  
   answer object    
      type string  
      required boolean  
      textValidationRegEx string  
      possibleAnswers array    
         answerCode string  
         answerText string  
         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]]
countryCode string  Country code of the ledger company in the format of [ISO 3166-1 2]
offer object    
   accountProfile string  
   title string  
   currency string  
   maxCreditLimit number Type: double 
   reminderFee number Type: double 
   penaltyInterestRate number Type: double 
   termsAndConditions object    
      standardEuropeanAgreements string  
      accountTerms string  

2. Kyc-answers

Get the current set of answers of the KYC questions exposed from AccountApplication resource

2.1 Get list of Kyc-answers

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Answer response example

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

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

2.2 Create Kyc-answer

Set answers of the questions exposed from AccountApplication resource. Always post a full set of answers

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ]
}

Request object specification

Property Data typeFormatRequiredDescription
answers array   Yes  
   code string  Yes Predefined question code for 
   answerCode string  Yes Predefined answer code for

Answer response example

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

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ],
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/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 Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
answers array    
   code string  Predefined question code for 
   answerCode string  Predefined answer code for
@id string  Uri identifier of the current resource

3. Verify-application

3.1 Create Verify-application

Verifying application signing

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/verify-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}
Response
HTTP/1.1 204 NO CONTENT
Content-Type: application/json

{}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

4. Begin-sign-bankid-se

4.1 Create Begin-sign-bankid-se

Begin signing with Swedish Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/begin-sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

begin signing response example

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

{
 "autoStartToken": "MhVrFOAClUaJUx6QqnLgCw",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
autoStartToken string  Guid from BankID. Used when starting the BankID application on mobile phones
nativeAppSwitchingUrl string  Url used to switch back to app from bankId

5. Begin-sign-bankid-se

5.1 Create Begin-sign-bankid-se

Begin signing with Swedish Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/begin-sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Begin signing with swedish bankid response

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

{
 "autoStartToken": "MhVrFOAClUaJUx6QqnLgCw",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or account-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
autoStartToken string  Guid from BankID. Used when starting the BankID application on mobile phones
nativeAppSwitchingUrl string  Url used to switch back to app from bankId

6. Begin-sign-bankid-no

6.1 Create Begin-sign-bankid-no

Begin signing with Norwegian Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/begin-sign-bankid-no HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Begin signing with Norwegian bankid response

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

{
 "signingUrl": "url"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  

7. Begin-sign-bankid-no

7.1 Create Begin-sign-bankid-no

Begin signing with Norwegian Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/begin-sign-bankid-no HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Begin signing with Norwegian bankid response

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

{
 "signingUrl": "url"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or account-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  

8. Begin-sign-mitid-dk

8.1 Create Begin-sign-mitid-dk

Begin signing with Danish MitID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/begin-sign-mitid-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Begin signing with Danish MitID response

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

{
 "signingUrl": "url"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  

9. Begin-sign-mitid-dk

9.1 Create Begin-sign-mitid-dk

Begin signing with Danish MitID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/begin-sign-mitid-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Begin signing with Danish MitID response

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

{
 "signingUrl": "url"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or account-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
signingUrl string  

10. Redirect-kalp-dk

10.1 Create Redirect-kalp-dk

Creates or gets a url for the Kalp page that the customer need to fill out to continue the limit upgrade application process

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/redirect-kalp-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Example of a response from the Limit Upgrade Application RedirectKalpDk operation

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

{
 "redirectUrl": "https://flow.monthio.com/?sessionId=kalpid"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this operation 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
redirectUrl string  

11. Redirect-kalp-dk

11.1 Create Redirect-kalp-dk

Creates or gets a url for the Kalp page that the customer need to fill out to continue the application process

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/redirect-kalp-dk HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Example of a response from the Application RedirectKalpDk operation

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

{
 "redirectUrl": "https://flow.monthio.com/?sessionId=kalpid"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or account-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this operation 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

Property Data typeFormatDescription
redirectUrl string  

12. Sign-bankid-se

Poll this to observe the signing process

12.1 Get list of Sign-bankid-se

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Poll result from begun signing with swedish bankid response

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

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or LimitUpgradeApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

12.2 Create Sign-bankid-se

Begin signing with Swedish BankID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}

Request object specification

Property Data typeFormatRequiredDescription

Begin signing with swedish bankid response

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

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/sign-bankid-se",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or LimitUpgradeApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
autostartToken string  Autostart token to start BankId on the device client's current device.
nativeAppSwitchingUrl string  Url used to switch back to app from BankId
qrCodeImageDataUrl string  QR code in Base64 that the end user needs to scan on another device than the one used to initiate.
status string  BankId status, one of the following (ignore case sensitivity): Pending | Complete | Failed
hintCode string  BankId hint code, one of the following (ignore case sensitivity): OutstandingTransaction | Started | UserSign | ExpiredTransaction | CertificateErr | UserCancel | Cancelled | StartFailed
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]]

13. Sign-bankid-se

Poll this to observe the signing process

13.1 Get list of Sign-bankid-se

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Poll result from begun signing with swedish bankid response

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

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

13.2 Create Sign-bankid-se

Begin signing with Swedish BankID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/sign-bankid-se HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}

Request object specification

Property Data typeFormatRequiredDescription

Begin signing with swedish bankid response

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

{
 "autostartToken": "7c40b5c9-fa74-49cf-b98c-bfe651f9a7c6",
 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
 "qrCodeImageDataUrl": "data:image/png;base64,VeryLongBase64String",
 "status": "Pending",
 "hintCode": "OutstandingTransaction",
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/sign-bankid-se",
 "operations": [
    {
     "rel": "cancel",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/account-applications/sign-bankid-se/cancel"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
autostartToken string  Autostart token to start BankId on the device client's current device.
nativeAppSwitchingUrl string  Url used to switch back to app from BankId
qrCodeImageDataUrl string  QR code in Base64 that the end user needs to scan on another device than the one used to initiate.
status string  BankId status, one of the following (ignore case sensitivity): Pending | Complete | Failed
hintCode string  BankId hint code, one of the following (ignore case sensitivity): OutstandingTransaction | Started | UserSign | ExpiredTransaction | CertificateErr | UserCancel | Cancelled | StartFailed
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. Cancel

14.1 Create Cancel

Cancel signing with Swedish BankID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/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 Found no PreAuthorization or LimitUpgradeApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

15. Cancel

15.1 Create Cancel

Cancel signing with Swedish BankID

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/account-applications/sign-bankid-se/cancel HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{}

Request object specification

Property Data typeFormatRequiredDescription
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

16. Limit-upgrade-applications

Get an application for expanding limit on existing credit account

16.1 Get list of Limit-upgrade-applications

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

LimitUpgradeApplication example with one KYC question prepared

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

{
 "kycQuestions": [
    {
     "questionCode": "IsPep",
     "questionText": "Customer is PEP (Politically exposed person)",
     "answer": {
       "type": "Boolean",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "IsPepYes",
           "answerText": "Yes"
          },
          {
           "answerCode": "IsPepNo",
           "answerText": "No"
          }
        ]
      }
    }
  ],
 "status": "AwaitingComplementaryInfo",
 "countryCode": "NO",
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/verify-application"
    },
    {
     "rel": "redirect-kalp-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/redirect-kalp-dk"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-bankid-no"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or LimitUpgradeApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

16.2 Create Limit-upgrade-application

Begins an application for upgrading limit on existing credit account

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

LimitUpgradeApplication example with one KYC question prepared

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

{
 "kycQuestions": [
    {
     "questionCode": "IsPep",
     "questionText": "Customer is PEP (Politically exposed person)",
     "answer": {
       "type": "Boolean",
       "required": true,
       "possibleAnswers": [
          {
           "answerCode": "IsPepYes",
           "answerText": "Yes"
          },
          {
           "answerCode": "IsPepNo",
           "answerText": "No"
          }
        ]
      }
    }
  ],
 "status": "AwaitingComplementaryInfo",
 "countryCode": "NO",
 "operations": [
    {
     "rel": "add-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/sign-bankid-se"
    },
    {
     "rel": "add-kyc-answers",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/kyc-answers"
    },
    {
     "rel": "verify-application",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/verify-application"
    },
    {
     "rel": "redirect-kalp-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/redirect-kalp-dk"
    },
    {
     "rel": "begin-sign-mitid-dk",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-mitid-dk"
    },
    {
     "rel": "begin-sign-bankid-se",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-bankid-se"
    },
    {
     "rel": "begin-sign-bankid-no",
     "method": "POST",
     "href": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/begin-sign-bankid-no"
    }
  ],
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 application-exists An Application resource already exists for this PreAuthorization 
409 invalid-state Invalid state for any of the targeted resources, see detail for more information 
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
kycQuestions array    
   questionCode string  
   questionText string  
   answer object    
      type string  
      required boolean  
      textValidationRegEx string  
      possibleAnswers array    
         answerCode string  
         answerText string  
         subQuestions array    
status string  Current status of the application, one of the following (ignore case sensitivity): AwaitingComplementaryInfo | AwaitingVerification | AwaitingSign | Rejected | InitilizedDigitalSign | SignRejectedOrFailed | Approved
countryCode string  Country code of the ledger company in the format of [ISO 3166-1 2]
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]]

17. Kyc-answers

Get answer and question codes that has been posted.

17.1 Get list of Kyc-answers

Request
GET /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

Answer response example

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

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ]
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

17.2 Create Kyc-answer

Set answers of the questions exposed from LimitUpgradeApplication resource. Always post a full set of answers

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/kyc-answers HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ]
}

Request object specification

Property Data typeFormatRequiredDescription
answers array   Yes  
   code string  Yes Predefined question code
   answerCode string  Yes Predefined answer code

Answer response example

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

{
 "answers": [
    {
     "code": "IsPep",
     "answerCode": "IsPepNo"
    }
  ],
 "@id": "/ledger/public-account-transaction/v1/xxx/pre-authorization/limit-upgrade-applications/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 Found no PreAuthorization or AccountApplication for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

Response object specification

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

18. Verify-application

18.1 Create Verify-application

Verifying application signing

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/limit-upgrade-applications/verify-application HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}
Response
HTTP/1.1 204 NO CONTENT
Content-Type: application/json

{}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

19. Begin-bankid-no-authentication

19.1 Create Begin-bankid-no-authentication

Begin authenticating by initiating Norwegian Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/begin-bankid-no-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

SCAAuthenticationRequired example

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

{
 "nationalConsumerIdentifier": "29090816894",
 "msisdn": "1422678453",
 "preAuthorizationId": "1d5d07507eed48158ef6149aabe7def7"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
nationalConsumerIdentifier string  NationalConsumerIdentifier for customer, used by web to prefill Signicat identification process.
msisdn string  Cellphone number, used by web to prefill Signicat identification process.
preAuthorizationId string  Id for the current PreAuthorization resource, used as state for Curity.

20. Begin-bankid-se-authentication

20.1 Create Begin-bankid-se-authentication

Begin authenticating by initiating Swedish Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/begin-bankid-se-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}
Response
HTTP/1.1 204 NO CONTENT
Content-Type: application/json

{}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

21. Begin-mitid-dk-authentication

21.1 Create Begin-mitid-dk-authentication

Begin authenticating by initiating Danish Bankid

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/begin-mitid-dk-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

SCAAuthenticationRequired example

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

{
 "nationalConsumerIdentifier": "1507079942",
 "preAuthorizationId": "1d5d07507eed48158ef6149aabe7def7"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
nationalConsumerIdentifier string  NationalConsumerIdentifier for customer, used by web to prefill Signicat identification process.
preAuthorizationId string  Id for the current PreAuthorization resource, used as state for Curity.

22. Verify-authentication

22.1 Create Verify-authentication

Verifying application signing

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/verify-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "accessToken": "asdfghjkl123456789"
}

Request object specification

Property Data typeFormatRequiredDescription
accessToken string  Yes Curity verification token
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

23. Verify-bankid-no-authentication

23.1 Create Verify-bankid-no-authentication

Verifying application signing

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/verify-bankid-no-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "code": "asdfghjkl123456789",
 "state": "asdasd"
}

Request object specification

Property Data typeFormatRequiredDescription
code string  Yes Curity Code
state string  Yes Curity State
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

24. Verify-mitid-dk-authentication

24.1 Create Verify-mitid-dk-authentication

Verifying application signing

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/verify-mitid-dk-authentication HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
 "code": "asdfghjkl123456789",
 "state": "asdasd"
}

Request object specification

Property Data typeFormatRequiredDescription
code string  Yes Curity Code
state string  Yes Curity State
Response
HTTP/1.1 201 CREATED
Content-Type: application/json

{
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
500 fatal Unexpected error, logs may give details about the problem 

25. Redirect-back

25.1 Create Redirect-back

ReadyForAuthorization pre-authorization

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/redirect-back HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

ReadyForAuthorization example

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

{
 "returnUrl": "https://asd.nu"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization or limit-upgrade-application for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
returnUrl string  Url to return the end user to after process is completed

26. Cancel

26.1 Create Cancel

Cancel pre-authorization

Request
POST /ledger/public-account-transaction/v1/{ownerNo}/pre-authorization/cancel HTTP/1.1
Host: -
Authorization: Bearer<Token>
Content-Type: application/json

{
}

Cancel PreAuthorization response example

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

{
 "returnUrl": "return-url.com/complete"
}

Possible problems

Http status Problem type Description
404 not-found Found no PreAuthorization for provided id on this ledger 
409 invalid-state Provided PreAuthorization resource is in a invalid state for this method 
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
returnUrl string  Url to return the end user to after process is completed

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 Thomas Hedström on 2023/03/01 16:10