Skip to main content

Installments API

Use Case

This API will be used to return with installment packages avalaibale for user

Request

POST/v2/installments/packages

ParameterTypeRequiredDescription
merchantIdStringFundiin provides MID as a unique identifier to each merchant.
langStringLanguage of returned message (vi or en)
amount.valueNumberThe amount of the transaction
amount.currencyStringVND
firstInstallmentPercentDoubleThe first amount user have to pay for an installment purchase,
default is taking the lowest one
descriptionStringDescription for the order.
itemsJsonArrayItems

Data of each items

AttributeTypeRequiredDescription
productIdStringThe Id of item.
productNameStringThe name of item.
descriptionStringThe description of item.
categoryStringThe type of item.
currencyStringVND
quantityIntegerQuantity number of each item. It must be greater than 0
priceNumberPrice of single unit item
totalAmountNumberprice x quantity
imageUrlStringLink image of product.

Example Request

{
"merchantId": "Your merchant code",
"lang": "vi",
"description": "description",
"firstInstallmentPercent" : 0.3,
"amount": {
"currency": "VND",
"value": 1000000
},
"items": [
{
"id": "170594",
"productId": "170594",
"productName": "clothes",
"quantity": 2,
"price": 200000,
"totalAmount": 400000,
"purchaseAmount": 400000
}
]
}

Response

ParameterTypeRequiredDescription
merchantIdStringFundiin provides MID as a unique identifier to each merchant.
responseTimeStringDate & Time of response:
Format: YYYY-MM-DD hh:mm:ss
firstInstallmentPercentStringThe first amount user have to pay for an installment purchase
firstInstallmentsJsonArrayList of the first amount user have to pay for an installment purchase
installmentPacksJsonArrayThis specifies packages for installments in the current provided in "firstInstallmentPercent" field.
resultStatusStringResult status
resultMsgStringThe result message which contains information about the result.

Data of installmentPacks

AttributeTypeRequiredDescription
packageIdStringThe Id of package.
packageTypeStringThe type of package: 30_days,3_months, 6_months, 9_months, 12_months
firstInstallmentPercentDoubleThe first percent user have to pay for an installment purchase
firstInstallmentAmountLongThe first amount user have to pay for an installment purchase
subSeqInstallmentAmountLongThe subsequent amounts the customer pay for an installment purchase.
interestRateDoubleThe proportion of an installment that is charged
totalAmountDueLongThe total amount on an installment purchase inclusive of fees and interest for the installment package
tenureIntegerThe number of tenure.
installmentFeeLongInstallment Fee
{
"responseTime": "2023-08-03 04:10:14",
"resultStatus": "APPROVED",
"resultMsg": "The transaction was approved.",
"merchantId": "your merchant code",
"amount": {
"currency": "VND",
"value": 1000000
},
"firstInstallmentPercent": 0.3,
"firstInstallments": [
{
"firstInstallmentPercent": 0.3,
"firstInstallmentAmount": 300000
},
{
"firstInstallmentPercent": 0.4,
"firstInstallmentAmount": 400000
},
{
"firstInstallmentPercent": 0.5,
"firstInstallmentAmount": 500000
},
{
"firstInstallmentPercent": 0.6,
"firstInstallmentAmount": 600000
},
{
"firstInstallmentPercent": 0.7,
"firstInstallmentAmount": 700000
}
],
"installmentPacks": [
{
"packageId": "067000",
"packageType": "6_months",
"firstInstallmentPercent": 0.7,
"firstInstallmentAmount": 700000,
"subSeqInstallmentAmount": 53000,
"interestRate": 0.05,
"installmentFee": 15000,
"totalAmountDue": 1015000,
"tenure": 6
},
{
"packageId": "097000",
"packageType": "9_months",
"firstInstallmentPercent": 0.7,
"firstInstallmentAmount": 700000,
"subSeqInstallmentAmount": 35000,
"interestRate": 0.05,
"installmentFee": 15000,
"totalAmountDue": 1015000,
"tenure": 9
},
{
"packageId": "127000",
"packageType": "12_months",
"firstInstallmentPercent": 0.7,
"firstInstallmentAmount": 700000,
"subSeqInstallmentAmount": 27000,
"interestRate": 0.05,
"installmentFee": 15000,
"totalAmountDue": 1015000,
"tenure": 12
}
]
}

Result Status & Messages

Status codeDescriptionAction to take
APPROVEDThe transaction was successfully initialized.Proceed with the transaction as it has been approved.
ACCESS_DENIEDAccess denied.Please check your settings in the merchant portal or contact Fundiin for configurations.
INVALID_REQUESTInvalid request. e.g., Invalid currency, invalid amount, etc.Ensure that the request parameters are correct and meet the API requirements.
INVALID_FIRST_INSTALLMENT_PERCENTThe first installment percent is invalid.Please retry with a correct firstInstallmentPercent.
INVALID_CLIENT_IDThe clientId is not registered.Make sure to use a valid and registered clientId for the request.
INVALID_SIGNATUREThe signature is invalid.Double-check the signature generation process to ensure its correctness.
INVALID_MERCHANT_IDThe merchant is not registered.Ensure that the merchant ID is correct and registered with Fundiin.
INVALID_HTTP_METHODThe server does not implement the requested HTTPS method.Use the correct HTTP method (e.g., GET, POST, etc.) when making the request.
INVALID_APIAPI is not defined.Check whether the request URL is correct. Ensure that the endpoint of the called API is correct.
INVALID_AMOUNTPayment amount is invalid.Verify the payment amount and provide a valid amount.
AMOUNT_EXCEEDED_UPPER_LIMITThe payment amount exceeds the limit at the merchant level or account level.Ensure that the payment amount is within the specified limit.
AMOUNT_BELOW_MINIMUM_LIMITThe payment amount is below the minimum limit.Increase the payment amount to meet the minimum limit.
REQUEST_PROCESSINGThe request has already been processed or is in progress.Monitor the transaction status or take appropriate action based on the current progress.
INSTALLMENT_UNAVAILABLEThe installment package information is invalid.Verify the installment package information provided and correct any errors.
DOWNSTREAM_ERRORPartner downstream timeout. (Retriable)Retry the request later, as the error might be temporary due to partner-related issues.
ERROR_GENERALDeclined due to general reasons other than the specific decline error codes provided.Contact Fundiin support for assistance in identifying and resolving the general issue.