Documentation version 1.01, 21.06.2023
The current document contains information on how partial returns can be performed for Hire Purchase or Pay in parts / Split into parts contracts via Inbank API. The process description can be found in the API Request Flow chapter. Note that unlike most of other Inbank API endpoints, the endpoints for the partial returns process include v3
and not v2
in the request URL.
Please note, that the current document is applicable to partial returns only, if you would like to implement full contact withdrawal, refer to Contract Withdrawal.
To test in the demo environment, please let us know as extra steps are needed from our side to ensure the return will work for your tests.
There are two preconditions for partial returns:
For any questions regarding the partial return integration process, contact Inbank at:
Estonia:
Environment | API | Partner Portal |
---|---|---|
Test | https://demo-api.inbank.ee/partner/v3/ | https://demo-partner.inbank.ee/ |
Production | https://api.inbank.ee/partner/v3/ | https://partner.inbank.ee/ |
Latvia:
Environment | API | Partner Portal |
---|---|---|
Test | https://demo-api.inbank.lv/partner/v3/ | https://demo-partner.inbank.lv/ |
Production | https://api.inbank.lv/partner/v3/ | https://partner.inbank.lv/ |
Poland:
Environment | API | Partner Portal |
---|---|---|
Test | https://demo-api.inbank.pl/partner/v3/ | https://demo-partner.inbank.pl/ |
Production | https://api.inbank.pl/partner/v3/ | https://partner.inbank.pl/ |
Czechia:
Environment | API | Partner Portal |
---|---|---|
Test | https://demo-api.inbank.cz/partner/v3/ | https://demo-partner.inbank.cz/ |
Production | https://api.inbank.cz/partner/v3/ | https://partner.inbank.cz/ |
GET /partner/v3/shops/{shopUuid}/contracts/{contractUuid}/change-options
The endpoint returns the information on whether a partial return is possible and if so also the amount range within which the return can be submitted.
Return contract change-options
Unauthorized
Forbidden
Not Found
Unprocessable Entity
Internal Server Error
{- "options": {
- "PARTIAL_RETURN": {
- "maxReturnAmount": 499.99,
- "minReturnAmount": 0.01
}
}
}
POST /partner/v3/shops/{shopUuid}/contracts/{contractUuid}/versions
Using this endpoint a partial return can be submitted to Inbank, which in turn creates a new contract version that needs to be reviewed and, if all is fine, then activated.
Create new draft contract version
Unauthorized
Forbidden
Not Found
Unprocessable Entity
Internal Server Error
{- "contractChangeDetails": [
- {
- "type": "PARTIAL_RETURN",
- "returnAmount": 58.65
}
]
}
{- "uuid": "aa48230c-2b2f-4a33-a7b4-3ce1705a0721",
- "status": "DRAFT",
- "createdAt": "2023-05-31T15:22:02.095689040Z",
- "sourceContractChange": {
- "uuid": "83841538-b616-4f05-ab2d-69ad1a5f0cab",
- "fromContractVersionUuid": "9435e008-86a1-4303-ae48-a3259f35df78",
- "toContractVersionUuid": "aa48230c-2b2f-4a33-a7b4-3ce1705a0721",
- "createdAt": "2023-05-31T15:22:02.113096869Z",
- "entityCreatedBy": "5e97bbd2-b40a-4b24-bfdd-d0ee2e95bd2c",
- "contractChangeDetails": {
- "type": "PARTIAL_RETURN",
- "uuid": "1b799c01-3aca-4896-8c49-7c08cefca0cb",
- "returnAmount": 50.22
}
}, - "pricingUuid": "0d8a822a-58e5-408c-9f69-1e7e0dfe8043",
- "paymentScheduleUuid": "aecbf130-31c0-4f1b-9ca9-f006467d8c43",
- "consumerCreditInformationUuid": "a6d3dfb7-767e-49b0-bdd7-3d03e615ece2"
}
GET /partner/v3/shops/{shopUuid}/contracts/{contractUuid}/payment-schedules/{paymentScheduleUuid}
If the updated payment schedule needs to be reviewed prior to activating the contact with the updated amount, it can be retrieved using this endpoint.
Please note, that this endpoint is optional in the preces, so if you do not have the need to review the payment schedule, this step can be skipped.
Return payment schedule
Unauthorized
Forbidden
Not Found
Internal Server Error
{- "uuid": "aecbf130-31c0-4f1b-9ca9-f006467d8c43",
- "responseLevel": "full",
- "period": 12,
- "amount": 500,
- "paymentDay": 5,
- "downPaymentAmountTotal": 0,
- "netCreditAmount": 449.78,
- "paymentAmountMonthly": 41.24,
- "interestRateAnnual": 0,
- "contractFeeAmountTotal": 15,
- "adminFeeAmountMonthly": 2.5,
- "adminFeeAmountTotal": 30,
- "insuranceFeeAmountTotal": 0,
- "creditCostRateAnnual": 0.1685,
- "creditCostAmountTotal": 45,
- "residualAmountTotal": 0,
- "residualAmountPrc": 0,
- "interestBearingAmount": 464.78,
- "interestAmountTotal": 0,
- "repaymentsAmountTotal": 545,
- "firstPaymentDate": "2023-07-05",
- "firstPaymentAmount": 41.24,
- "lastPaymentDate": "2024-06-05",
- "lastPaymentAmount": 41.14,
- "downPaymentMainPart": 0,
- "rowsTotals": {
- "paymentAmountTotal": 494.78
}, - "paymentScheduleItems": [
- {
- "itemNumber": 0,
- "paymentDate": "2023-05-30",
- "balanceBefore": 464.78,
- "principal": 0,
- "residual": 0,
- "interest": 0,
- "contractFee": 15,
- "adminFee": 0,
- "insuranceFee": 0,
- "totalPayment": 0
}, - {
- "itemNumber": 1,
- "paymentDate": "2023-07-05",
- "balanceBefore": 464.78,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 2,
- "paymentDate": "2023-08-05",
- "balanceBefore": 426.04,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 3,
- "paymentDate": "2023-09-05",
- "balanceBefore": 387.3,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 4,
- "paymentDate": "2023-10-05",
- "balanceBefore": 348.56,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 5,
- "paymentDate": "2023-11-05",
- "balanceBefore": 309.82,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 6,
- "paymentDate": "2023-12-05",
- "balanceBefore": 271.08,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 7,
- "paymentDate": "2024-01-05",
- "balanceBefore": 232.34,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 8,
- "paymentDate": "2024-02-05",
- "balanceBefore": 193.6,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 9,
- "paymentDate": "2024-03-05",
- "balanceBefore": 154.86,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 10,
- "paymentDate": "2024-04-05",
- "balanceBefore": 116.12,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 11,
- "paymentDate": "2024-05-05",
- "balanceBefore": 77.38,
- "principal": 38.74,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.24
}, - {
- "itemNumber": 12,
- "paymentDate": "2024-06-05",
- "balanceBefore": 38.64,
- "principal": 38.64,
- "residual": 0,
- "interest": 0,
- "contractFee": 0,
- "adminFee": 2.5,
- "insuranceFee": 0,
- "totalPayment": 41.14
}
]
}
PATCH /partner/v3/shops/{shopUuid}/contracts/{contractUuid}/versions/{versionUuid}/activate
For the partial return to take effect, the updated contract needs to be activated. Please note, that after this request is sent, the updates will be instantly applied.
New version activated
Unauthorized
Forbidden
Not Found
Internal Server Error
{- "message": "unauthorized"
}
GET /partner/v3/shops/{shopUuid}/contracts/{contractUuid}/versions
The endpoint returns the change history for the contract, with UUIDS to the payment schedules and dates of the change.
Get versions
Unauthorized
Forbidden
Not Found
Unprocessable Entity
Internal Server Error
{- "contractVersions": [
- {
- "uuid": "aa48230c-2b2f-4a33-a7b4-3ce1705a0721",
- "status": "ACTIVATED",
- "activatedAt": "2023-05-31T15:32:59.702204Z",
- "createdAt": "2023-05-31T15:22:01.525221Z",
- "sourceContractChange": {
- "uuid": "83841538-b616-4f05-ab2d-69ad1a5f0cab",
- "fromContractVersionUuid": "9435e008-86a1-4303-ae48-a3259f35df78",
- "toContractVersionUuid": "aa48230c-2b2f-4a33-a7b4-3ce1705a0721",
- "createdAt": "2023-05-31T15:22:01.525221Z",
- "entityCreatedBy": "5e97bbd2-b40a-4b24-bfdd-d0ee2e95bd2c",
- "contractChangeDetails": [
- {
- "type": "PARTIAL_RETURN",
- "uuid": "1b799c01-3aca-4896-8c49-7c08cefca0cb",
- "returnAmount": 58.65
}
]
}, - "pricingUuid": "0d8a822a-58e5-408c-9f69-1e7e0dfe8043",
- "paymentScheduleUuid": "aecbf130-31c0-4f1b-9ca9-f006467d8c43",
- "consumerCreditInformationUuid": "a6d3dfb7-767e-49b0-bdd7-3d03e615ece2"
}
]
}