DPA Products API
This API allows managing DPA (Deferred Payment Agreement) products in the system. It provides endpoints to create, read, update, and delete DPA products, as well as perform specific operations such as changing the product status.
The CMS Base URL is used (see introduction).
The Credit Product Object
The Credit Product object represents a credit product in the system. It defines the characteristics and terms of a loan that can be offered to customers.
Attributes
| Attribute | Description | Type |
|---|---|---|
productId | Unique identifier of the product | String (UUID) |
name | Product name | String |
description | Product description | String |
partnerId | Identifier of the partner associated with the product | String (UUID) |
amortizationType | Loan amortization type ("equal_total": French) | String |
repayEvery | Number of days between payments | Integer |
installments | Number of loan installments | Integer |
interestRate | Interest rate configuration | Object |
interestRate.type | Interest rate type ("fixed" or "dynamic") | String |
interestRate.period | Base period for interest calculation | Integer |
interestRate.periodTime | Period time in days | Integer |
interestRate.tier | Interest rate tiers | Object |
interestRate.tier.default | Default interest rate | String (percentage) |
interestTax | Interest tax rate | Number |
penalties | List of penalty policies | Array of Object |
penalties[].chargeCode | Charge code for the penalty | String |
penalties[].gracePeriod | Grace period in days before applying the penalty | Integer |
penalties[].rate | Penalty rate configuration | Object |
penalties[].rate.rate | Penalty rate value | String (percentage) |
penalties[].rate.period | Penalty rate application period | Integer |
penalties[].computeEvery | Penalty calculation frequency in days | Integer |
penalties[].timesToCompute | Number of times the penalty is applied | Integer |
penalties[].enabled | Indicates if the penalty is active | Boolean |
productTier | Minimum and maximum amount ranges of the product | Object |
productTier.minimum | Minimum amount configuration for DPA flows that can be created/simulated with the product | Object |
productTier.minimum.amount | Minimum amount value | String |
productTier.minimum.currency | Currency of the minimum amount | String |
productTier.maximum | Maximum amount configuration for DPA flows that can be created/simulated with the product | Object |
productTier.maximum.amount | Maximum amount value | String |
productTier.maximum.currency | Currency of the maximum amount | String |
disbursementSettings | Disbursement configuration | Object |
disbursementSettings.disburseTo | Disbursement recipient ("partner" or "customer") | String |
status | Product status ("enabled" or "disabled") | String |
tenant | Tenant (Account) to which the product belongs | String |
Available Operations
List Credit Products
Retrieves a list of credit products.
Query Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
status | Filter by product status | String | No |
page | Page number | Integer | No |
per-page | Items per page | Integer | No |
sort-direction | Sorting direction | String | No |
sort-by | Field to sort by | String | No |
Successful Response
The response will be an array of Credit Product objects.
Create a Credit Product
Creates a new credit product in the system for a specific partner.
Path Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
partner-id | ID of the partner for whom the product is created | String (UUID) | Yes |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
name | Product name | String | Yes |
description | Product description | String | No |
amortizationType | Amortization type (equal_total or flat) | String | Yes |
repayEvery | Number of days between payments | Integer | Yes |
installments | Number of installments | Integer | Yes |
interestCalculateType | Interest calculation type (period or lifetime) | String | Yes |
interestRates | Interest rate configuration | Object | Yes |
taxRate | Tax rate (percentage) | Number | Yes |
penalties | List of penalty policies | Array of Objects | Yes |
productTier | Product amount ranges | Object | No |
disbursement | Disbursement configuration | Object | Yes |
Nested Fields
interestRates (Object)
| Field | Description | Type | Required |
|---|---|---|---|
type | Interest rate type (fixed or dynamic) | String | Yes |
period | Base period for interest calculation (in days) | Integer | Yes |
periodTime | Interest period duration (in days) | Integer | Yes |
tier | Interest rates by tier | Object | Yes |
tier (Object)
| Field | Description | Type | Required |
|---|---|---|---|
default | Default interest rate | String | Yes |
A | Interest rate for customers with risk rating A | String | No |
B | Interest rate for customers with risk rating B | String | No |
C | Interest rate for customers with risk rating C | String | No |
D | Interest rate for customers with risk rating D | String | No |
E | Interest rate for customers with risk rating E | String | No |
F | Interest rate for customers with risk rating F | String | No |
If the Risk Rating is A, the interest rate A will be applied, and so on. If an interest rate for a risk level is not specified, the default interest rate will be used.
penalties (Array of Objects)
Each object in the penalties array has the following structure:
| Field | Description | Type | Required |
|---|---|---|---|
chargeCode | Charge code for the penalty | String | Yes |
gracePeriod | Grace period in days | Integer | Yes |
rate | Penalty rate configuration | Object | Yes |
computeEvery | Penalty calculation frequency (in days) | Integer | Yes |
timesToCompute | Number of times the penalty is applied | Integer | Yes |
enabled | Indicates if the penalty is enabled | Boolean | Yes |
rate (Object)
| Field | Description | Type | Required |
|---|---|---|---|
rate | Penalty rate | String | Yes |
period | Period for the penalty rate (in days) | Integer | Yes |
productTier (Object)
| Field | Description | Type | Required |
|---|---|---|---|
minimum | Minimum product amount | Object | Yes |
maximum | Maximum product amount | Object | Yes |
minimum and maximum (Object)
| Field | Description | Type | Required |
|---|---|---|---|
amount | Amount | String | Yes |
currency | Currency code | String | Yes |
disbursement (Object)
| Field | Description | Type | Required |
|---|---|---|---|
disburseTo | Disbursement recipient (partner or customer) | String | Yes |
Request Example
Successful Response
Possible Specific Errors
| Code | Description |
|---|---|
| 409 | Conflict. A product with the same name already exists for this partner. |
Get a Credit Product
Retrieves information about a specific credit product.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
product-id | Credit product ID |
Successful Response
The response will be a complete Credit Product object.
Update a Credit Product
Updates information about an existing credit product.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
product-id | Credit product ID |
Input Parameters
The same as in product creation, all optional.
Request Example
Successful Response
The response will be the updated Credit Product object.
Delete a Credit Product
Deletes a credit product from the system.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
product-id | Credit product ID |
Successful Response
Status code 204 (No Content) if the deletion was successful.
Change the Status of a Credit Product
Updates the status of a credit product.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
product-id | Credit product ID |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
status | New product status | String ("enabled" or "disabled") | Yes |
Request Example
Successful Response
Status code 204 (No Content) if the update was successful.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.