From empty
To version 19.1
edited by David Persson
on 2020/01/16 23:59
Change comment: There is no comment for this version

Summary

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