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