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