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