Changes for page ../credit-account-onboarding
Last modified by David Persson on 2020/04/21 08:18
From empty
To version 49.1
edited by David Persson
on 2020/03/06 14:39
on 2020/03/06 14:39
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,444 @@ 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 + "emailAddress" : "test@testshop.se", 248 + "cellPhone" : "+46701234456", 249 + "ipAddress": "1.1.1.1", 250 + "legalAddress" : { 251 + "name" : "John Smith", 252 + "streetAddress" : "Teststreet", 253 + "city" : "Testcity", 254 + "coAddress" : "", 255 + "zipCode" : "12345", 256 + "countryCode" : "SE" 257 + }, 258 + "kyc": { 259 + "questions":[ 260 + { 261 + "code": "employment", 262 + "text": "Vad är din sysselsättning?", 263 + "answer" : { 264 + "code": "self-employed", 265 + "text": "Egen företagare" 266 + } 267 + }, 268 + { 269 + "code": "employment-since", 270 + "text": "Hur länge har du haft denna sysselsättning?", 271 + "answer" : { 272 + "code": "2016-09", 273 + "text": "2016-09" 274 + } 275 + }, 276 + { 277 + "code": "monthlyIncome", 278 + "text": "Månadsinkomst före skatt", 279 + "answer" : { 280 + "code": "10000.00", 281 + "text": "10000" 282 + } 283 + }, 284 + { 285 + "code": "monthlyPurchaseAmount", 286 + "text": "Hur mycket kommer du genomsnitt att handla på ditt kort?", 287 + "answer" : { 288 + "code": "3000.00", 289 + "text": "3000" 290 + } 291 + }, 292 + { 293 + "code": "monthlyNumberOfDeposits", 294 + "text": "Hur många inbetalningar kommer du att göra per månad?", 295 + "answer" : { 296 + "code": "1-2", 297 + "text": "1-2" 298 + } 299 + }, 300 + { 301 + "code": "IsPep", 302 + "text": "Är du en person i politiskt utsatt ställning (PEP), det vill säga.....", 303 + "answer" : { 304 + "code" : "true", 305 + "text" : "Ja" 306 + } 307 + } 308 + ] 309 + }, 310 + "account" : null, 311 + "@id" : "/ledger/credit-account-onboardings/v1/501/offers/kontotyp-10000/applications/1561561-54641515-56456", 312 + "parentHREF" : "/ledger/credit-account-onboardings/v1/XXX/offers/kontotyp-10000", 313 + "operations" : [ 314 + { 315 + "rel" : "sign-agreement", 316 + "href" : "/ledger/credit-account-onboardings/v1/XXX/offers/kontotyp-10000/applications/1561561-54641515-56456/sign-agreement", 317 + "method" : "POST" 318 + } 319 + ] 320 +} 321 +{{/code}} 322 + 323 +**Resource properties** 324 + 325 +(% class="table-bordered table-striped" %) 326 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 133px;" %)Required in post|=(% style="width: 479px;" %)Format|=(% style="width: 586px;" %)Description 327 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Maxlength: |(% style="width:586px" %) 328 +|(% 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" 329 +|(% 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" %) 330 +|(% style="width:215px" %)status|(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Maxlength: 25|(% style="width:586px" %)((( 331 +* AwaitingSign 332 +* InitializedSigning 333 +* Approved 334 +* Rejected 335 +* SigningFailed 336 +))) 337 +|(% style="width:215px" %)customerNo|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 50|(% style="width:586px" %) 338 +|(% style="width:215px" %)emailAddress|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 254 339 +Regex pattern: [^@]+@[^\.]+\..+|(% style="width:586px" %) 340 +|(% style="width:215px" %)cellPhone|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 15|(% style="width:586px" %) 341 +|(% style="width:215px" %)ipAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 43 342 +Regex pattern: [a-z0-9.:/]*|(% style="width:586px" %) 343 +|(% style="width:215px" %)legalAddress.name|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 72|(% style="width:586px" %)end-customer fullname 344 +|(% style="width:215px" %)legalAddress.streetAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 35|(% style="width:586px" %) 345 +|(% style="width:215px" %)legalAddress.city|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 30|(% style="width:586px" %) 346 +|(% style="width:215px" %)legalAddress.coAddress|(% style="width:114px" %)string|(% style="width:133px" %)No|(% style="width:479px" %)Maxlength: 35|(% style="width:586px" %) 347 +|(% style="width:215px" %)legalAddress.zipCode|(% style="width:114px" %)string|(% style="width:133px" %)Yes|(% style="width:479px" %)Maxlength: 15|(% style="width:586px" %) 348 +|(% 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" %) 349 +|(% style="width:215px" %)account|(% style="width:114px" %)string|(% style="width:133px" %)-|(% style="width:479px" %)Uri|(% style="width:586px" %)Reference to created account 350 +|(% 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 351 +|(% style="width:215px" %)kyc.questions|(% style="width:114px" %)list of objects|(% style="width:133px" %)Yes|(% style="width:479px" %) |(% style="width:586px" %) 352 +|(% 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 353 +|(% 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 354 +|(% 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 355 +|(% 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 356 + 357 +== Sign-agreement (Operation) == 358 + 359 +==== Request ==== 360 + 361 +{{code language="http" title="**Request**"}} 362 +POST /ledger/credit-account-onboarding/v1/XXX/offers/YYY/applications/NNN/sign-agreement HTTP/1.1 363 +Host: - 364 +Authorization: Bearer <Token> 365 +Content-Type: application/json 366 + 367 +{{/code}} 368 + 369 +==== Response ==== 370 + 371 +{{code language="http" title="**Request**"}} 372 +HTTP/1.1 201 Created 373 +Content-Type: application/json 374 + 375 +{ 376 + "createdAccount" : "https://api.payex.com/ledger/credit-account/v1/XXX/accounts/123456", 377 +} 378 +{{/code}} 379 + 380 +**Resource properties** 381 + 382 +(% class="table-bordered table-striped" %) 383 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description 384 +|(% style="width:215px" %)createdAccount|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %) 385 + 386 +== Problems == 387 + 388 +If an error occur or any validation failed, a "problem" response will be returned. 389 +Below is a list of problems that can occur: 390 + 391 +**HttpStatus 401 Unauthorized** 392 + 393 +* Token expired 394 +* Token invalid 395 +* SellerNumber does not match token 396 +* CompanyNumber does not match token 397 + 398 +**HttpStatus 400 Error** 399 + 400 +* Validation: Argument required 401 +* Validation: Invalid value 402 + 403 +**HttpStatus 422 Unprocessable entity** 404 + 405 +* Authorization declined 406 + 407 +**HttpStatus 409 Conflict** 408 + 409 +* Invoice already authorized 410 +* Duplicate InvoiceNumber 411 +* Authorization is cancelled 412 +* Authorization already captured 413 +* Authorization has expired 414 +* Insufficient debited amount XXX 415 + 416 +**HttpStatus 501 NotImplemented** 417 + 418 +* CompanyNumber XXX not configured 419 +* SellerNumber XXX not configured at PayEx 420 +* CompanyNumber XXX missing configuration 421 + 422 +**HttpStatus 404 NotFound** 423 + 424 +* Authorization not found 425 + 426 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request. 427 + 428 +{{code language="http" title="**Response**"}} 429 +HTTP/1.1 400 Error 430 +Content-Type: application/problem+json 431 + 432 +{ 433 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation", 434 + "Title": "A validation error occurred", 435 + "Status": 400, 436 + "Instance": null, 437 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.", 438 + "Problems": [ 439 + { 440 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier" 441 + } 442 + ] 443 +} 444 +{{/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