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