From empty
To version 15.1
edited by Rasmus Enekvist
on 2025/02/12 14:42
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +contract-financing-working
Parent
... ... @@ -1,0 +1,1 @@
1 +Main.Invoicing.Contract Financing.Technical-reference.API.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +xwiki:XWiki.rae
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Tags
... ... @@ -1,0 +1,1 @@
1 +px-custom-page-content
Content
... ... @@ -1,0 +1,642 @@
1 +(% class="jumbotron" %)
2 +(((
3 +(% class="container" %)
4 +(((
5 +Draft:
6 +Integrate to **PayEx contract financing API **
7 +)))
8 +)))
9 +
10 += Changelog =
11 +
12 +2022-03-31
13 +initial draft version
14 +
15 +2022-05-05
16 +Added status to the Contract resource
17 +
18 +2025-02-04
19 +
20 +Added AccountProfile to POST Contract
21 +
22 +introduced new operation Extend
23 +
24 +(% id="HRoutesegments" %)
25 += Introduction =
26 +
27 +(% class="lead" %)
28 +The contract-financing API is used to handle the financed contracts between PayEx and the Lessor. Before the end customer can be offered a financed operational lease, the contract value has to be approved by PayEx.
29 +
30 +== [[image:ContractFinancing.png||alt="1645795304707-487.png"]] ==
31 +
32 +
33 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
34 +
35 +The below route is an example of a route towards resource3Id, to operate on this resource you must also include the ids of its parent resources in the route.
36 +//api.payex.com/ledger/**{subDomain}**/v1/**{ledgerNumber}**/resource1/**{resource1Id}**//
37 +
38 +(% class="table-bordered table-striped" %)
39 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
40 +|(% style="width:604px" %)subDomain|(% style="width:2790px" %)In this part of the API it is contract-financing
41 +|(% style="width:604px" %)ledgerNumber|(% style="width:2790px" %)The ledger identifier/number that you will receive from PayEx at setup
42 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
43 +
44 +(% class="wikigeneratedid" %)
45 +Routes that occurs in examples of this documentation will use the following identifiers
46 +
47 +(% class="table-bordered table-striped" %)
48 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
49 +|(% style="width:488px" %)ledgerNumber|(% style="width:2271px" %)XXX = ledgerNumber
50 +|(% style="width:488px" %)contracts|(% style="width:2271px" %)NNN = contractId
51 +
52 +== 1. Contracts ==
53 +
54 +
55 +View a specific contract based on contractId
56 +
57 +==== 1.1 Get specific Contract ====
58 +
59 +{{code language="http" title="**Request**"}}
60 +GET /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId} HTTP/1.1
61 +Host: -
62 +Authorization: Bearer<Token>
63 +Content-Type: application/json
64 +
65 +{{/code}}
66 +
67 +Get a created Contract
68 +
69 +{{code language="http" title="**Response**"}}
70 +HTTP/1.1 200 OK
71 +Content-Type: application/json
72 +
73 +{
74 + "unBilledAmount": 4700.00,
75 + "status": "Open",
76 + "contractEndDate": "2023-02-17",
77 + "authorizations": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations",
78 + "customerNo": "ABC123",
79 + "nationalConsumerIdentifier": {
80 + "value": "19101010-1010",
81 + "countryCode": "SE"
82 + },
83 + "contractId": 23456,
84 + "contractDescription": "Leasing product name",
85 + "duration": "12",
86 + "monthlyAmount": 400.00,
87 + "currency": "SEK",
88 + "accountProfile": "ContractFinancing-12",
89 + "operations": [
90 + {
91 + "rel": "add-authorization",
92 + "method": "POST",
93 + "href": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations"
94 + }
95 + ]
96 +}
97 +{{/code}}
98 +
99 +
100 +
101 +**Possible problems**
102 +
103 +(% class="table-bordered table-striped" %)
104 +|=Http status |=Problem type |=Description
105 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
106 +|422 |invalid-authentication-state |invalid authentication status for requested method
107 +|404 |not-found |invalid authentication status for requested method
108 +|404 |external-reservation-id-invalid |The requested resource was not found!
109 +|404 |invalid-reservation-status |The requested resource was not found!
110 +|500 |not-found |The requested resource was not found!
111 +
112 +==== 1.2 Create Contract ====
113 +
114 +Creating a contract involves PayEx credit checking the end customer. If approved, the contract is created, the initial authorization is also created and can be activated when the lease is started and the regret period is passed.
115 +
116 +{{code language="http" title="**Request**"}}
117 +POST /ledger/contract-financing/v1/{ownerNo}/contracts HTTP/1.1
118 +Host: -
119 +Authorization: Bearer<Token>
120 +Content-Type: application/json
121 +
122 +{
123 + "authorizationId": 55923,
124 + "authorizationAmount": 4800.00,
125 + "customerNo": "ABC123",
126 + "nationalConsumerIdentifier": {
127 + "value": "19101010-1010",
128 + "countryCode": "SE"
129 + },
130 + "contractId": 23456,
131 + "contractDescription": "Leasing product name",
132 + "duration": "12",
133 + "monthlyAmount": 400.00,
134 + "currency": "SEK",
135 + "accountProfile": "ContractFinancing-12"
136 +}
137 +{{/code}}
138 +
139 +
140 +**Request object specification**
141 +
142 +(% class="table-bordered table-striped" %)
143 +|=Property |=Data type|=Format|=Required|=Description
144 +|customerNo |string |Pattern: ^[a-zA-Z0-9\-]*$ |No |The identifier of the customer, normally required. Exception is when the configuration on the ledger is set for payex to generate customer numbers, in that case CustomerNo must not be set in request.
145 +Use only alphanumeric characters
146 +|=nationalConsumerIdentifier |object | |Yes |
147 +| value |string | |Yes |The identifier - SSN, Personnummer, CPR, d-nummer, temporary identification number etc. Uniquely identifies the consumer. Visit developer.payex.com for information about supported national identifier format
148 +| countryCode |string | |Yes |The country code for the identifier value property, empty strings are not allowed, [[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
149 +|contractId |number |Type: int32
150 +Max: 4294967295
151 +Min: 0 |Yes |Unique identifier of each contract in the ledger
152 +|contractDescription |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Textual name/description of the leased product. Used on the invoice/bill sent to the end customer
153 +|duration |string | |Yes |No. of months the contract is expected to last
154 +|monthlyAmount |number |Type: double
155 +Pattern: ^\d+.\d{0,2}$
156 +Max: 100000000
157 +Min: 0 |Yes |Regular monthly amount to be billed/payed
158 +|currency |string |(((
159 +* SEK
160 +* NOK
161 +* DKK
162 +* EUR
163 +)))|Yes |
164 +|accountProfile |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |No |Describes a set of behaviours on the contract, values are agreed with PayEx, may be optional depending on agreement.
165 +|operations |array | |No |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]]
166 +|authorizationId |number |Type: int64
167 +Min: 0 |Yes |Unique identifier of each authorization in the ledger
168 +|authorizationAmount |number |Type: double
169 +Pattern: ^\d+.\d{0,2}$
170 +Max: 100000000
171 +Min: 0 |Yes |Originally reserved contract value
172 +
173 +Get a created Contract
174 +
175 +{{code language="http" title="**Response**"}}
176 +HTTP/1.1 201 Created
177 +Content-Type: application/json
178 +
179 +{
180 + "unBilledAmount": 4800.00,
181 + "status": "Open",
182 + "authorizations": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations",
183 + "customerNo": "ABC123",
184 + "nationalConsumerIdentifier": {
185 + "value": "19101010-1010",
186 + "countryCode": "SE"
187 + },
188 + "contractId": 23456,
189 + "contractDescription": "Leasing product name",
190 + "duration": "12",
191 + "monthlyAmount": 400.00,
192 + "currency": "SEK",
193 + "accountProfile": "ContractFinancing-12",
194 + "operations": [
195 + {
196 + "rel": "add-authorization",
197 + "method": "POST",
198 + "href": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations"
199 + }
200 + ],
201 + "@id": "/ledger/contract-financing/v1/yyy/contracts/23456"
202 +}
203 +{{/code}}
204 +
205 +
206 +**Possible problems**
207 +
208 +(% class="table-bordered table-striped" %)
209 +|=Http status |=Problem type |=Description
210 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
211 +|422 |invalid-authentication-state |invalid authentication status for requested method
212 +|422 |credit-check-rejected |credit check or extend of credit check was rejected
213 +|500 |fatal |Unexpected error, logs may give details about the problem
214 +
215 +**Response object specification**
216 +
217 +(% class="table-bordered table-striped" %)
218 +|=Property |=Data type|=Format|=Description
219 +|@id |string | |Uri identifier of the current resource
220 +|customerNo |string |Pattern: ^[a-zA-Z0-9\-]*$ |The identifier of the customer, normally required. Exception is when the configuration on the ledger is set for payex to generate customer numbers, in that case CustomerNo must not be set in request.
221 +Use only alphanumeric characters
222 +|=nationalConsumerIdentifier |object | |
223 +| value |string | |The identifier - SSN, Personnummer, CPR, d-nummer, temporary identification number etc. Uniquely identifies the consumer. Visit developer.payex.com for information about supported national identifier format
224 +| countryCode |string | |The country code for the identifier value property, empty strings are not allowed, [[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
225 +|contractId |number |Type: int32
226 +Max: 4294967295
227 +Min: 0 |Unique identifier of each contract in the ledger
228 +|contractDescription |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Textual name/description of the leased product. Used on the invoice/bill sent to the end customer
229 +|duration |string | |No. of months the contract is expected to last
230 +|monthlyAmount |number |Type: double
231 +Pattern: ^\d+.\d{0,2}$
232 +Max: 100000000
233 +Min: 0 |Regular monthly amount to be billed/payed
234 +|currency |string |(((
235 +* SEK
236 +* NOK
237 +* DKK
238 +* EUR
239 +)))|
240 +|accountProfile |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Describes a set of behaviours on the contract, values are agreed with PayEx, may be optional depending on agreement.
241 +|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]]
242 +|unBilledAmount |number |Type: double |
243 +|status |string | |account status
244 +|contractEndDate |string |Type: date |Expected end date of the contract
245 +|authorizations |dynamic | |
246 +
247 +== 2. Authorizations ==
248 +
249 +
250 +Get authorization list.
251 +
252 +==== 2.1 Get list of Authorizations ====
253 +
254 +{{code language="http" title="**Request**"}}
255 +GET /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations HTTP/1.1
256 +Host: -
257 +Authorization: Bearer<Token>
258 +Content-Type: application/json
259 +
260 +{{/code}}
261 +
262 +List of authorizations
263 +
264 +{{code language="http" title="**Response**"}}
265 +HTTP/1.1 200 OK
266 +Content-Type: application/json
267 +
268 +{
269 + "items": [
270 + {
271 + "activatedAmount": 50,
272 + "creditedAmount": 10,
273 + "reservationValidToDate": "2025-02-25",
274 + "status": "Open",
275 + "operations": [
276 + {
277 + "rel": "activate",
278 + "method": "POST",
279 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/activate"
280 + },
281 + {
282 + "rel": "cancel",
283 + "method": "POST",
284 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/cancel"
285 + },
286 + {
287 + "rel": "credit",
288 + "method": "POST",
289 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/credit"
290 + }
291 + ],
292 + "authorizationId": 11111,
293 + "reservationAmount": 100,
294 + "currency": "SEK",
295 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111"
296 + },
297 + {
298 + "activatedAmount": 150,
299 + "creditedAmount": 100,
300 + "reservationValidToDate": "2025-03-25",
301 + "status": "Open",
302 + "operations": [
303 + {
304 + "rel": "activate",
305 + "method": "POST",
306 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/activate"
307 + },
308 + {
309 + "rel": "cancel",
310 + "method": "POST",
311 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/cancel"
312 + },
313 + {
314 + "rel": "credit",
315 + "method": "POST",
316 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/credit"
317 + }
318 + ],
319 + "authorizationId": 22222,
320 + "reservationAmount": 200,
321 + "currency": "SEK",
322 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222"
323 + }
324 + ],
325 + "navigation": {
326 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations"
327 + }
328 +}
329 +{{/code}}
330 +
331 +
332 +View a specific contract based on contractId
333 +
334 +==== 2.2 Get specific Authorization ====
335 +
336 +{{code language="http" title="**Request**"}}
337 +GET /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId} HTTP/1.1
338 +Host: -
339 +Authorization: Bearer<Token>
340 +Content-Type: application/json
341 +
342 +{{/code}}
343 +
344 +Get a created Contract
345 +
346 +{{code language="http" title="**Response**"}}
347 +HTTP/1.1 200 OK
348 +Content-Type: application/json
349 +
350 +{
351 + "activatedAmount": 1000.00,
352 + "creditedAmount": 500.00,
353 + "reservationValidToDate": "2025-02-25",
354 + "status": "Open",
355 + "operations": [
356 + {
357 + "rel": "activate",
358 + "method": "POST",
359 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/activate"
360 + },
361 + {
362 + "rel": "cancel",
363 + "method": "POST",
364 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/cancel"
365 + },
366 + {
367 + "rel": "credit",
368 + "method": "POST",
369 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/credit"
370 + }
371 + ],
372 + "authorizationId": 1425,
373 + "reservationAmount": 3500.00,
374 + "currency": "SEK"
375 +}
376 +{{/code}}
377 +
378 +
379 +
380 +**Possible problems**
381 +
382 +(% class="table-bordered table-striped" %)
383 +|=Http status |=Problem type |=Description
384 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
385 +|422 |invalid-authentication-state |invalid authentication status for requested method
386 +|404 |not-found |invalid authentication status for requested method
387 +|404 |external-reservation-id-invalid |The requested resource was not found!
388 +|404 |invalid-reservation-status |The requested resource was not found!
389 +|500 |not-found |The requested resource was not found!
390 +
391 +==== 2.3 Create Authorization ====
392 +
393 +Creating a authorization involves PayEx credit checking the end customer. If approved, the authorization is created and can be activated when the lease is started and the regret period is passed.
394 +
395 +{{code language="http" title="**Request**"}}
396 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations HTTP/1.1
397 +Host: -
398 +Authorization: Bearer<Token>
399 +Content-Type: application/json
400 +
401 +{
402 + "authorizationId": 55923,
403 + "reservationAmount": 1400.00,
404 + "currency": "SEK"
405 +}
406 +{{/code}}
407 +
408 +
409 +**Request object specification**
410 +
411 +(% class="table-bordered table-striped" %)
412 +|=Property |=Data type|=Format|=Required|=Description
413 +|authorizationId |number |Type: int64
414 +Min: 0 |Yes |Unique identifier of each authorization in the ledger
415 +|reservationAmount |number |Type: double
416 +Pattern: ^\d+.\d{0,2}$
417 +Max: 100000000
418 +Min: 0 |Yes |Originally reserved contract value
419 +|currency |string |(((
420 +* SEK
421 +* NOK
422 +* DKK
423 +* EUR
424 +)))|Yes |
425 +
426 +Get a created Contract
427 +
428 +{{code language="http" title="**Response**"}}
429 +HTTP/1.1 201 Created
430 +Content-Type: application/json
431 +
432 +{
433 + "activatedAmount": 1000.00,
434 + "creditedAmount": 500.00,
435 + "reservationValidToDate": "2025-02-25",
436 + "status": "Open",
437 + "operations": [
438 + {
439 + "rel": "activate",
440 + "method": "POST",
441 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/activate"
442 + },
443 + {
444 + "rel": "cancel",
445 + "method": "POST",
446 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/cancel"
447 + },
448 + {
449 + "rel": "credit",
450 + "method": "POST",
451 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/credit"
452 + }
453 + ],
454 + "authorizationId": 1425,
455 + "reservationAmount": 3500.00,
456 + "currency": "SEK",
457 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425"
458 +}
459 +{{/code}}
460 +
461 +
462 +**Possible problems**
463 +
464 +(% class="table-bordered table-striped" %)
465 +|=Http status |=Problem type |=Description
466 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
467 +|422 |invalid-authentication-state |invalid authentication status for requested method
468 +|422 |credit-check-rejected |credit check or extend of credit check was rejected
469 +|500 |fatal |Unexpected error, logs may give details about the problem
470 +
471 +
472 +**Response object specification**
473 +
474 +(% class="table-bordered table-striped" %)
475 +|=Property |=Data type|=Format|=Description
476 +|@id |string | |Uri identifier of the current resource
477 +|authorizationId |number |Type: int64
478 +Min: 0 |Unique identifier of each authorization in the ledger
479 +|reservationAmount |number |Type: double
480 +Pattern: ^\d+.\d{0,2}$
481 +Max: 100000000
482 +Min: 0 |Originally reserved contract value
483 +|currency |string |(((
484 +* SEK
485 +* NOK
486 +* DKK
487 +* EUR
488 +)))|\\
489 +|activatedAmount |number |Type: double |Total activated contracted value
490 +|creditedAmount |number |Type: double |Total credited contract value
491 +|reservationValidToDate |string |Type: date |The contract is valid for activation until this date
492 +|status |string | |authorization status
493 +|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]]
494 +
495 +== 3. Activate ==
496 +
497 +
498 +==== 3.1 Create Activate ====
499 +
500 +Activates the contract when the lease is started and regret period has passed. Initiates the clearing/settlement process of the contracted amount. The operation is exposed by the parent contract if available.
501 +
502 +{{code language="http" title="**Request**"}}
503 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/activate HTTP/1.1
504 +Host: -
505 +Authorization: Bearer<Token>
506 +Content-Type: application/json
507 +
508 +{
509 + "transactionId": "123548776",
510 + "contractEndDate": "2025-02-25",
511 + "amount": 100.00
512 +}
513 +{{/code}}
514 +
515 +
516 +**Request object specification**
517 +
518 +(% class="table-bordered table-striped" %)
519 +|=Property |=Data type|=Format|=Required|=Description
520 +|transactionId |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Unique identifier of all types of transactions (contract/activate/credit)in the ledger
521 +|contractEndDate |string |Type: date |Yes |The end date of the contract
522 +|amount |number |Type: double
523 +Max: 100000000
524 +Min: 0 |Yes |Part of the authorization to activate
525 +
526 +{{code language="http" title="**Response**"}}
527 +HTTP/1.1 201 CREATED
528 +Content-Type: application/json
529 +
530 +{
531 +}
532 +{{/code}}
533 +
534 +
535 +**Possible problems**
536 +
537 +(% class="table-bordered table-striped" %)
538 +|=Http status |=Problem type |=Description
539 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
540 +|422 |invalid-authentication-state |invalid authentication status for requested method
541 +|422 |invalid-reservation-status |occurs if the contract has another status than what's allowed for the operation
542 +|500 |fatal |Unexpected error, logs may give details about the problem
543 +|404 |external-reservation-id-invalid |The requested resource was not found!
544 +|404 |invalid-reservation-status |The requested resource was not found!
545 +
546 +== 4. Credit ==
547 +
548 +
549 +==== 4.1 Create Credit ====
550 +
551 +Credits the unbilled contract amount and initiates clearing and settlement of the credited amount. The operation is exposed by the parent contract if available.
552 +
553 +{{code language="http" title="**Request**"}}
554 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/credit HTTP/1.1
555 +Host: -
556 +Authorization: Bearer<Token>
557 +Content-Type: application/json
558 +
559 +{
560 + "transactionId": "1235487767",
561 + "amount": 120.22,
562 + "currency": "SEK"
563 +}
564 +{{/code}}
565 +
566 +
567 +**Request object specification**
568 +
569 +(% class="table-bordered table-striped" %)
570 +|=Property |=Data type|=Format|=Required|=Description
571 +|transactionId |string |Pattern: ^[a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Unique identifier of all types of transactions (contract/activate/credit)in the ledger
572 +|amount |number |Type: double
573 +Pattern: ^\d+.\d{0,2}$
574 +Max: 100000000
575 +Min: 0 |Yes |Amount to credit the contract
576 +|currency |string |(((
577 +* SEK
578 +* NOK
579 +* DKK
580 +* EUR
581 +)))|Yes |
582 +
583 +{{code language="http" title="**Response**"}}
584 +HTTP/1.1 201 CREATED
585 +Content-Type: application/json
586 +
587 +{
588 +}
589 +{{/code}}
590 +
591 +
592 +**Possible problems**
593 +
594 +(% class="table-bordered table-striped" %)
595 +|=Http status |=Problem type |=Description
596 +|400 |validation |Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
597 +|422 |invalid-authentication-state |Invalid authentication status for requested method
598 +|422 |invalid-amount |Credited amount is higher than available amount
599 +|422 |currency-not-configured |Currency is invalid
600 +|422 |external-reservation-id-invalid |Occurs if the used contractId isn't a match
601 +|500 |fatal |Unexpected error, logs may give details about the problem
602 +
603 +== 5. Cancel ==
604 +
605 +
606 +==== 5.1 Create Cancel ====
607 +
608 +Cancels the contract and the reserved amount on the end customer. The operation is exposed by the parent contract if available.
609 +
610 +{{code language="http" title="**Request**"}}
611 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/cancel HTTP/1.1
612 +Host: -
613 +Authorization: Bearer<Token>
614 +Content-Type: application/json
615 +
616 +{
617 +}
618 +{{/code}}
619 +
620 +
621 +
622 +{{code language="http" title="**Response**"}}
623 +HTTP/1.1 204 NO CONTENT
624 +Content-Type: application/json
625 +
626 +{}
627 +{{/code}}
628 +
629 +
630 +**Possible problems**
631 +
632 +(% class="table-bordered table-striped" %)
633 +|=Http status |=Problem type |=Description
634 +|400 |validation |Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
635 +|422 |invalid-authentication-state |Invalid authentication status for requested method
636 +|422 |invalid-reservation-status |Occurs if the contract has another status than what's allowed for the operation
637 +|422 |external-reservation-id-invalid |Occurs if the used contractId isn't a match
638 +|500 |fatal |Unexpected error, logs may give details about the problem
639 +
640 +
641 +
642 +{{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
ContractFinancing.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.rae
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content