From version 76.1
edited by Mats Lyth
on 2024/02/23 07:56
To version 77.1
edited by Mats Lyth
on 2024/02/23 08:03
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,89 +1,138 @@
1 +(% class="jumbotron" %)
2 +(((
3 +
4 +
5 +(% class="container" %)
6 +(((
7 + Integrate to **PayEx Account transaction API **
8 +)))
9 +)))
10 +
11 +
12 += Changelog =
13 +
14 +
15 + 2022-03-18
16 + Added preAuthorizationStatus property on pre-authorization resource
17 + Added hypermedia reference to reversal from capture response
18 + Added hypermedia reference to split-authorization from pre-authorization response
19 +\\\\
20 +
21 += Introduction =
22 +
23 +
24 +\\(% class="lead" %) The account-transaction API is handle payment flows for split-payments and credit accounts for retail finance scenarios. The api contains redirect scenarios for account onboarding, upgrades and authentication.
25 +
26 +
27 +== [[image:PayEx - Ledger API's - ForDeveloper.png||height="844" width="464"]] ==
28 +
29 +
30 +{{display reference="developer:Main.credit-account.api.account-transactions.account-transaction-230301.WebHome"/}}
31 +
32 +(% class=" wikigeneratedheader" %)
1 1  == 1. Pre-authorizations ==
2 2  
3 3  
4 4  Gets already created pre authorization
5 5  
38 +(% class=" wikigeneratedheader" %)
6 6  ==== 1.1 Get specific Pre-authorization ====
7 7  
8 -{{code language="http" title="**Request**"}}
9 -GET /ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId} HTTP/1.1
10 -Host: -
11 -Authorization: Bearer<Token>
12 -Content-Type: application/json
41 +(% class="box" %)
42 +(((
43 +**Request**
13 13  
14 -{{/code}}
45 +(% class="code" %)
46 +(((
47 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
48 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
49 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
50 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
51 +)))
52 +)))
15 15  
16 16  Initiate new pre-authorization
17 17  
18 -{{code language="http" title="**Response**"}}
19 -HTTP/1.1 200 OK
20 -Content-Type: application/json
56 +(% class="box" %)
57 +(((
58 +**Response**
21 21  
22 -{
23 - "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
24 - "preAuthorizationStatus": "Initialized",
25 - "customer": {
26 - "nationalConsumerIdentifier": {
27 - "value": "19101010-1010",
28 - "countryCode": "SE"
60 +(% class="code" %)
61 +(((
62 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
63 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
64 +\\{
65 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationId"**(%%): (% style="color:#ba2121" %)"8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
66 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationStatus"**(%%): (% style="color:#ba2121" %)"Initialized"(%%),
67 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
68 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
69 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
70 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
29 29   },
30 - "email": "abc@test.com",
31 - "msisdn": "4670123456",
32 - "customerNo": "456987"
72 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"abc@test.com"(%%),
73 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"4670123456"(%%),
74 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"456987"(%%)
33 33   },
34 - "sellerNo": "123456",
35 - "sellerReferenceId": "abc-87465123",
36 - "profileName": "configured-profile-name",
37 - "authorizationAmount": 100.50,
38 - "currency": "SEK",
39 - "pointOfSale": "Test shop",
40 - "assessment": {
41 - "assessmentUrl": "/score/sca/{claimantNo}/assessments/{assessmentNo}",
42 - "scaStatus": "Required"
76 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"123456"(%%),
77 + (% style="color:#008000; font-weight:bold" %)**"sellerReferenceId"**(%%): (% style="color:#ba2121" %)"abc-87465123"(%%),
78 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"configured-profile-name"(%%),
79 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)100.50(%%),
80 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
81 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
82 + (% style="color:#008000; font-weight:bold" %)**"assessment"**(%%): {
83 + (% style="color:#008000; font-weight:bold" %)**"assessmentUrl"**(%%): (% style="color:#ba2121" %)"/score/sca/{claimantNo}/assessments/{assessmentNo}"(%%),
84 + (% style="color:#008000; font-weight:bold" %)**"scaStatus"**(%%): (% style="color:#ba2121" %)"Required"(%%)
43 43   },
44 - "operations": [
86 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
45 45   {
46 - "rel": "redirect",
47 - "method": "POST",
48 - "href": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338-d92c-49e7-90bf-304dbf38e0bd/redirect"
88 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"redirect"(%%),
89 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
90 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338-d92c-49e7-90bf-304dbf38e0bd/redirect"(%%)
49 49   }
50 50   ]
51 51  }
52 -{{/code}}
94 +)))
95 +)))
53 53  
54 54  
98 +(% class=" wikigeneratedheader" %)
55 55  ==== 1.2 Create Pre-authorization ====
56 56  
57 57  Check if required conditions are met to begin a transaction. Creates an authentication resource that exposes operation link to redirect if user interaction is required. (Is there an existing account? Is the account's limit sufficient for the new transaction?)
58 58  
59 -{{code language="http" title="**Request**"}}
60 -POST /ledger/account-transaction/v1/{ownerNo}/pre-authorizations HTTP/1.1
61 -Host: -
62 -Authorization: Bearer<Token>
63 -Content-Type: application/json
103 +(% class="box" %)
104 +(((
105 +**Request**
64 64  
65 -{
66 - "customer": {
67 - "nationalConsumerIdentifier": {
68 - "value": "19101010-1010",
69 - "countryCode": "SE"
107 +(% class="code" %)
108 +(((
109 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/pre-authorizations**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
110 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
111 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
112 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
113 +\\{
114 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
115 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
116 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
117 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
70 70   },
71 - "email": "abc@test.com",
72 - "msisdn": "4670123456",
73 - "customerNo": "456987"
119 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"abc@test.com"(%%),
120 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"4670123456"(%%),
121 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"456987"(%%)
74 74   },
75 - "sellerNo": "123456",
76 - "sellerReferenceId": "abc-87465123",
77 - "profileName": "configured-profile-name",
78 - "authorizationAmount": 100.50,
79 - "currency": "SEK",
80 - "pointOfSale": "Test shop",
81 - "assessment": {
82 - "assessmentUrl": "/score/sca/{claimantNo}/assessments/{assessmentNo}",
83 - "scaStatus": "Required"
123 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"123456"(%%),
124 + (% style="color:#008000; font-weight:bold" %)**"sellerReferenceId"**(%%): (% style="color:#ba2121" %)"abc-87465123"(%%),
125 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"configured-profile-name"(%%),
126 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)100.50(%%),
127 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
128 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
129 + (% style="color:#008000; font-weight:bold" %)**"assessment"**(%%): {
130 + (% style="color:#008000; font-weight:bold" %)**"assessmentUrl"**(%%): (% style="color:#ba2121" %)"/score/sca/{claimantNo}/assessments/{assessmentNo}"(%%),
131 + (% style="color:#008000; font-weight:bold" %)**"scaStatus"**(%%): (% style="color:#ba2121" %)"Required"(%%)
84 84   }
85 85  }
86 -{{/code}}
134 +)))
135 +)))
87 87  
88 88  
89 89  **Request object specification**
... ... @@ -119,42 +119,47 @@
119 119  
120 120  Initiate new pre-authorization. Evaluates and decides what needs to be ready for the requested authorize flow
121 121  
122 -{{code language="http" title="**Response**"}}
123 -HTTP/1.1 201 Created
124 -Content-Type: application/json
171 +(% class="box" %)
172 +(((
173 +**Response**
125 125  
126 -{
127 - "preAuthorizationId": "8c535338d92c49e790bf304dbf38e0bd",
128 - "preAuthorizationStatus": "Initialized",
129 - "customer": {
130 - "nationalConsumerIdentifier": {
131 - "value": "19101010-1010",
132 - "countryCode": "SE"
175 +(% class="code" %)
176 +(((
177 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
178 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
179 +\\{
180 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationId"**(%%): (% style="color:#ba2121" %)"8c535338d92c49e790bf304dbf38e0bd"(%%),
181 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationStatus"**(%%): (% style="color:#ba2121" %)"Initialized"(%%),
182 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
183 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
184 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
185 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
133 133   },
134 - "email": "abc@test.com",
135 - "msisdn": "4670123456",
136 - "customerNo": "456987"
187 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"abc@test.com"(%%),
188 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"4670123456"(%%),
189 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"456987"(%%)
137 137   },
138 - "sellerNo": "123456",
139 - "sellerReferenceId": "abc-87465123",
140 - "profileName": "configured-profile-name",
141 - "authorizationAmount": 100.50,
142 - "currency": "SEK",
143 - "pointOfSale": "Test shop",
144 - "assessment": {
145 - "assessmentUrl": "/score/sca/{claimantNo}/assessments/{assessmentNo}",
146 - "scaStatus": "Required"
191 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"123456"(%%),
192 + (% style="color:#008000; font-weight:bold" %)**"sellerReferenceId"**(%%): (% style="color:#ba2121" %)"abc-87465123"(%%),
193 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"configured-profile-name"(%%),
194 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)100.50(%%),
195 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
196 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
197 + (% style="color:#008000; font-weight:bold" %)**"assessment"**(%%): {
198 + (% style="color:#008000; font-weight:bold" %)**"assessmentUrl"**(%%): (% style="color:#ba2121" %)"/score/sca/{claimantNo}/assessments/{assessmentNo}"(%%),
199 + (% style="color:#008000; font-weight:bold" %)**"scaStatus"**(%%): (% style="color:#ba2121" %)"Required"(%%)
147 147   },
148 - "@id": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd",
149 - "operations": [
201 + (% style="color:#008000; font-weight:bold" %)**"@id"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd"(%%),
202 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
150 150   {
151 - "rel": "redirect",
152 - "method": "POST",
153 - "href": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd/redirect"
204 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"redirect"(%%),
205 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
206 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd/redirect"(%%)
154 154   }
155 155   ]
156 156  }
157 -{{/code}}
210 +)))
211 +)))
158 158  
159 159  
160 160  **Possible problems**
... ... @@ -207,28 +207,35 @@
207 207  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
208 208  |@id |string | |Uri identifier of the current resource
209 209  
264 +(% class=" wikigeneratedheader" %)
210 210  == 2. Redirect ==
211 211  
212 212  
268 +(% class=" wikigeneratedheader" %)
213 213  ==== 2.1 Create Redirect ====
214 214  
215 215  Initiates redirect authentication flow, generates redirect url and accepts return url after redirect process finishes. The operation is exposed by the parent authentication if required.
216 216  
217 -{{code language="http" title="**Request**"}}
218 -POST /ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId}/redirect HTTP/1.1
219 -Host: -
220 -Authorization: Bearer<Token>
221 -Content-Type: application/json
273 +(% class="box" %)
274 +(((
275 +**Request**
222 222  
223 -{
224 - "returnUrl": "https://apiconsumerexample.se/transactioncallbackexample",
225 - "redirectOptions": {
226 - "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
227 - "autostartAction": "MhVrFOAClUaJUx6QqnLgCw",
228 - "languageCode": "Sv"
277 +(% class="code" %)
278 +(((
279 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId}/redirect**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
280 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
281 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
282 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
283 +\\{
284 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/apiconsumerexample.se/transactioncallbackexample"(%%),
285 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
286 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myapp:~/~/{ledgerNo}example"(%%),
287 + (% style="color:#008000; font-weight:bold" %)**"autostartAction"**(%%): (% style="color:#ba2121" %)"MhVrFOAClUaJUx6QqnLgCw"(%%),
288 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"Sv"(%%)
229 229   }
230 230  }
231 -{{/code}}
291 +)))
292 +)))
232 232  
233 233  
234 234  **Request object specification**
... ... @@ -243,14 +243,19 @@
243 243  
244 244  Setup the redirect for both the sign/identification page and where to be redirect after
245 245  
246 -{{code language="http" title="**Response**"}}
247 -HTTP/1.1 201 Created
248 -Content-Type: application/json
307 +(% class="box" %)
308 +(((
309 +**Response**
249 249  
250 -{
251 - "redirectUrl": "/ledger/public-account-transaction/v1/{ledgerNo}/8c535338-d92c-49e7-90bf-304dbf38e0bd"
311 +(% class="code" %)
312 +(((
313 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
314 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
315 +\\{
316 + (% style="color:#008000; font-weight:bold" %)**"redirectUrl"**(%%): (% style="color:#ba2121" %)"/ledger/public-account-transaction/v1/{ledgerNo}/8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%)
252 252  }
253 -{{/code}}
318 +)))
319 +)))
254 254  
255 255  
256 256  **Possible problems**
... ... @@ -276,106 +276,131 @@
276 276  |@id |string | |Uri identifier of the current resource
277 277  |redirectUrl |string | |
278 278  
345 +(% class=" wikigeneratedheader" %)
279 279  == 3. Authorization-capture-orders ==
280 280  
281 281  
282 282  Get an existing authorization-capture-orders. The authorization-capture-orders, is used when adding transactions to users account when user is pre identified.
283 283  
351 +(% class=" wikigeneratedheader" %)
284 284  ==== 3.1 Get specific Authorization-capture-order ====
285 285  
286 -{{code language="http" title="**Request**"}}
287 -GET /ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders/{captureId} HTTP/1.1
288 -Host: -
289 -Authorization: Bearer<Token>
290 -Content-Type: application/json
354 +(% class="box" %)
355 +(((
356 +**Request**
291 291  
292 -{{/code}}
358 +(% class="code" %)
359 +(((
360 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders/{captureId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
361 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
362 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
363 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
364 +)))
365 +)))
293 293  
367 +(% class=" wikigeneratedheader" %)
294 294  ===== Success Example =====
295 295  
296 296  Response for a successful authorization and capture
297 297  
298 -{{code language="http" title="**Response**"}}
299 -HTTP/1.1 200 OK
300 -Content-Type: application/json
372 +(% class="box" %)
373 +(((
374 +**Response**
301 301  
302 -{
303 - "status": "processed",
304 - "callbackBody": {
305 - "success": {
306 - "authorization": "/ledger/account-transaction/v1/XXX/authorizations/{authorizationId}"
376 +(% class="code" %)
377 +(((
378 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
379 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
380 +\\{
381 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"processed"(%%),
382 + (% style="color:#008000; font-weight:bold" %)**"callbackBody"**(%%): {
383 + (% style="color:#008000; font-weight:bold" %)**"success"**(%%): {
384 + (% style="color:#008000; font-weight:bold" %)**"authorization"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/XXX/authorizations/{authorizationId}"(%%)
307 307   }
308 308   },
309 - "captureId": "123456",
310 - "authorizationId": 123456789,
311 - "accountNo": "1234",
312 - "callbackUrl": "https://my.com/callback?543245892u59",
313 - "sellerReferenceId": "abc-87465123",
314 - "sellerTransactionId": "654789312",
315 - "authenticationMethod": "2FA",
316 - "currency": "SEK",
317 - "amount": 50.00,
318 - "pointOfSale": "Test shop",
319 - "operations": []
387 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
388 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)123456789(%%),
389 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"1234"(%%),
390 + (% style="color:#008000; font-weight:bold" %)**"callbackUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/my.com/callback?543245892u59"(%%),
391 + (% style="color:#008000; font-weight:bold" %)**"sellerReferenceId"**(%%): (% style="color:#ba2121" %)"abc-87465123"(%%),
392 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
393 + (% style="color:#008000; font-weight:bold" %)**"authenticationMethod"**(%%): (% style="color:#ba2121" %)"2FA"(%%),
394 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
395 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)50.00(%%),
396 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
397 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
320 320  }
321 -{{/code}}
399 +)))
400 +)))
322 322  
402 +(% class=" wikigeneratedheader" %)
323 323  ===== Error Example =====
324 324  
325 325  Response for a unsuccessful authorization or capture
326 326  
327 -{{code language="http" title="**Response**"}}
328 -HTTP/1.1 200 OK
329 -Content-Type: application/json
407 +(% class="box" %)
408 +(((
409 +**Response**
330 330  
331 -{
332 - "status": "processed",
333 - "callbackBody": {
334 - "fail": {
335 - "type": "ledger/account-transaction/v1/problems/validation",
336 - "title": "Not found",
337 - "status": 404,
338 - "detail": "A validation error occurred. Please fix the problems mentioned in the problems property below.",
339 - "instance": "215d4206-ca35-4f43-85ad-169c8f6d4ec1"
411 +(% class="code" %)
412 +(((
413 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
414 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
415 +\\{
416 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"processed"(%%),
417 + (% style="color:#008000; font-weight:bold" %)**"callbackBody"**(%%): {
418 + (% style="color:#008000; font-weight:bold" %)**"fail"**(%%): {
419 + (% style="color:#008000; font-weight:bold" %)**"type"**(%%): (% style="color:#ba2121" %)"ledger/account-transaction/v1/problems/validation"(%%),
420 + (% style="color:#008000; font-weight:bold" %)**"title"**(%%): (% style="color:#ba2121" %)"Not found"(%%),
421 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#666666" %)404(%%),
422 + (% style="color:#008000; font-weight:bold" %)**"detail"**(%%): (% style="color:#ba2121" %)"A validation error occurred. Please fix the problems mentioned in the problems property below."(%%),
423 + (% style="color:#008000; font-weight:bold" %)**"instance"**(%%): (% style="color:#ba2121" %)"215d4206-ca35-4f43-85ad-169c8f6d4ec1"(%%)
340 340   }
341 341   },
342 - "captureId": "123456",
343 - "authorizationId": 123456789,
344 - "accountNo": "1234",
345 - "callbackUrl": "https://my.com/callback?543245892u59",
346 - "sellerReferenceId": "abc-87465123",
347 - "sellerTransactionId": "654789312",
348 - "authenticationMethod": "2FA",
349 - "currency": "SEK",
350 - "amount": 50.000,
351 - "pointOfSale": "Test shop",
352 - "operations": []
426 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
427 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)123456789(%%),
428 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"1234"(%%),
429 + (% style="color:#008000; font-weight:bold" %)**"callbackUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/my.com/callback?543245892u59"(%%),
430 + (% style="color:#008000; font-weight:bold" %)**"sellerReferenceId"**(%%): (% style="color:#ba2121" %)"abc-87465123"(%%),
431 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
432 + (% style="color:#008000; font-weight:bold" %)**"authenticationMethod"**(%%): (% style="color:#ba2121" %)"2FA"(%%),
433 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
434 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)50.000(%%),
435 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
436 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
353 353  }
354 -{{/code}}
438 +)))
439 +)))
355 355  
356 356  
442 +(% class=" wikigeneratedheader" %)
357 357  ==== 3.2 Create Authorization-capture-order ====
358 358  
359 359  Create authorization-capture-orders is used to add transaction when user is pre identified.
360 360  
361 -{{code language="http" title="**Request**"}}
362 -POST /ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders HTTP/1.1
363 -Host: -
364 -Authorization: Bearer<Token>
365 -Content-Type: application/json
447 +(% class="box" %)
448 +(((
449 +**Request**
366 366  
367 -{
368 - "captureId": "123456",
369 - "authorizationId": 123456789,
370 - "accountNo": "1234",
371 - "callbackUrl": "https://my.com/callback?543245892u59",
372 - "sellerTransactionId": "654789312",
373 - "authenticationMethod": "2FA",
374 - "currency": "SEK",
375 - "amount": 50.00,
376 - "pointOfSale": "Test shop"
451 +(% class="code" %)
452 +(((
453 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
454 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
455 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
456 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
457 +\\{
458 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
459 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)123456789(%%),
460 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"1234"(%%),
461 + (% style="color:#008000; font-weight:bold" %)**"callbackUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/my.com/callback?543245892u59"(%%),
462 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
463 + (% style="color:#008000; font-weight:bold" %)**"authenticationMethod"**(%%): (% style="color:#ba2121" %)"2FA"(%%),
464 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
465 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)50.00(%%),
466 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%)
377 377  }
378 -{{/code}}
468 +)))
469 +)))
379 379  
380 380  
381 381  **Request object specification**
... ... @@ -401,25 +401,30 @@
401 401  Min: 0 |Yes |The amount of the authorization capture order, can't have more than 2 decimal places.
402 402  |pointOfSale |string | |No |Trade name of the point of sale. Will be displayed to end customer. Only use if agreed with provider of the API.
403 403  
404 -{{code language="http" title="**Response**"}}
405 -HTTP/1.1 201 Created
406 -Content-Type: application/json
495 +(% class="box" %)
496 +(((
497 +**Response**
407 407  
408 -{
409 - "status": "pending",
410 - "captureId": "123456",
411 - "authorizationId": 123456789,
412 - "accountNo": "1234",
413 - "callbackUrl": "https://my.com/callback?543245892u59",
414 - "sellerTransactionId": "654789312",
415 - "authenticationMethod": "2FA",
416 - "currency": "SEK",
417 - "amount": 50.00,
418 - "pointOfSale": "Test shop",
419 - "@id": "/ledger/account-transaction/v1/xxx/authorization-capture-orders/123456",
420 - "operations": []
499 +(% class="code" %)
500 +(((
501 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
502 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
503 +\\{
504 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"pending"(%%),
505 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
506 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)123456789(%%),
507 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"1234"(%%),
508 + (% style="color:#008000; font-weight:bold" %)**"callbackUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/my.com/callback?543245892u59"(%%),
509 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
510 + (% style="color:#008000; font-weight:bold" %)**"authenticationMethod"**(%%): (% style="color:#ba2121" %)"2FA"(%%),
511 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
512 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)50.00(%%),
513 + (% style="color:#008000; font-weight:bold" %)**"pointOfSale"**(%%): (% style="color:#ba2121" %)"Test shop"(%%),
514 + (% style="color:#008000; font-weight:bold" %)**"@id"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorization-capture-orders/123456"(%%),
515 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
421 421  }
422 -{{/code}}
517 +)))
518 +)))
423 423  
424 424  
425 425  **Response object specification**
... ... @@ -455,54 +455,66 @@
455 455  | fail |dynamic | |Problem definition of the authorization capture transaction. See problem section.
456 456  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
457 457  
554 +(% class=" wikigeneratedheader" %)
458 458  == 4. Authorizations ==
459 459  
460 460  
461 461  Get an existing authorization.
462 462  
560 +(% class=" wikigeneratedheader" %)
463 463  ==== 4.1 Get specific Authorization ====
464 464  
465 -{{code language="http" title="**Request**"}}
466 -GET /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId} HTTP/1.1
467 -Host: -
468 -Authorization: Bearer<Token>
469 -Content-Type: application/json
563 +(% class="box" %)
564 +(((
565 +**Request**
470 470  
471 -{{/code}}
567 +(% class="code" %)
568 +(((
569 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
570 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
571 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
572 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
573 +)))
574 +)))
472 472  
473 473  Get authorization
474 474  
475 -{{code language="http" title="**Response**"}}
476 -HTTP/1.1 200 OK
477 -Content-Type: application/json
578 +(% class="box" %)
579 +(((
580 +**Response**
478 478  
479 -{
480 - "authorizationId": 456789,
481 - "sellerNo": "654321",
482 - "validToDate": "2023-03-01",
483 - "authorizationAmount": 3600.00,
484 - "remainingAmount": 3600.00,
485 - "currency": "SEK",
486 - "status": "Open",
487 - "operations": [
582 +(% class="code" %)
583 +(((
584 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
585 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
586 +\\{
587 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%),
588 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"654321"(%%),
589 + (% style="color:#008000; font-weight:bold" %)**"validToDate"**(%%): (% style="color:#ba2121" %)"2023-03-01"(%%),
590 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
591 + (% style="color:#008000; font-weight:bold" %)**"remainingAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
592 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
593 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"Open"(%%),
594 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
488 488   {
489 - "rel": "add-reversal",
490 - "method": "POST",
491 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"
596 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-reversal"(%%),
597 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
598 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"(%%)
492 492   },
493 493   {
494 - "rel": "add-capture",
495 - "method": "POST",
496 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/captures"
601 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-capture"(%%),
602 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
603 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/captures"(%%)
497 497   },
498 498   {
499 - "rel": "add-cancellation",
500 - "method": "POST",
501 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"
606 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-cancellation"(%%),
607 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
608 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"(%%)
502 502   }
503 503   ]
504 504  }
505 -{{/code}}
612 +)))
613 +)))
506 506  
507 507  
508 508  
... ... @@ -514,21 +514,27 @@
514 514  |409 |invalid-account-usage |Provided PreAuthorization is invalid for this kind of authorization
515 515  |500 |fatal |Unexpected error, logs may give details about the problem
516 516  
625 +(% class=" wikigeneratedheader" %)
517 517  ==== 4.2 Create Authorization ====
518 518  
519 519  Create authorization to see if the account will accept the transaction. When accepted reserves the amount to on the underlying account (may include credit check) and creates the authorization instance. The reservation is time limited, captures will only be excepted until the reservation times out.
520 520  
521 -{{code language="http" title="**Request**"}}
522 -POST /ledger/account-transaction/v1/{ownerNo}/authorizations HTTP/1.1
523 -Host: -
524 -Authorization: Bearer<Token>
525 -Content-Type: application/json
630 +(% class="box" %)
631 +(((
632 +**Request**
526 526  
527 -{
528 - "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
529 - "authorizationId": 456789
634 +(% class="code" %)
635 +(((
636 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorizations**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
637 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
638 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
639 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
640 +\\{
641 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationId"**(%%): (% style="color:#ba2121" %)"8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
642 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%)
530 530  }
531 -{{/code}}
644 +)))
645 +)))
532 532  
533 533  
534 534  **Request object specification**
... ... @@ -541,38 +541,43 @@
541 541  
542 542  Create authorization
543 543  
544 -{{code language="http" title="**Response**"}}
545 -HTTP/1.1 201 Created
546 -Content-Type: application/json
658 +(% class="box" %)
659 +(((
660 +**Response**
547 547  
548 -{
549 - "authorizationId": 456789,
550 - "sellerNo": "654321",
551 - "validToDate": "2023-03-01",
552 - "authorizationAmount": 3600.00,
553 - "remainingAmount": 3600.00,
554 - "currency": "SEK",
555 - "status": "Open",
556 - "@id": "/ledger/account-transaction/v1/xxx/authorizations/456789",
557 - "operations": [
662 +(% class="code" %)
663 +(((
664 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
665 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
666 +\\{
667 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%),
668 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"654321"(%%),
669 + (% style="color:#008000; font-weight:bold" %)**"validToDate"**(%%): (% style="color:#ba2121" %)"2023-03-01"(%%),
670 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
671 + (% style="color:#008000; font-weight:bold" %)**"remainingAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
672 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
673 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"Open"(%%),
674 + (% style="color:#008000; font-weight:bold" %)**"@id"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789"(%%),
675 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
558 558   {
559 - "rel": "add-reversal",
560 - "method": "POST",
561 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"
677 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-reversal"(%%),
678 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
679 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"(%%)
562 562   },
563 563   {
564 - "rel": "add-capture",
565 - "method": "POST",
566 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/captures"
682 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-capture"(%%),
683 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
684 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/captures"(%%)
567 567   },
568 568   {
569 - "rel": "add-cancellation",
570 - "method": "POST",
571 - "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"
687 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-cancellation"(%%),
688 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
689 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"(%%)
572 572   }
573 573   ]
574 574  }
575 -{{/code}}
693 +)))
694 +)))
576 576  
577 577  
578 578  **Possible problems**
... ... @@ -613,26 +613,33 @@
613 613  )))|
614 614  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
615 615  
735 +(% class=" wikigeneratedheader" %)
616 616  == 5. Captures ==
617 617  
618 618  
739 +(% class=" wikigeneratedheader" %)
619 619  ==== 5.1 Create Capture ====
620 620  
621 621  Captures part of (or complete) the authorization, includes options for part payment
622 622  
623 -{{code language="http" title="**Request**"}}
624 -POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/captures HTTP/1.1
625 -Host: -
626 -Authorization: Bearer<Token>
627 -Content-Type: application/json
744 +(% class="box" %)
745 +(((
746 +**Request**
628 628  
629 -{
630 - "captureId": "123456",
631 - "sellerTransactionId": "654789312",
632 - "currency": "SEK",
633 - "amount": 3600.00
748 +(% class="code" %)
749 +(((
750 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/captures**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
751 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
752 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
753 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
754 +\\{
755 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
756 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
757 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
758 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)3600.00(%%)
634 634  }
635 -{{/code}}
760 +)))
761 +)))
636 636  
637 637  
638 638  **Request object specification**
... ... @@ -653,15 +653,20 @@
653 653  
654 654  Capture created
655 655  
656 -{{code language="http" title="**Response**"}}
657 -HTTP/1.1 201 Created
658 -Content-Type: application/json
782 +(% class="box" %)
783 +(((
784 +**Response**
659 659  
660 -{
661 - "captureId": "123456",
662 - "operations": []
786 +(% class="code" %)
787 +(((
788 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
789 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
790 +\\{
791 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
792 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
663 663  }
664 -{{/code}}
794 +)))
795 +)))
665 665  
666 666  
667 667  **Possible problems**
... ... @@ -685,26 +685,33 @@
685 685  |captureId |string | |Identifier of the capture, must be unique for all types of captures within the ledger
686 686  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
687 687  
819 +(% class=" wikigeneratedheader" %)
688 688  == 6. Reversals ==
689 689  
690 690  
823 +(% class=" wikigeneratedheader" %)
691 691  ==== 6.1 Create Reversal ====
692 692  
693 693  For reversing a specific capture
694 694  
695 -{{code language="http" title="**Request**"}}
696 -POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/reversals HTTP/1.1
697 -Host: -
698 -Authorization: Bearer<Token>
699 -Content-Type: application/json
828 +(% class="box" %)
829 +(((
830 +**Request**
700 700  
701 -{
702 - "reversalId": "654321",
703 - "currency": "SEK",
704 - "amount": 512.00,
705 - "sellerTransactionId": "753159"
832 +(% class="code" %)
833 +(((
834 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/reversals**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
835 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
836 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
837 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
838 +\\{
839 + (% style="color:#008000; font-weight:bold" %)**"reversalId"**(%%): (% style="color:#ba2121" %)"654321"(%%),
840 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
841 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)512.00(%%),
842 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"753159"(%%)
706 706  }
707 -{{/code}}
844 +)))
845 +)))
708 708  
709 709  
710 710  **Request object specification**
... ... @@ -723,13 +723,18 @@
723 723  Min: 0 |Yes |Amount to reverse
724 724  |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the reversal transaction, usually the receipt reference
725 725  
726 -{{code language="http" title="**Response**"}}
727 -HTTP/1.1 201 CREATED
728 -Content-Type: application/json
864 +(% class="box" %)
865 +(((
866 +**Response**
729 729  
730 -{
868 +(% class="code" %)
869 +(((
870 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**CREATED**(%%)
871 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
872 +\\{
731 731  }
732 -{{/code}}
874 +)))
875 +)))
733 733  
734 734  
735 735  **Possible problems**
... ... @@ -744,31 +744,43 @@
744 744  |409 |invalid-account-usage |Provided Authorization is invalid for this kind of reversal
745 745  |500 |fatal |Unexpected error, logs may give details about the problem
746 746  
890 +(% class=" wikigeneratedheader" %)
747 747  == 7. Cancellations ==
748 748  
749 749  
894 +(% class=" wikigeneratedheader" %)
750 750  ==== 7.1 Create Cancellation ====
751 751  
752 752  This operation will cancel the specified authorization
753 753  
754 -{{code language="http" title="**Request**"}}
755 -POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/cancellations HTTP/1.1
756 -Host: -
757 -Authorization: Bearer<Token>
758 -Content-Type: application/json
899 +(% class="box" %)
900 +(((
901 +**Request**
759 759  
760 -{
903 +(% class="code" %)
904 +(((
905 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/cancellations**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
906 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
907 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
908 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
909 +\\{
761 761  }
762 -{{/code}}
911 +)))
912 +)))
763 763  
764 764  
765 765  
766 -{{code language="http" title="**Response**"}}
767 -HTTP/1.1 204 NO CONTENT
768 -Content-Type: application/json
916 +(% class="box" %)
917 +(((
918 +**Response**
769 769  
770 -{}
771 -{{/code}}
920 +(% class="code" %)
921 +(((
922 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)204(%%) (% style="color:#d2413a; font-weight:bold" %)**NO CONTENT**(%%)
923 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
924 +\\{}
925 +)))
926 +)))
772 772  
773 773  
774 774  **Possible problems**
... ... @@ -780,49 +780,61 @@
780 780  |409 |authorization-expired |Provided Authorization is not open or has already expired
781 781  |500 |fatal |Unexpected error, logs may give details about the problem
782 782  
938 +(% class=" wikigeneratedheader" %)
783 783  == 8. Split-authorizations ==
784 784  
785 785  
786 786  Get an existing split-authorization. The split - authorization, is used when each product has a separate part payment that should be portioned out according to instruction.
787 787  
944 +(% class=" wikigeneratedheader" %)
788 788  ==== 8.1 Get specific Split-authorization ====
789 789  
790 -{{code language="http" title="**Request**"}}
791 -GET /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId} HTTP/1.1
792 -Host: -
793 -Authorization: Bearer<Token>
794 -Content-Type: application/json
947 +(% class="box" %)
948 +(((
949 +**Request**
795 795  
796 -{{/code}}
951 +(% class="code" %)
952 +(((
953 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
954 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
955 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
956 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
957 +)))
958 +)))
797 797  
798 798  Get Split authorization resource. Operations can vary based of state of resource
799 799  
800 -{{code language="http" title="**Response**"}}
801 -HTTP/1.1 200 OK
802 -Content-Type: application/json
962 +(% class="box" %)
963 +(((
964 +**Response**
803 803  
804 -{
805 - "authorizationId": 456789,
806 - "sellerNo": "654321",
807 - "validToDate": "2023-03-08",
808 - "authorizationAmount": 3600.00,
809 - "remainingAmount": 3600.00,
810 - "currency": "SEK",
811 - "status": "Open",
812 - "operations": [
966 +(% class="code" %)
967 +(((
968 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
969 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
970 +\\{
971 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%),
972 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"654321"(%%),
973 + (% style="color:#008000; font-weight:bold" %)**"validToDate"**(%%): (% style="color:#ba2121" %)"2023-03-08"(%%),
974 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
975 + (% style="color:#008000; font-weight:bold" %)**"remainingAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
976 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
977 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"Open"(%%),
978 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
813 813   {
814 - "rel": "add-capture",
815 - "method": "POST",
816 - "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"
980 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-capture"(%%),
981 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
982 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"(%%)
817 817   },
818 818   {
819 - "rel": "add-cancellation",
820 - "method": "POST",
821 - "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"
985 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-cancellation"(%%),
986 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
987 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"(%%)
822 822   }
823 823   ]
824 824  }
825 -{{/code}}
991 +)))
992 +)))
826 826  
827 827  
828 828  
... ... @@ -833,21 +833,27 @@
833 833  |404 |not-found |Found no authorization for provided id on this ledger
834 834  |500 |fatal |Unexpected error, logs may give details about the problem
835 835  
1003 +(% class=" wikigeneratedheader" %)
836 836  ==== 8.2 Create Split-authorization ====
837 837  
838 838  Create split-authorization to see if the account will accept the transaction. When accepted reserves the amount to on the underlying account (may include credit check) and creates the authorization instance. The reservation is time limited, captures will only be excepted until the reservation times out. The 'split' authorization, is used when each product has a separate part payment that should be portioned out according to instruction.
839 839  
840 -{{code language="http" title="**Request**"}}
841 -POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations HTTP/1.1
842 -Host: -
843 -Authorization: Bearer<Token>
844 -Content-Type: application/json
1008 +(% class="box" %)
1009 +(((
1010 +**Request**
845 845  
846 -{
847 - "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
848 - "authorizationId": 456789
1012 +(% class="code" %)
1013 +(((
1014 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/split-authorizations**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1015 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1016 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1017 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1018 +\\{
1019 + (% style="color:#008000; font-weight:bold" %)**"preAuthorizationId"**(%%): (% style="color:#ba2121" %)"8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
1020 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%)
849 849  }
850 -{{/code}}
1022 +)))
1023 +)))
851 851  
852 852  
853 853  **Request object specification**
... ... @@ -859,33 +859,38 @@
859 859  
860 860  Create Split authorization
861 861  
862 -{{code language="http" title="**Response**"}}
863 -HTTP/1.1 201 Created
864 -Content-Type: application/json
1035 +(% class="box" %)
1036 +(((
1037 +**Response**
865 865  
866 -{
867 - "authorizationId": 456789,
868 - "sellerNo": "654321",
869 - "validToDate": "2023-03-08",
870 - "authorizationAmount": 3600.00,
871 - "remainingAmount": 3600.00,
872 - "currency": "SEK",
873 - "status": "Open",
874 - "@id": "/ledger/account-transaction/v1/xxx/split-authorizations/456789",
875 - "operations": [
1039 +(% class="code" %)
1040 +(((
1041 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
1042 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1043 +\\{
1044 + (% style="color:#008000; font-weight:bold" %)**"authorizationId"**(%%): (% style="color:#666666" %)456789(%%),
1045 + (% style="color:#008000; font-weight:bold" %)**"sellerNo"**(%%): (% style="color:#ba2121" %)"654321"(%%),
1046 + (% style="color:#008000; font-weight:bold" %)**"validToDate"**(%%): (% style="color:#ba2121" %)"2023-03-08"(%%),
1047 + (% style="color:#008000; font-weight:bold" %)**"authorizationAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
1048 + (% style="color:#008000; font-weight:bold" %)**"remainingAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
1049 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1050 + (% style="color:#008000; font-weight:bold" %)**"status"**(%%): (% style="color:#ba2121" %)"Open"(%%),
1051 + (% style="color:#008000; font-weight:bold" %)**"@id"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/split-authorizations/456789"(%%),
1052 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): [
876 876   {
877 - "rel": "add-capture",
878 - "method": "POST",
879 - "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"
1054 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-capture"(%%),
1055 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
1056 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"(%%)
880 880   },
881 881   {
882 - "rel": "add-cancellation",
883 - "method": "POST",
884 - "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"
1059 + (% style="color:#008000; font-weight:bold" %)**"rel"**(%%): (% style="color:#ba2121" %)"add-cancellation"(%%),
1060 + (% style="color:#008000; font-weight:bold" %)**"method"**(%%): (% style="color:#ba2121" %)"POST"(%%),
1061 + (% style="color:#008000; font-weight:bold" %)**"href"**(%%): (% style="color:#ba2121" %)"/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"(%%)
885 885   }
886 886   ]
887 887  }
888 -{{/code}}
1065 +)))
1066 +)))
889 889  
890 890  
891 891  **Possible problems**
... ... @@ -924,29 +924,36 @@
924 924  )))|
925 925  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
926 926  
1105 +(% class=" wikigeneratedheader" %)
927 927  == 9. Captures ==
928 928  
929 929  
1109 +(% class=" wikigeneratedheader" %)
930 930  ==== 9.1 Create Capture ====
931 931  
932 932  Captures part of (or complete) the split-authorization, includes options for part payment
933 933  
934 -{{code language="http" title="**Request**"}}
935 -POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures HTTP/1.1
936 -Host: -
937 -Authorization: Bearer<Token>
938 -Content-Type: application/json
1114 +(% class="box" %)
1115 +(((
1116 +**Request**
939 939  
940 -{
941 - "captureId": "123456",
942 - "sellerTransactionId": "654789312",
943 - "currency": "SEK",
944 - "monthlyBillingAmount": 300,
945 - "months": 12,
946 - "totalAmount": 3600.00,
947 - "productName": "Purchase ref: 233445"
1118 +(% class="code" %)
1119 +(((
1120 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1121 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1122 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1123 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1124 +\\{
1125 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
1126 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"654789312"(%%),
1127 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1128 + (% style="color:#008000; font-weight:bold" %)**"monthlyBillingAmount"**(%%): (% style="color:#666666" %)300(%%),
1129 + (% style="color:#008000; font-weight:bold" %)**"months"**(%%): (% style="color:#666666" %)12(%%),
1130 + (% style="color:#008000; font-weight:bold" %)**"totalAmount"**(%%): (% style="color:#666666" %)3600.00(%%),
1131 + (% style="color:#008000; font-weight:bold" %)**"productName"**(%%): (% style="color:#ba2121" %)"Purchase ref: 233445"(%%)
948 948  }
949 -{{/code}}
1133 +)))
1134 +)))
950 950  
951 951  
952 952  **Request object specification**
... ... @@ -974,15 +974,20 @@
974 974  
975 975  Capture created
976 976  
977 -{{code language="http" title="**Response**"}}
978 -HTTP/1.1 201 Created
979 -Content-Type: application/json
1162 +(% class="box" %)
1163 +(((
1164 +**Response**
980 980  
981 -{
982 - "captureId": "123456",
983 - "operations": []
1166 +(% class="code" %)
1167 +(((
1168 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
1169 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1170 +\\{
1171 + (% style="color:#008000; font-weight:bold" %)**"captureId"**(%%): (% style="color:#ba2121" %)"123456"(%%),
1172 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
984 984  }
985 -{{/code}}
1174 +)))
1175 +)))
986 986  
987 987  
988 988  **Possible problems**
... ... @@ -1005,31 +1005,43 @@
1005 1005  |captureId |string | |Identifier of the capture, must be unique for all types of captures within the ledger
1006 1006  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
1007 1007  
1198 +(% class=" wikigeneratedheader" %)
1008 1008  == 10. Cancellations ==
1009 1009  
1010 1010  
1202 +(% class=" wikigeneratedheader" %)
1011 1011  ==== 10.1 Create Cancellation ====
1012 1012  
1013 1013  This operation will cancel the specified split-authorization
1014 1014  
1015 -{{code language="http" title="**Request**"}}
1016 -POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/cancellations HTTP/1.1
1017 -Host: -
1018 -Authorization: Bearer<Token>
1019 -Content-Type: application/json
1207 +(% class="box" %)
1208 +(((
1209 +**Request**
1020 1020  
1021 -{
1211 +(% class="code" %)
1212 +(((
1213 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/cancellations**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1214 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1215 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1216 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1217 +\\{
1022 1022  }
1023 -{{/code}}
1219 +)))
1220 +)))
1024 1024  
1025 1025  
1026 1026  
1027 -{{code language="http" title="**Response**"}}
1028 -HTTP/1.1 204 NO CONTENT
1029 -Content-Type: application/json
1224 +(% class="box" %)
1225 +(((
1226 +**Response**
1030 1030  
1031 -{}
1032 -{{/code}}
1228 +(% class="code" %)
1229 +(((
1230 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)204(%%) (% style="color:#d2413a; font-weight:bold" %)**NO CONTENT**(%%)
1231 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1232 +\\{}
1233 +)))
1234 +)))
1033 1033  
1034 1034  
1035 1035  **Possible problems**
... ... @@ -1039,26 +1039,33 @@
1039 1039  |404 |not-found |Found no authorization for provided id on this ledger
1040 1040  |500 |fatal |Unexpected error, logs may give details about the problem
1041 1041  
1244 +(% class=" wikigeneratedheader" %)
1042 1042  == 11. Reversals ==
1043 1043  
1044 1044  
1248 +(% class=" wikigeneratedheader" %)
1045 1045  ==== 11.1 Create Reversal ====
1046 1046  
1047 1047  For reversing a specific capture
1048 1048  
1049 -{{code language="http" title="**Request**"}}
1050 -POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures/{captureId}/reversals HTTP/1.1
1051 -Host: -
1052 -Authorization: Bearer<Token>
1053 -Content-Type: application/json
1253 +(% class="box" %)
1254 +(((
1255 +**Request**
1054 1054  
1055 -{
1056 - "reversalId": "abcdefg123",
1057 - "currency": "SEK",
1058 - "amount": 512.00,
1059 - "sellerTransactionId": "123456"
1257 +(% class="code" %)
1258 +(((
1259 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures/{captureId}/reversals**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1260 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1261 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1262 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1263 +\\{
1264 + (% style="color:#008000; font-weight:bold" %)**"reversalId"**(%%): (% style="color:#ba2121" %)"abcdefg123"(%%),
1265 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1266 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%): (% style="color:#666666" %)512.00(%%),
1267 + (% style="color:#008000; font-weight:bold" %)**"sellerTransactionId"**(%%): (% style="color:#ba2121" %)"123456"(%%)
1060 1060  }
1061 -{{/code}}
1269 +)))
1270 +)))
1062 1062  
1063 1063  
1064 1064  **Request object specification**
... ... @@ -1077,13 +1077,18 @@
1077 1077  Min: 0 |Yes |Amount to reverse
1078 1078  |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the reversal transaction, usually the receipt reference
1079 1079  
1080 -{{code language="http" title="**Response**"}}
1081 -HTTP/1.1 201 CREATED
1082 -Content-Type: application/json
1289 +(% class="box" %)
1290 +(((
1291 +**Response**
1083 1083  
1084 -{
1293 +(% class="code" %)
1294 +(((
1295 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**CREATED**(%%)
1296 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1297 +\\{
1085 1085  }
1086 -{{/code}}
1299 +)))
1300 +)))
1087 1087  
1088 1088  
1089 1089  **Possible problems**
... ... @@ -1097,79 +1097,97 @@
1097 1097  |409 |identifier-already-in-use |ReversalId given is already used, provide a new one and try again
1098 1098  |500 |fatal |Unexpected error, logs may give details about the problem
1099 1099  
1314 +(% class=" wikigeneratedheader" %)
1100 1100  == 12. Account-applications ==
1101 1101  
1102 1102  
1103 1103  Get an existing account-application. The account - application, is used when applying for new account.
1104 1104  
1320 +(% class=" wikigeneratedheader" %)
1105 1105  ==== 12.1 Get specific Account-application ====
1106 1106  
1107 -{{code language="http" title="**Request**"}}
1108 -GET /ledger/account-transaction/v1/{ownerNo}/account-applications/{accountApplicationId} HTTP/1.1
1109 -Host: -
1110 -Authorization: Bearer<Token>
1111 -Content-Type: application/json
1323 +(% class="box" %)
1324 +(((
1325 +**Request**
1112 1112  
1113 -{{/code}}
1327 +(% class="code" %)
1328 +(((
1329 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/account-applications/{accountApplicationId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1330 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1331 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1332 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1333 +)))
1334 +)))
1114 1114  
1115 -{{code language="http" title="**Response**"}}
1116 -HTTP/1.1 200 OK
1117 -Content-Type: application/json
1336 +(% class="box" %)
1337 +(((
1338 +**Response**
1118 1118  
1119 -{
1120 - "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1121 - "customer": {
1122 - "nationalConsumerIdentifier": {
1123 - "value": "19101010-1010",
1124 - "countryCode": "SE"
1340 +(% class="code" %)
1341 +(((
1342 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
1343 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1344 +\\{
1345 + (% style="color:#008000; font-weight:bold" %)**"redirectUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
1346 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
1347 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
1348 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
1349 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
1125 1125   },
1126 - "email": "a@b.c",
1127 - "msisdn": "46123456",
1128 - "customerNo": "1234"
1351 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"a@b.c"(%%),
1352 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"46123456"(%%),
1353 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"1234"(%%)
1129 1129   },
1130 - "profileName": "myProfileName",
1131 - "creditLimit": 5000.00,
1132 - "currency": "SEK",
1133 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1134 - "redirectOptions": {
1135 - "nativeAppSwitchingUrl": "myApp",
1136 - "languageCode": "sv"
1355 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"myProfileName"(%%),
1356 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1357 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1358 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1359 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1360 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1361 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1137 1137   },
1138 - "operations": []
1363 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
1139 1139  }
1140 -{{/code}}
1365 +)))
1366 +)))
1141 1141  
1142 1142  
1369 +(% class=" wikigeneratedheader" %)
1143 1143  ==== 12.2 Create Account-application ====
1144 1144  
1145 1145  Create account-application is used when applying for new account. the application process may include signing and credit check
1146 1146  
1147 -{{code language="http" title="**Request**"}}
1148 -POST /ledger/account-transaction/v1/{ownerNo}/account-applications HTTP/1.1
1149 -Host: -
1150 -Authorization: Bearer<Token>
1151 -Content-Type: application/json
1374 +(% class="box" %)
1375 +(((
1376 +**Request**
1152 1152  
1153 -{
1154 - "customer": {
1155 - "nationalConsumerIdentifier": {
1156 - "value": "19101010-1010",
1157 - "countryCode": "SE"
1378 +(% class="code" %)
1379 +(((
1380 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/account-applications**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1381 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1382 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1383 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1384 +\\{
1385 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
1386 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
1387 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
1388 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
1158 1158   },
1159 - "email": "a@b.c",
1160 - "msisdn": "46123456",
1161 - "customerNo": "1234"
1390 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"a@b.c"(%%),
1391 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"46123456"(%%),
1392 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"1234"(%%)
1162 1162   },
1163 - "profileName": "myProfileName",
1164 - "creditLimit": 5000.00,
1165 - "currency": "SEK",
1166 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1167 - "redirectOptions": {
1168 - "nativeAppSwitchingUrl": "myApp",
1169 - "languageCode": "sv"
1394 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"myProfileName"(%%),
1395 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1396 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1397 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1398 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1399 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1400 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1170 1170   }
1171 1171  }
1172 -{{/code}}
1403 +)))
1404 +)))
1173 1173  
1174 1174  
1175 1175  **Request object specification**
... ... @@ -1199,32 +1199,37 @@
1199 1199  | autostartAction |string | |No |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1200 1200  | languageCode |string | |Yes |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1201 1201  
1202 -{{code language="http" title="**Response**"}}
1203 -HTTP/1.1 201 Created
1204 -Content-Type: application/json
1434 +(% class="box" %)
1435 +(((
1436 +**Response**
1205 1205  
1206 -{
1207 - "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1208 - "customer": {
1209 - "nationalConsumerIdentifier": {
1210 - "value": "19101010-1010",
1211 - "countryCode": "SE"
1438 +(% class="code" %)
1439 +(((
1440 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
1441 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1442 +\\{
1443 + (% style="color:#008000; font-weight:bold" %)**"redirectUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
1444 + (% style="color:#008000; font-weight:bold" %)**"customer"**(%%): {
1445 + (% style="color:#008000; font-weight:bold" %)**"nationalConsumerIdentifier"**(%%): {
1446 + (% style="color:#008000; font-weight:bold" %)**"value"**(%%): (% style="color:#ba2121" %)"19101010-1010"(%%),
1447 + (% style="color:#008000; font-weight:bold" %)**"countryCode"**(%%): (% style="color:#ba2121" %)"SE"(%%)
1212 1212   },
1213 - "email": "a@b.c",
1214 - "msisdn": "46123456",
1215 - "customerNo": "1234"
1449 + (% style="color:#008000; font-weight:bold" %)**"email"**(%%): (% style="color:#ba2121" %)"a@b.c"(%%),
1450 + (% style="color:#008000; font-weight:bold" %)**"msisdn"**(%%): (% style="color:#ba2121" %)"46123456"(%%),
1451 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"1234"(%%)
1216 1216   },
1217 - "profileName": "myProfileName",
1218 - "creditLimit": 5000.00,
1219 - "currency": "SEK",
1220 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1221 - "redirectOptions": {
1222 - "nativeAppSwitchingUrl": "myApp",
1223 - "languageCode": "sv"
1453 + (% style="color:#008000; font-weight:bold" %)**"profileName"**(%%): (% style="color:#ba2121" %)"myProfileName"(%%),
1454 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1455 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1456 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1457 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1458 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1459 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1224 1224   },
1225 - "operations": []
1461 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
1226 1226  }
1227 -{{/code}}
1463 +)))
1464 +)))
1228 1228  
1229 1229  
1230 1230  **Possible problems**
... ... @@ -1264,63 +1264,81 @@
1264 1264  |redirectUrl |string | |Web uri pointing to the application flow that the user should be redirected to.
1265 1265  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
1266 1266  
1504 +(% class=" wikigeneratedheader" %)
1267 1267  == 13. Limit-upgrade-applications ==
1268 1268  
1269 1269  
1270 1270  Get an existing limit-upgrade-application. The limit - upgrade - application, is used for upgrading limit on existing credit account.
1271 1271  
1510 +(% class=" wikigeneratedheader" %)
1272 1272  ==== 13.1 Get specific Limit-upgrade-application ====
1273 1273  
1274 -{{code language="http" title="**Request**"}}
1275 -GET /ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId} HTTP/1.1
1276 -Host: -
1277 -Authorization: Bearer<Token>
1278 -Content-Type: application/json
1513 +(% class="box" %)
1514 +(((
1515 +**Request**
1279 1279  
1280 -{{/code}}
1517 +(% class="code" %)
1518 +(((
1519 +(% style="color:#0000ff" %)GET(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId}**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1520 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1521 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1522 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1523 +)))
1524 +)))
1281 1281  
1282 -{{code language="http" title="**Response**"}}
1283 -HTTP/1.1 200 OK
1284 -Content-Type: application/json
1526 +(% class="box" %)
1527 +(((
1528 +**Response**
1285 1285  
1286 -{
1287 - "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1288 - "accountNo": "12345",
1289 - "customerNo": "54321",
1290 - "creditLimit": 5000.00,
1291 - "currency": "SEK",
1292 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1293 - "redirectOptions": {
1294 - "nativeAppSwitchingUrl": "myApp",
1295 - "languageCode": "sv"
1530 +(% class="code" %)
1531 +(((
1532 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)200(%%) (% style="color:#d2413a; font-weight:bold" %)**OK**(%%)
1533 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1534 +\\{
1535 + (% style="color:#008000; font-weight:bold" %)**"redirectUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
1536 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"12345"(%%),
1537 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"54321"(%%),
1538 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1539 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1540 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1541 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1542 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1543 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1296 1296   },
1297 - "operations": []
1545 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
1298 1298  }
1299 -{{/code}}
1547 +)))
1548 +)))
1300 1300  
1301 1301  
1551 +(% class=" wikigeneratedheader" %)
1302 1302  ==== 13.2 Create Limit-upgrade-application ====
1303 1303  
1304 1304  Create limit-upgrade-application is used when applying for upgrading limit on existing credit account. The application process may include signing and credit check
1305 1305  
1306 -{{code language="http" title="**Request**"}}
1307 -POST /ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications HTTP/1.1
1308 -Host: -
1309 -Authorization: Bearer<Token>
1310 -Content-Type: application/json
1556 +(% class="box" %)
1557 +(((
1558 +**Request**
1311 1311  
1312 -{
1313 - "accountNo": "12345",
1314 - "customerNo": "54321",
1315 - "creditLimit": 5000.00,
1316 - "currency": "SEK",
1317 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1318 - "redirectOptions": {
1319 - "nativeAppSwitchingUrl": "myApp",
1320 - "languageCode": "sv"
1560 +(% class="code" %)
1561 +(((
1562 +(% style="color:#0000ff" %)POST(%%) (% style="color:#0000ff; font-weight:bold" %)**/ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications**(%%) (% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%)
1563 +(% style="color:#7d9029" %)Host(% style="color:#666666" %):(%%) -
1564 +(% style="color:#7d9029" %)Authorization(% style="color:#666666" %):(%%) Bearer<Token>
1565 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1566 +\\{
1567 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"12345"(%%),
1568 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"54321"(%%),
1569 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1570 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1571 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1572 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1573 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1574 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1321 1321   }
1322 1322  }
1323 -{{/code}}
1577 +)))
1578 +)))
1324 1324  
1325 1325  
1326 1326  **Request object specification**
... ... @@ -1344,24 +1344,29 @@
1344 1344  | autostartAction |string | |No |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1345 1345  | languageCode |string | |Yes |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1346 1346  
1347 -{{code language="http" title="**Response**"}}
1348 -HTTP/1.1 201 Created
1349 -Content-Type: application/json
1602 +(% class="box" %)
1603 +(((
1604 +**Response**
1350 1350  
1351 -{
1352 - "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1353 - "accountNo": "12345",
1354 - "customerNo": "54321",
1355 - "creditLimit": 5000.00,
1356 - "currency": "SEK",
1357 - "returnUrl": "https://webconsumerexample.se/consumerweb",
1358 - "redirectOptions": {
1359 - "nativeAppSwitchingUrl": "myApp",
1360 - "languageCode": "sv"
1606 +(% class="code" %)
1607 +(((
1608 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)201(%%) (% style="color:#d2413a; font-weight:bold" %)**Created**(%%)
1609 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/json
1610 +\\{
1611 + (% style="color:#008000; font-weight:bold" %)**"redirectUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd"(%%),
1612 + (% style="color:#008000; font-weight:bold" %)**"accountNo"**(%%): (% style="color:#ba2121" %)"12345"(%%),
1613 + (% style="color:#008000; font-weight:bold" %)**"customerNo"**(%%): (% style="color:#ba2121" %)"54321"(%%),
1614 + (% style="color:#008000; font-weight:bold" %)**"creditLimit"**(%%): (% style="color:#666666" %)5000.00(%%),
1615 + (% style="color:#008000; font-weight:bold" %)**"currency"**(%%): (% style="color:#ba2121" %)"SEK"(%%),
1616 + (% style="color:#008000; font-weight:bold" %)**"returnUrl"**(%%): (% style="color:#ba2121" %)"https:~/~/webconsumerexample.se/consumerweb"(%%),
1617 + (% style="color:#008000; font-weight:bold" %)**"redirectOptions"**(%%): {
1618 + (% style="color:#008000; font-weight:bold" %)**"nativeAppSwitchingUrl"**(%%): (% style="color:#ba2121" %)"myApp"(%%),
1619 + (% style="color:#008000; font-weight:bold" %)**"languageCode"**(%%): (% style="color:#ba2121" %)"sv"(%%)
1361 1361   },
1362 - "operations": []
1621 + (% style="color:#008000; font-weight:bold" %)**"operations"**(%%): []
1363 1363  }
1364 -{{/code}}
1623 +)))
1624 +)))
1365 1365  
1366 1366  
1367 1367  **Possible problems**
... ... @@ -1395,4 +1395,41 @@
1395 1395  |redirectUrl |string | |Web uri pointing to the application flow that the user should be redirected to.
1396 1396  |operations |array | |List of operations that is possible to perform on the current resource, read more about the [[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
1397 1397  
1398 -{{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
1658 +(% class=" wikigeneratedheader" %)
1659 +== Problems ==
1660 +
1661 +All errors from the api are returned in the form of "problems" (response body), except for the http status code itself.
1662 +The problem object contain more detailed info on what the error is. The "type" property can be used to programmatically interpret the error as it contains a code definition of the problem.
1663 +Other properties can be useful for logging and subsequent troubleshooting. Some problems are extended with additional parameters so it may be a good idea to log response body as raw data to include these.
1664 +
1665 +Problems of type validation does contain an additional list ("Problems") that describes exactly which parameter that failed the validation
1666 +
1667 +(% class=" wikigeneratedheader" %)
1668 +=== Example ===
1669 +
1670 +(% class="box" %)
1671 +(((
1672 +**Response**
1673 +
1674 +(% class="code" %)
1675 +(((
1676 +(% style="color:#008000; font-weight:bold" %)**HTTP**(% style="color:#666666" %)/1.1(%%) (% style="color:#666666" %)400(%%) (% style="color:#d2413a; font-weight:bold" %)**Error**(%%)
1677 +(% style="color:#7d9029" %)Content-Type(% style="color:#666666" %):(%%) application/problem+json
1678 +\\{
1679 + (% style="color:#008000; font-weight:bold" %)**"Type"**(%%) : (% style="color:#ba2121" %)"ledger/{domain}/v1/problems/validation"(%%),
1680 + (% style="color:#008000; font-weight:bold" %)**"Title"**(%%) : (% style="color:#ba2121" %)"A validation error occurred"(%%),
1681 + (% style="color:#008000; font-weight:bold" %)**"Status"**(%%) : (% style="color:#666666" %)400(%%),
1682 + (% style="color:#008000; font-weight:bold" %)**"Instance"**(%%) : (% style="color:#ba2121" %)"215d4206-ca35-4f43-85ad-169c8f6d4ec1"(%%),
1683 + (% style="color:#008000; font-weight:bold" %)**"Detail"**(%%) : (% style="color:#ba2121" %)"A validation error occurred. Please fix the problems mentioned in the 'problems' property below."(%%),
1684 + (% style="color:#008000; font-weight:bold" %)**"Problems"**(%%) :
1685 + {
1686 + (% style="color:#008000; font-weight:bold" %)**"amount"**(%%) : [
1687 + (% style="color:#ba2121" %)"Expected value between [0,01]-[79228162514264337593543950335] actual [0]"(%%)
1688 + ]
1689 + }
1690 +}
1691 +)))
1692 +)))
1693 +
1694 +
1695 +