Changes for page ../credit-account-onboarding
Last modified by David Persson on 2020/04/21 08:18
From empty
To version 50.1
edited by David Persson
on 2020/03/12 13:14
on 2020/03/12 13:14
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 3 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +../credit-account-onboarding - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.credit-account.api.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 - XWiki.XWikiGuest1 +xwiki:XWiki.dap - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +px-custom-page-content - Content
-
... ... @@ -1,0 +1,446 @@ 1 +(% class="jumbotron" %) 2 +((( 3 +(% class="container" %) 4 +((( 5 +Integrate to **PayEx Credit Account Onboarding API ** 6 +))) 7 +))) 8 + 9 +(% id="HChangelog" %) 10 += Changelog = 11 + 12 +2020-03-02 13 + 14 +* Added statuses on applicationresource: "InitializedSigning" and "SigningFailed" 15 + 16 +2020-02-28 17 + 18 +* minor changes in kyc object structure 19 + 20 +2020-02-14 21 + 22 +* changed KYC object in ApplicationResource 23 + 24 +(% class="lead" id="HThisAPIisusedtolistcurrentlyavailablecreditaccountoffersaswellastheassociatedonboardingprocess" %) 25 +This API is used to list currently available credit account offers as well as the associated onboarding process 26 + 27 +== [[image:1581023587369-139.png||height="253" width="461"]] == 28 + 29 +== Offers == 30 + 31 +==== List all offers ==== 32 + 33 +{{code language="http" title="**Response**"}} 34 +GET /ledger/credit-account-onboarding/v1/XXX/offers HTTP/1.1 35 +Host: - 36 +Authorization: Bearer <Token> 37 +Content-Type: application/json 38 + 39 +{ 40 + "operations": null, 41 + "items": [ 42 + { 43 + "accountProfile" : "kontotyp-1", 44 + "title" : "kontotyp 1", 45 + "currency" : "SEK", 46 + "maxCreditLimit" : 50000.00, 47 + "interestFreePurchaseMonth" : true|false, 48 + "monthlyAdminFee" : 35.00, 49 + "reminderFee" : 35.00, 50 + "interest" : 35.00, 51 + "termsAndConditions" : 52 + { 53 + "standardEuropeeanAgreements" : "https://www.payex.com/term-and-conditions/no/-----.pdf", 54 + "accountTerms" : "https://www.payex.com/term-and-conditions/no/-----.pdf" 55 + }, 56 + "@id" : "/ledger/credit-account-onboarding/v1/XXX/offers/kontotyp-1", 57 + }, 58 + { 59 + "accountProfile" : "kontotyp-2", 60 + "title" : "kontotyp 2", 61 + "currency" : "SEK", 62 + "maxCreditLimit" : 0.00, 63 + "interestFreePurchaseMonth" : true|false, 64 + "monthlyAdminFee" : 35.00, 65 + "reminderFee" : 35.00, 66 + "interest" : 35.00, 67 + "termsAndConditions" : 68 + { 69 + "standardEuropeeanAgreements" : "https://www.payex.com/term-and-conditions/no/-----.pdf", 70 + "accountTerms" : "https://www.payex.com/term-and-conditions/no/-----.pdf" 71 + }, 72 + "@id" : "/ledger/credit-account-onboarding/v1/XXX/offers/kontotyp-2", 73 + } 74 + ], 75 + "@id": "/ledger/credit-account-onboarding/v1/XXX/offers", 76 + "view": { 77 + "@id": "/ledger/credit-account-onboarding/v1/XXX/offers?$top=2&$skip=0", 78 + "next": "/ledger/credit-account-onboarding/v1/XXX/offers?$top=2&$skip=2" 79 + } 80 +} 81 +{{/code}} 82 + 83 +==== Offers Resource ==== 84 + 85 +{{code language="http" title="**Response**"}} 86 +HTTP/1.1 200 OK 87 +Content-Type: application/json 88 + 89 +{ 90 + "accountProfile" : "kontotyp-1000", 91 + "title" : "kontotyp 1,000", 92 + "currency" : "NOK", 93 + "maxCreditLimit" : 50000.00, 94 + "interestFreePurchaseMonth" : true|false, 95 + "monthlyAdminFee" : 35.00, 96 + "reminderFee" : 35.00, 97 + "interest" : 35.00, 98 + "termsAndConditions" : 99 + { 100 + "standardEuropeeanAgreements" : "https://www.payex.com/term-and-conditions/no/-----.pdf", 101 + "accountTerms" : "https://www.payex.com/term-and-conditions/no/-----.pdf" 102 + }, 103 + "@id" : "/ledger/credit-account-onboarding/v1/XXX/offers/kontotyp-1000", 104 + "operations" : 105 + [ 106 + { 107 + "rel" : "apply-for-account", 108 + "href" : "/ledger/credit-account-onboarding/v1/XXX/offers/kontotyp-1000/applications", 109 + "method" : "POST" 110 + } 111 + ] 112 +} 113 +{{/code}} 114 + 115 + 116 +**Resource properties** 117 + 118 +(% class="table-bordered table-striped" %) 119 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description 120 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %) 121 +|(% style="width:215px" %)accountProfile|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 50|(% style="width:586px" %) 122 +|(% style="width:215px" %)title|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 50|(% style="width:586px" %) 123 +|(% style="width:215px" %)currency|(% style="width:114px" %)string|(% style="width:118px" %)[[ISO 4217>>url:https://sv.wikipedia.org/wiki/ISO_4217]]|(% style="width:586px" %) 124 +|(% style="width:215px" %)maxCreditLimit|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %) 125 +|(% style="width:215px" %)interestFreePurchaseMonth|(% style="width:114px" %)bool|(% style="width:118px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:586px" %) 126 +|(% style="width:215px" %)monthlyAdminFee|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %) 127 +|(% style="width:215px" %)reminderFee|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %) 128 +|(% style="width:215px" %)termsAndConditions.standardEuropeeanAgreements|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %) 129 +|(% style="width:215px" %)termsAndConditions.accountTerms|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %) 130 + 131 +== Applications == 132 + 133 +==== Add application to offer ==== 134 + 135 +{{code language="http" title="**Request**"}} 136 +POST /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications HTTP/1.1 137 +Host: - 138 +Authorization: Bearer <Token> 139 +Content-Type: application/json 140 + 141 +{ 142 + "nationalConsumerIdentifier" : { 143 + "value" : "19101010-1010", 144 + "countryCode" : "SE" 145 + }, 146 + "creditLimit": 5000.00, 147 + "customerNo" : "951753456", 148 + "emailAddress" : "test@testshop.se", 149 + "cellPhone" : "+46701234456", 150 + "ipAddress": "1.1.1.1", 151 + "legalAddress" : { 152 + "name" : "John Smith", 153 + "streetAddress" : "Teststreet", 154 + "city" : "Testcity", 155 + "coAddress" : "", 156 + "zipCode" : "12345", 157 + "countryCode" : "SE" 158 + }, 159 + "kyc": { 160 + "questions":[ 161 + { 162 + "code": "employment", 163 + "text": "Vad är din sysselsättning?", 164 + "answer" : { 165 + "code": "self-employed", 166 + "text": "Egen företagare" 167 + } 168 + }, 169 + { 170 + "code": "employment-since", 171 + "text": "Hur länge har du haft denna sysselsättning?", 172 + "answer" : { 173 + "code": "2016-09", 174 + "text": "2016-09" 175 + } 176 + }, 177 + { 178 + "code": "monthlyIncome", 179 + "text": "Månadsinkomst före skatt", 180 + "answer" : { 181 + "code": "10000.00", 182 + "text": "10000" 183 + } 184 + }, 185 + { 186 + "code": "monthlyPurchaseAmount", 187 + "text": "Hur mycket kommer du genomsnitt att handla på ditt kort?", 188 + "answer" : { 189 + "code": "3000.00", 190 + "text": "3000" 191 + } 192 + }, 193 + { 194 + "code": "monthlyNumberOfDeposits", 195 + "text": "Hur många inbetalningar kommer du att göra per månad?", 196 + "answer" : { 197 + "code": "1-2", 198 + "text": "1-2" 199 + } 200 + }, 201 + { 202 + "code": "IsPep", 203 + "text": "Är du en person i politiskt utsatt ställning (PEP), det vill säga.....", 204 + "answer" : { 205 + "code" : "true", 206 + "text" : "Ja" 207 + } 208 + } 209 + ] 210 + } 211 +} 212 +{{/code}} 213 + 214 +==== List all applications ==== 215 + 216 +{{code language="http" title="**Request**"}} 217 +GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications HTTP/1.1 218 +Host: - 219 +Authorization: Bearer <Token> 220 +Content-Type: application/json 221 + 222 +{{/code}} 223 + 224 +==== Get a single application ==== 225 + 226 +{{code language="http" title="**Request**"}} 227 +GET /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications/NNN HTTP/1.1 228 +Host: - 229 +Authorization: Bearer <Token> 230 +Content-Type: application/json 231 + 232 +{{/code}} 233 + 234 +==== Applications Resource ==== 235 + 236 +{{code language="http" title="**Response**"}} 237 +HTTP/1.1 200 OK 238 +Content-Type: application/json 239 + 240 +{ 241 + "nationalConsumerIdentifier" : { 242 + "value" : "19101010-1010", 243 + "countryCode" : "SE" 244 + }, 245 + "status" : "awaiting-sign", 246 + "customerNo" : "951753456", 247 + "creditLimit": 5000.00, 248 + "emailAddress" : "test@testshop.se", 249 + "cellPhone" : "+46701234456", 250 + "ipAddress": "1.1.1.1", 251 + "legalAddress" : { 252 + "name" : "John Smith", 253 + "streetAddress" : "Teststreet", 254 + "city" : "Testcity", 255 + "coAddress" : "", 256 + "zipCode" : "12345", 257 + "countryCode" : "SE" 258 + }, 259 + "kyc": { 260 + "questions":[ 261 + { 262 + "code": "employment", 263 + "text": "Vad är din sysselsättning?", 264 + "answer" : { 265 + "code": "self-employed", 266 + "text": "Egen företagare" 267 + } 268 + }, 269 + { 270 + "code": "employment-since", 271 + "text": "Hur länge har du haft denna sysselsättning?", 272 + "answer" : { 273 + "code": "2016-09", 274 + "text": "2016-09" 275 + } 276 + }, 277 + { 278 + "code": "monthlyIncome", 279 + "text": "Månadsinkomst före skatt", 280 + "answer" : { 281 + "code": "10000.00", 282 + "text": "10000" 283 + } 284 + }, 285 + { 286 + "code": "monthlyPurchaseAmount", 287 + "text": "Hur mycket kommer du genomsnitt att handla på ditt kort?", 288 + "answer" : { 289 + "code": "3000.00", 290 + "text": "3000" 291 + } 292 + }, 293 + { 294 + "code": "monthlyNumberOfDeposits", 295 + "text": "Hur många inbetalningar kommer du att göra per månad?", 296 + "answer" : { 297 + "code": "1-2", 298 + "text": "1-2" 299 + } 300 + }, 301 + { 302 + "code": "IsPep", 303 + "text": "Är du en person i politiskt utsatt ställning (PEP), det vill säga.....", 304 + "answer" : { 305 + "code" : "true", 306 + "text" : "Ja" 307 + } 308 + } 309 + ] 310 + }, 311 + "account" : null, 312 + "@id" : "/ledger/credit-account-onboardings/v1/501/offers/kontotyp-10000/applications/1561561-54641515-56456", 313 + "parentHREF" : "/ledger/credit-account-onboardings/v1/XXX/offers/kontotyp-10000", 314 + "operations" : [ 315 + { 316 + "rel" : "sign-agreement", 317 + "href" : "/ledger/credit-account-onboardings/v1/XXX/offers/kontotyp-10000/applications/1561561-54641515-56456/sign-agreement", 318 + "method" : "POST" 319 + } 320 + ] 321 +} 322 +{{/code}} 323 + 324 +**Resource properties** 325 + 326 +(% class="table-bordered table-striped" %) 327 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 133px;" %)Required in post|=(% style="width: 479px;" %)Format|=(% style="width: 586px;" %)Description 328 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Maxlength: |(% style="width:586px" %) 329 +|(% style="width:215px" %)nationalConsumerIdentifier.value|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)YYYYMMDD-NNNC|(% style="width:586px" %)A valid swedish "personnummer" 330 +|(% style="width:215px" %)nationalConsumerIdentifier.countryCode|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:586px" %) 331 +|(% style="width:215px" %)status|(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Maxlength: 25|(% style="width:586px" %)((( 332 +* AwaitingSign 333 +* InitializedSigning 334 +* Approved 335 +* Rejected 336 +* SigningFailed 337 +))) 338 +|(% style="width:215px" %)customerNo|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 50|(% style="width:586px" %) 339 +|(% style="width:215px" %)creditLimit|(% style="width:114px" %)decimal|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %) 340 +|(% style="width:215px" %)emailAddress|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 254 341 +Regex pattern: [^@]+@[^\.]+\..+|(% style="width:586px" %) 342 +|(% style="width:215px" %)cellPhone|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 15|(% style="width:586px" %) 343 +|(% style="width:215px" %)ipAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 43 344 +Regex pattern: [a-z0-9.:/]*|(% style="width:586px" %) 345 +|(% style="width:215px" %)legalAddress.name|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 72|(% style="width:586px" %)end-customer fullname 346 +|(% style="width:215px" %)legalAddress.streetAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 35|(% style="width:586px" %) 347 +|(% style="width:215px" %)legalAddress.city|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 30|(% style="width:586px" %) 348 +|(% style="width:215px" %)legalAddress.coAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 35|(% style="width:586px" %) 349 +|(% style="width:215px" %)legalAddress.zipCode|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 15|(% style="width:586px" %)ZipCode without whitespaces 350 +|(% style="width:215px" %)legalAddress.countryCode|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:586px" %) 351 +|(% style="width:215px" %)account|(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Uri|(% style="width:586px" %)Reference to created account 352 +|(% style="width:215px" %)kyc|(% style="width:114px" %)object|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %)kyc (know your customer). The questions and answers in the above example are just examples of what it might look like. This API does not validate that "correct" questions are asked 353 +|(% style="width:215px" %)kyc.questions|(% style="width:114px" %)list of objects|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %) 354 +|(% style="width:215px" %)kyc.questions.code|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %)The code definition of the question 355 +|(% style="width:215px" %)kyc.questions.text|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %)The actual question text that was presented to the end-customer 356 +|(% style="width:215px" %)kyc.questions.aswer.code|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %)The answered code definition from the end-customer 357 +|(% style="width:215px" %)kyc.questions.aswer.text|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %)The actual displayed answertext that was presented to the customer 358 + 359 +== Sign-agreement (Operation) == 360 + 361 +==== Request ==== 362 + 363 +{{code language="http" title="**Request**"}} 364 +POST /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications/NNN/sign-agreement HTTP/1.1 365 +Host: - 366 +Authorization: Bearer <Token> 367 +Content-Type: application/json 368 + 369 +{{/code}} 370 + 371 +==== Response ==== 372 + 373 +{{code language="http" title="**Request**"}} 374 +HTTP/1.1 201 Created 375 +Content-Type: application/json 376 + 377 +{ 378 + "createdAccount" : "https://api.payex.com/ledger/credit-account/v1/XXX/accounts/123456", 379 +} 380 +{{/code}} 381 + 382 +**Resource properties** 383 + 384 +(% class="table-bordered table-striped" %) 385 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description 386 +|(% style="width:215px" %)createdAccount|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %) 387 + 388 +== Problems == 389 + 390 +If an error occur or any validation failed, a "problem" response will be returned. 391 +Below is a list of problems that can occur: 392 + 393 +**HttpStatus 401 Unauthorized** 394 + 395 +* Token expired 396 +* Token invalid 397 +* SellerNumber does not match token 398 +* CompanyNumber does not match token 399 + 400 +**HttpStatus 400 Error** 401 + 402 +* Validation: Argument required 403 +* Validation: Invalid value 404 + 405 +**HttpStatus 422 Unprocessable entity** 406 + 407 +* Authorization declined 408 + 409 +**HttpStatus 409 Conflict** 410 + 411 +* Invoice already authorized 412 +* Duplicate InvoiceNumber 413 +* Authorization is cancelled 414 +* Authorization already captured 415 +* Authorization has expired 416 +* Insufficient debited amount XXX 417 + 418 +**HttpStatus 501 NotImplemented** 419 + 420 +* CompanyNumber XXX not configured 421 +* SellerNumber XXX not configured at PayEx 422 +* CompanyNumber XXX missing configuration 423 + 424 +**HttpStatus 404 NotFound** 425 + 426 +* Authorization not found 427 + 428 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request. 429 + 430 +{{code language="http" title="**Response**"}} 431 +HTTP/1.1 400 Error 432 +Content-Type: application/problem+json 433 + 434 +{ 435 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation", 436 + "Title": "A validation error occurred", 437 + "Status": 400, 438 + "Instance": null, 439 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.", 440 + "Problems": [ 441 + { 442 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier" 443 + } 444 + ] 445 +} 446 +{{/code}}
- 1579213934206-248.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1581023514718-938.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1581023587369-139.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content