Changes for page contract-financing-working
Last modified by Rasmus Enekvist on 2025/03/24 12:55
From empty
To version 13.1
edited by Rasmus Enekvist
on 2025/02/12 12:53
on 2025/02/12 12:53
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
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.XWikiGuest1 +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,652 @@ 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 + 113 +==== 1.2 Create Contract ==== 114 + 115 +Creating a contract involves PayEx credit checking the end customer. If approved, the contract is created and can be activated when the lease is started and the regret period is passed. 116 + 117 +{{code language="http" title="**Request**"}} 118 +POST /ledger/contract-financing/v1/{ownerNo}/contracts HTTP/1.1 119 +Host: - 120 +Authorization: Bearer<Token> 121 +Content-Type: application/json 122 + 123 +{ 124 + "authorizationId": 55923, 125 + "authorizationAmount": 4800.00, 126 + "customerNo": "ABC123", 127 + "nationalConsumerIdentifier": { 128 + "value": "19101010-1010", 129 + "countryCode": "SE" 130 + }, 131 + "contractId": 23456, 132 + "contractDescription": "Leasing product name", 133 + "duration": "12", 134 + "monthlyAmount": 400.00, 135 + "currency": "SEK", 136 + "accountProfile": "ContractFinancing-12" 137 +} 138 +{{/code}} 139 + 140 + 141 +**Request object specification** 142 + 143 +(% class="table-bordered table-striped" %) 144 +|=Property |=Data type|=Format|=Required|=Description 145 +|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. 146 +Use only alphanumeric characters 147 +|=nationalConsumerIdentifier |object | |Yes | 148 +| 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 149 +| 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]] 150 +|contractId |number |Type: int32 151 +Max: 4294967295 152 +Min: 0 |Yes |Unique identifier of each contract in the ledger 153 +|contractDescription |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Textual name/description of the leased product. Used on the invoice/bill sent to the end customer 154 +|duration |string | |Yes |No. of months the contract is expected to last 155 +|monthlyAmount |number |Type: double 156 +Pattern: ^\d+.\d{0,2}$ 157 +Max: 100000000 158 +Min: 0 |Yes |Regular monthly amount to be billed/payed 159 +|currency |string |((( 160 +* SEK 161 +* NOK 162 +* DKK 163 +* EUR 164 +))) |Yes | 165 +|accountProfile |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |No |Describes a set of behaviours on the contract, values are agreed with PayEx, may be optional depending on agreement. 166 +|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]] 167 +|authorizationId |number |Type: int64 168 +Min: 0 |Yes |Unique identifier of each authorization in the ledger 169 +|authorizationAmount |number |Type: double 170 +Pattern: ^\d+.\d{0,2}$ 171 +Max: 100000000 172 +Min: 0 |Yes |Originally reserved contract value 173 + 174 + 175 +Get a created Contract 176 + 177 +{{code language="http" title="**Response**"}} 178 +HTTP/1.1 201 Created 179 +Content-Type: application/json 180 + 181 +{ 182 + "unBilledAmount": 4800.00, 183 + "status": "Open", 184 + "authorizations": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations", 185 + "customerNo": "ABC123", 186 + "nationalConsumerIdentifier": { 187 + "value": "19101010-1010", 188 + "countryCode": "SE" 189 + }, 190 + "contractId": 23456, 191 + "contractDescription": "Leasing product name", 192 + "duration": "12", 193 + "monthlyAmount": 400.00, 194 + "currency": "SEK", 195 + "accountProfile": "ContractFinancing-12", 196 + "operations": [ 197 + { 198 + "rel": "add-authorization", 199 + "method": "POST", 200 + "href": "/ledger/contract-financing/v1/yyy/contracts/23456/authorizations" 201 + } 202 + ], 203 + "@id": "/ledger/contract-financing/v1/yyy/contracts/23456" 204 +} 205 +{{/code}} 206 + 207 + 208 +**Possible problems** 209 + 210 +(% class="table-bordered table-striped" %) 211 +|=Http status |=Problem type |=Description 212 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 213 +|422 |invalid-authentication-state |invalid authentication status for requested method 214 +|422 |credit-check-rejected |credit check or extend of credit check was rejected 215 +|500 |fatal |Unexpected error, logs may give details about the problem 216 + 217 + 218 + 219 +**Response object specification** 220 + 221 +(% class="table-bordered table-striped" %) 222 +|=Property |=Data type|=Format|=Description 223 +|@id |string | |Uri identifier of the current resource 224 +|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. 225 +Use only alphanumeric characters 226 +|=nationalConsumerIdentifier |object | | 227 +| 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 228 +| 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]] 229 +|contractId |number |Type: int32 230 +Max: 4294967295 231 +Min: 0 |Unique identifier of each contract in the ledger 232 +|contractDescription |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Textual name/description of the leased product. Used on the invoice/bill sent to the end customer 233 +|duration |string | |No. of months the contract is expected to last 234 +|monthlyAmount |number |Type: double 235 +Pattern: ^\d+.\d{0,2}$ 236 +Max: 100000000 237 +Min: 0 |Regular monthly amount to be billed/payed 238 +|currency |string |((( 239 +* SEK 240 +* NOK 241 +* DKK 242 +* EUR 243 +))) | 244 +|accountProfile |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Describes a set of behaviours on the contract, values are agreed with PayEx, may be optional depending on agreement. 245 +|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]] 246 +|unBilledAmount |number |Type: double | 247 +|status |string | |account status 248 +|contractEndDate |string |Type: date |Expected end date of the contract 249 +|authorizations |dynamic | | 250 +== 2. Authorizations == 251 + 252 + 253 +Get authorization list. 254 + 255 +==== 2.1 Get list of Authorizations ==== 256 + 257 +{{code language="http" title="**Request**"}} 258 +GET /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations HTTP/1.1 259 +Host: - 260 +Authorization: Bearer<Token> 261 +Content-Type: application/json 262 + 263 +{{/code}} 264 + 265 +List of authorizations 266 + 267 +{{code language="http" title="**Response**"}} 268 +HTTP/1.1 200 OK 269 +Content-Type: application/json 270 + 271 +{ 272 + "items": [ 273 + { 274 + "activatedAmount": 50, 275 + "creditedAmount": 10, 276 + "reservationValidToDate": "2025-02-25", 277 + "status": "Open", 278 + "operations": [ 279 + { 280 + "rel": "activate", 281 + "method": "POST", 282 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/activate" 283 + }, 284 + { 285 + "rel": "cancel", 286 + "method": "POST", 287 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/cancel" 288 + }, 289 + { 290 + "rel": "credit", 291 + "method": "POST", 292 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111/credit" 293 + } 294 + ], 295 + "authorizationId": 11111, 296 + "reservationAmount": 100, 297 + "currency": "SEK", 298 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/11111" 299 + }, 300 + { 301 + "activatedAmount": 150, 302 + "creditedAmount": 100, 303 + "reservationValidToDate": "2025-03-25", 304 + "status": "Open", 305 + "operations": [ 306 + { 307 + "rel": "activate", 308 + "method": "POST", 309 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/activate" 310 + }, 311 + { 312 + "rel": "cancel", 313 + "method": "POST", 314 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/cancel" 315 + }, 316 + { 317 + "rel": "credit", 318 + "method": "POST", 319 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222/credit" 320 + } 321 + ], 322 + "authorizationId": 22222, 323 + "reservationAmount": 200, 324 + "currency": "SEK", 325 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/22222" 326 + } 327 + ], 328 + "navigation": { 329 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations" 330 + } 331 +} 332 +{{/code}} 333 + 334 + 335 +View a specific contract based on contractId 336 + 337 +==== 2.2 Get specific Authorization ==== 338 + 339 +{{code language="http" title="**Request**"}} 340 +GET /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId} HTTP/1.1 341 +Host: - 342 +Authorization: Bearer<Token> 343 +Content-Type: application/json 344 + 345 +{{/code}} 346 + 347 +Get a created Contract 348 + 349 +{{code language="http" title="**Response**"}} 350 +HTTP/1.1 200 OK 351 +Content-Type: application/json 352 + 353 +{ 354 + "activatedAmount": 1000.00, 355 + "creditedAmount": 500.00, 356 + "reservationValidToDate": "2025-02-25", 357 + "status": "Open", 358 + "operations": [ 359 + { 360 + "rel": "activate", 361 + "method": "POST", 362 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/activate" 363 + }, 364 + { 365 + "rel": "cancel", 366 + "method": "POST", 367 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/cancel" 368 + }, 369 + { 370 + "rel": "credit", 371 + "method": "POST", 372 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/credit" 373 + } 374 + ], 375 + "authorizationId": 1425, 376 + "reservationAmount": 3500.00, 377 + "currency": "SEK" 378 +} 379 +{{/code}} 380 + 381 + 382 + 383 +**Possible problems** 384 + 385 +(% class="table-bordered table-striped" %) 386 +|=Http status |=Problem type |=Description 387 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 388 +|422 |invalid-authentication-state |invalid authentication status for requested method 389 +|404 |not-found |invalid authentication status for requested method 390 +|404 |external-reservation-id-invalid |The requested resource was not found! 391 +|404 |invalid-reservation-status |The requested resource was not found! 392 +|500 |not-found |The requested resource was not found! 393 + 394 + 395 +==== 2.3 Create Authorization ==== 396 + 397 +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. 398 + 399 +{{code language="http" title="**Request**"}} 400 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations HTTP/1.1 401 +Host: - 402 +Authorization: Bearer<Token> 403 +Content-Type: application/json 404 + 405 +{ 406 + "authorizationId": 55923, 407 + "reservationAmount": 1400.00, 408 + "currency": "SEK" 409 +} 410 +{{/code}} 411 + 412 + 413 +**Request object specification** 414 + 415 +(% class="table-bordered table-striped" %) 416 +|=Property |=Data type|=Format|=Required|=Description 417 +|authorizationId |number |Type: int64 418 +Min: 0 |Yes |Unique identifier of each authorization in the ledger 419 +|reservationAmount |number |Type: double 420 +Pattern: ^\d+.\d{0,2}$ 421 +Max: 100000000 422 +Min: 0 |Yes |Originally reserved contract value 423 +|currency |string |((( 424 +* SEK 425 +* NOK 426 +* DKK 427 +* EUR 428 +))) |Yes | 429 + 430 + 431 +Get a created Contract 432 + 433 +{{code language="http" title="**Response**"}} 434 +HTTP/1.1 201 Created 435 +Content-Type: application/json 436 + 437 +{ 438 + "activatedAmount": 1000.00, 439 + "creditedAmount": 500.00, 440 + "reservationValidToDate": "2025-02-25", 441 + "status": "Open", 442 + "operations": [ 443 + { 444 + "rel": "activate", 445 + "method": "POST", 446 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/activate" 447 + }, 448 + { 449 + "rel": "cancel", 450 + "method": "POST", 451 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/cancel" 452 + }, 453 + { 454 + "rel": "credit", 455 + "method": "POST", 456 + "href": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425/credit" 457 + } 458 + ], 459 + "authorizationId": 1425, 460 + "reservationAmount": 3500.00, 461 + "currency": "SEK", 462 + "@id": "/ledger/contract-financing/v1/yyy/contracts/ccc/authorizations/1425" 463 +} 464 +{{/code}} 465 + 466 + 467 +**Possible problems** 468 + 469 +(% class="table-bordered table-striped" %) 470 +|=Http status |=Problem type |=Description 471 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 472 +|422 |invalid-authentication-state |invalid authentication status for requested method 473 +|422 |credit-check-rejected |credit check or extend of credit check was rejected 474 +|500 |fatal |Unexpected error, logs may give details about the problem 475 + 476 + 477 + 478 +**Response object specification** 479 + 480 +(% class="table-bordered table-striped" %) 481 +|=Property |=Data type|=Format|=Description 482 +|@id |string | |Uri identifier of the current resource 483 +|authorizationId |number |Type: int64 484 +Min: 0 |Unique identifier of each authorization in the ledger 485 +|reservationAmount |number |Type: double 486 +Pattern: ^\d+.\d{0,2}$ 487 +Max: 100000000 488 +Min: 0 |Originally reserved contract value 489 +|currency |string |((( 490 +* SEK 491 +* NOK 492 +* DKK 493 +* EUR 494 +))) | 495 +|activatedAmount |number |Type: double |Total activated contracted value 496 +|creditedAmount |number |Type: double |Total credited contract value 497 +|reservationValidToDate |string |Type: date |The contract is valid for activation until this date 498 +|status |string | |authorization status 499 +|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]] 500 +== 3. Activate == 501 + 502 + 503 +==== 3.1 Create Activate ==== 504 + 505 +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. 506 + 507 +{{code language="http" title="**Request**"}} 508 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/activate HTTP/1.1 509 +Host: - 510 +Authorization: Bearer<Token> 511 +Content-Type: application/json 512 + 513 +{ 514 + "transactionId": "123548776", 515 + "contractEndDate": "2025-02-25", 516 + "amount": 100.00 517 +} 518 +{{/code}} 519 + 520 + 521 +**Request object specification** 522 + 523 +(% class="table-bordered table-striped" %) 524 +|=Property |=Data type|=Format|=Required|=Description 525 +|transactionId |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Unique identifier of all types of transactions (contract/activate/credit)in the ledger 526 +|contractEndDate |string |Type: date |Yes |The end date of the contract 527 +|amount |number |Type: double 528 +Max: 100000000 529 +Min: 0 |Yes |Part of the authorization to activate 530 + 531 + 532 +{{code language="http" title="**Response**"}} 533 +HTTP/1.1 201 CREATED 534 +Content-Type: application/json 535 + 536 +{ 537 +} 538 +{{/code}} 539 + 540 + 541 +**Possible problems** 542 + 543 +(% class="table-bordered table-striped" %) 544 +|=Http status |=Problem type |=Description 545 +|400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 546 +|422 |invalid-authentication-state |invalid authentication status for requested method 547 +|422 |invalid-reservation-status |occurs if the contract has another status than what's allowed for the operation 548 +|500 |fatal |Unexpected error, logs may give details about the problem 549 +|404 |external-reservation-id-invalid |The requested resource was not found! 550 +|404 |invalid-reservation-status |The requested resource was not found! 551 + 552 + 553 +== 4. Credit == 554 + 555 + 556 +==== 4.1 Create Credit ==== 557 + 558 +Credits the unbilled contract amount and initiates clearing and settlement of the credited amount. The operation is exposed by the parent contract if available. 559 + 560 +{{code language="http" title="**Request**"}} 561 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/credit HTTP/1.1 562 +Host: - 563 +Authorization: Bearer<Token> 564 +Content-Type: application/json 565 + 566 +{ 567 + "transactionId": "1235487767", 568 + "amount": 120.22, 569 + "currency": "SEK" 570 +} 571 +{{/code}} 572 + 573 + 574 +**Request object specification** 575 + 576 +(% class="table-bordered table-striped" %) 577 +|=Property |=Data type|=Format|=Required|=Description 578 +|transactionId |string |Pattern: ^[a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*$ |Yes |Unique identifier of all types of transactions (contract/activate/credit)in the ledger 579 +|amount |number |Type: double 580 +Pattern: ^\d+.\d{0,2}$ 581 +Max: 100000000 582 +Min: 0 |Yes |Amount to credit the contract 583 +|currency |string |((( 584 +* SEK 585 +* NOK 586 +* DKK 587 +* EUR 588 +))) |Yes | 589 + 590 + 591 +{{code language="http" title="**Response**"}} 592 +HTTP/1.1 201 CREATED 593 +Content-Type: application/json 594 + 595 +{ 596 +} 597 +{{/code}} 598 + 599 + 600 +**Possible problems** 601 + 602 +(% class="table-bordered table-striped" %) 603 +|=Http status |=Problem type |=Description 604 +|400 |validation |Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 605 +|422 |invalid-authentication-state |Invalid authentication status for requested method 606 +|422 |invalid-amount |Credited amount is higher than available amount 607 +|422 |currency-not-configured |Currency is invalid 608 +|422 |external-reservation-id-invalid |Occurs if the used contractId isn't a match 609 +|500 |fatal |Unexpected error, logs may give details about the problem 610 + 611 + 612 +== 5. Cancel == 613 + 614 + 615 +==== 5.1 Create Cancel ==== 616 + 617 +Cancels the contract and the reserved amount on the end customer. The operation is exposed by the parent contract if available. 618 + 619 +{{code language="http" title="**Request**"}} 620 +POST /ledger/contract-financing/v1/{ownerNo}/contracts/{contractId}/authorizations/{authorizationId}/cancel HTTP/1.1 621 +Host: - 622 +Authorization: Bearer<Token> 623 +Content-Type: application/json 624 + 625 +{ 626 +} 627 +{{/code}} 628 + 629 + 630 + 631 +{{code language="http" title="**Response**"}} 632 +HTTP/1.1 204 NO CONTENT 633 +Content-Type: application/json 634 + 635 +{} 636 +{{/code}} 637 + 638 + 639 +**Possible problems** 640 + 641 +(% class="table-bordered table-striped" %) 642 +|=Http status |=Problem type |=Description 643 +|400 |validation |Occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation 644 +|422 |invalid-authentication-state |Invalid authentication status for requested method 645 +|422 |invalid-reservation-status |Occurs if the contract has another status than what's allowed for the operation 646 +|422 |external-reservation-id-invalid |Occurs if the used contractId isn't a match 647 +|500 |fatal |Unexpected error, logs may give details about the problem 648 + 649 + 650 + 651 + 652 +{{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