AltScore
Credit Management System (CMS)

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.

{
  "productId": "e4341b4b-ce1c-4692-bb75-9f438b29dec4",
  "name": "Product A",
  "description": "A product description",
  "partnerId": "6457c3ce-3887-45d6-92ca-299219ea96db",
  "amortizationType": "equal_total",
  "repayEvery": 15,
  "installments": 2,
  "interestRate": {
    "type": "fixed",
    "period": 360,
    "periodTime": 7,
    "tier": {
      "default": "12.50"
    }
  },
  "interestTax": 12.5,
  "penalties": [
    {
      "chargeCode": "once-7-days",
      "gracePeriod": 15,
      "rate": {
        "rate": "12.50",
        "period": 30
      },
      "computeEvery": 7,
      "timesToCompute": 1,
      "enabled": true
    }
  ],
  "productTier": {
    "minimum": {
      "amount": "1000.00",
      "currency": "ARS"
    },
    "maximum": {
      "amount": "100000.00",
      "currency": "ARS"
    }
  },
  "disbursementSettings": {
    "disburseTo": "partner"
  },
  "status": "enabled",
  "tenant": "altscore"
}

Attributes

AttributeDescriptionType
productIdUnique identifier of the productString (UUID)
nameProduct nameString
descriptionProduct descriptionString
partnerIdIdentifier of the partner associated with the productString (UUID)
amortizationTypeLoan amortization type ("equal_total": French)String
repayEveryNumber of days between paymentsInteger
installmentsNumber of loan installmentsInteger
interestRateInterest rate configurationObject
interestRate.typeInterest rate type ("fixed" or "dynamic")String
interestRate.periodBase period for interest calculationInteger
interestRate.periodTimePeriod time in daysInteger
interestRate.tierInterest rate tiersObject
interestRate.tier.defaultDefault interest rateString (percentage)
interestTaxInterest tax rateNumber
penaltiesList of penalty policiesArray of Object
penalties[].chargeCodeCharge code for the penaltyString
penalties[].gracePeriodGrace period in days before applying the penaltyInteger
penalties[].ratePenalty rate configurationObject
penalties[].rate.ratePenalty rate valueString (percentage)
penalties[].rate.periodPenalty rate application periodInteger
penalties[].computeEveryPenalty calculation frequency in daysInteger
penalties[].timesToComputeNumber of times the penalty is appliedInteger
penalties[].enabledIndicates if the penalty is activeBoolean
productTierMinimum and maximum amount ranges of the productObject
productTier.minimumMinimum amount configuration for DPA flows that can be created/simulated with the productObject
productTier.minimum.amountMinimum amount valueString
productTier.minimum.currencyCurrency of the minimum amountString
productTier.maximumMaximum amount configuration for DPA flows that can be created/simulated with the productObject
productTier.maximum.amountMaximum amount valueString
productTier.maximum.currencyCurrency of the maximum amountString
disbursementSettingsDisbursement configurationObject
disbursementSettings.disburseToDisbursement recipient ("partner" or "customer")String
statusProduct status ("enabled" or "disabled")String
tenantTenant (Account) to which the product belongsString

Available Operations

List Credit Products

Retrieves a list of credit products.

GET /v2/partners/:partner-id/products/dpa

Query Parameters

ParameterDescriptionTypeRequired
statusFilter by product statusStringNo
pagePage numberIntegerNo
per-pageItems per pageIntegerNo
sort-directionSorting directionStringNo
sort-byField to sort byStringNo

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.

POST /v2/partners/:partner-id/products/dpa

Path Parameters

ParameterDescriptionTypeRequired
partner-idID of the partner for whom the product is createdString (UUID)Yes

Input Parameters

ParameterDescriptionTypeRequired
nameProduct nameStringYes
descriptionProduct descriptionStringNo
amortizationTypeAmortization type (equal_total or flat)StringYes
repayEveryNumber of days between paymentsIntegerYes
installmentsNumber of installmentsIntegerYes
interestCalculateTypeInterest calculation type (period or lifetime)StringYes
interestRatesInterest rate configurationObjectYes
taxRateTax rate (percentage)NumberYes
penaltiesList of penalty policiesArray of ObjectsYes
productTierProduct amount rangesObjectNo
disbursementDisbursement configurationObjectYes

Nested Fields

interestRates (Object)

FieldDescriptionTypeRequired
typeInterest rate type (fixed or dynamic)StringYes
periodBase period for interest calculation (in days)IntegerYes
periodTimeInterest period duration (in days)IntegerYes
tierInterest rates by tierObjectYes

tier (Object)

FieldDescriptionTypeRequired
defaultDefault interest rateStringYes
AInterest rate for customers with risk rating AStringNo
BInterest rate for customers with risk rating BStringNo
CInterest rate for customers with risk rating CStringNo
DInterest rate for customers with risk rating DStringNo
EInterest rate for customers with risk rating EStringNo
FInterest rate for customers with risk rating FStringNo

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:

FieldDescriptionTypeRequired
chargeCodeCharge code for the penaltyStringYes
gracePeriodGrace period in daysIntegerYes
ratePenalty rate configurationObjectYes
computeEveryPenalty calculation frequency (in days)IntegerYes
timesToComputeNumber of times the penalty is appliedIntegerYes
enabledIndicates if the penalty is enabledBooleanYes

rate (Object)

FieldDescriptionTypeRequired
ratePenalty rateStringYes
periodPeriod for the penalty rate (in days)IntegerYes

productTier (Object)

FieldDescriptionTypeRequired
minimumMinimum product amountObjectYes
maximumMaximum product amountObjectYes

minimum and maximum (Object)

FieldDescriptionTypeRequired
amountAmountStringYes
currencyCurrency codeStringYes

disbursement (Object)

FieldDescriptionTypeRequired
disburseToDisbursement recipient (partner or customer)StringYes

Request Example

{
  "name": "New DPA Product",
  "description": "A new deferred payment agreement product",
  "amortizationType": "equal_total",
  "repayEvery": 30,
  "installments": 3,
  "interestCalculateType": "period",
  "interestRates": {
    "type": "fixed",
    "period": 360,
    "periodTime": 30,
    "tier": {
      "default": "15.00"
    }
  },
  "taxRate": 10.5,
  "penalties": [
    {
      "chargeCode": "late-payment",
      "gracePeriod": 5,
      "rate": {
        "rate": "5.00",
        "period": 30
      },
      "computeEvery": 1,
      "timesToCompute": 3,
      "enabled": true
    }
  ],
  "productTier": {
    "minimum": {
      "amount": "500.00",
      "currency": "ARS"
    },
    "maximum": {
      "amount": "50000.00",
      "currency": "ARS"
    }
  },
  "disbursement": {
    "disburseTo": "partner"
  }
}

Successful Response

{
  "productId": "f5452db8-6d6e-4a78-8cb9-e4a8e3d0e7bf"
}

Possible Specific Errors

CodeDescription
409Conflict. A product with the same name already exists for this partner.

Get a Credit Product

Retrieves information about a specific credit product.

GET /v2/partners/:partner-id/products/dpa/:product-id

Path Parameters

ParameterDescription
partner-idPartner ID
product-idCredit product ID

Successful Response

The response will be a complete Credit Product object.

Update a Credit Product

Updates information about an existing credit product.

PATCH /v2/partners/:partner-id/products/dpa/:product-id

Path Parameters

ParameterDescription
partner-idPartner ID
product-idCredit product ID

Input Parameters

The same as in product creation, all optional.

Request Example

{
  "name": "Updated DPA Product",
  "description": "An updated deferred payment agreement product",
  "interestRates": {
    "type": "fixed",
    "period": 360,
    "periodTime": 30,
    "tier": {
      "default": "16.00"
    }
  }
}

Successful Response

The response will be the updated Credit Product object.

Delete a Credit Product

Deletes a credit product from the system.

DELETE /v2/partners/:partner-id/products/dpa/:product-id

Path Parameters

ParameterDescription
partner-idPartner ID
product-idCredit 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.

PUT /v2/partners/:partner-id/products/dpa/:product-id/status

Path Parameters

ParameterDescription
partner-idPartner ID
product-idCredit product ID

Input Parameters

ParameterDescriptionTypeRequired
statusNew product statusString ("enabled" or "disabled")Yes

Request Example

{
  "status": "disabled"
}

Successful Response

Status code 204 (No Content) if the update was successful.

Error Handling

The API may return the following error codes:

CodeDescription
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
500Internal Server Error

Errors will include a descriptive message in the response body.