Installments API
Use Case
API này sẽ được sử dụng để trả về các gói trả góp có sẵn cho người dùng.
Request
POST/v2/installments/packages
| Parameter | Type | Required | Description |
|---|---|---|---|
| merchantId | Fundiin cung cấp MID như một định danh duy nhất cho mỗi đối tác. | ||
| lang | Ngôn ngữ của message (vi or en) | ||
| amount.value | Số tiền giao dịch | ||
| amount.currency | VND | ||
| firstInstallmentPercent | % Số tiền người dùng phải trả trước cho một giao dịch trả góp, mặc định lấy giá trị thấp nhất | ||
| description | Mô tả cho đơn đặt hàng. | ||
| items | Items |
Data of each items
| Attribute | Type | Required | Description |
|---|---|---|---|
| productId | The Id of item. | ||
| productName | The name of item. | ||
| description | The description of item. | ||
| category | The type of item. | ||
| currency | VND | ||
| quantity | Quantity number of each item. It must be greater than 0 | ||
| price | Price of single unit item | ||
| totalAmount | price x quantity | ||
| imageUrl | Link 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| merchantId | Fundiin cung cấp MID như một định danh duy nhất cho mỗi đối tác | ||
| responseTime | Ngày & Giờ của phản hồi: Format: YYYY-MM-DD hh:mm:ss | ||
| firstInstallmentPercent | % Số tiền người dùng phải trả trước cho một giao dịch trả góp | ||
| firstInstallments | Danh sách thông tin các gói trả góp | ||
| installmentPacks | Xác định các gói trả góp hiện tại được cung cấp trong trường "firstInstallmentPercent". | ||
| resultStatus | Trạng thái kết quả | ||
| resultMsg | Chi tiết kế quả |
Data of installmentPacks
| Attribute | Type | Required | Description |
|---|---|---|---|
| packageId | Id của gói trả góp. | ||
| packageType | Các loại gói trả góp: 30_days,3_months, 6_months, 9_months, 12_months | ||
| firstInstallmentPercent | % Số tiền người dùng phải trả trước cho một giao dịch trả góp | ||
| firstInstallmentAmount | Số tiền người dùng phải trả trước cho một giao dịch trả góp ứng với tỷ lệ phần trăm trả trước | ||
| subSeqInstallmentAmount | Các số tiền sau đó mà khách hàng phải trả cho từng kì | ||
| interestRate | Tỷ lệ phần trăm bị tính phí | ||
| totalAmountDue | Tổng tiền đã bao gồm phí dịch vụ | ||
| tenure | Số kỳ cần thanh toán | ||
| installmentFee | Phí dịch vụ cho toàn bộ đơn hàng ứng với số tiền cần trả trước |
{
"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
}
]
}
Demo
Số tiền thanh toán : 1.000.000 đ
Vui Lòng Chọn Số Tiền Muốn Trả Trước:
300.000 ₫
Kỳ hạn | Phí dịch vụ | Góp mỗi tháng | Tổng cộng | |
|---|---|---|---|---|
| 6 Tháng | 35.000 ₫ | 123.000 ₫ | 1.073.000 ₫ | |
| 9 Tháng | 35.000 ₫ | 82.000 ₫ | 1.073.000 ₫ | |
| 12 Tháng | 35.000 ₫ | 62.000 ₫ | 1.079.000 ₫ |
Result Status & Messages
| Status code | Description | Action to take |
|---|---|---|
| APPROVED | The transaction was successfully initial. | |
| ACCESS_DENIED | Access denied. | Please check your settings in merchant portal, or contact Fundiin for configurations. |
| INVALID_REQUEST | Invalid request. e.g. Invalid currency, invalid amout etc. | |
| INVALID_FIRST_INSTALLMENT_PERCENT | The first installment percent is invalid | Please retry with a correct firstInstallmentPercent. |
| INVALID_CLIENT_ID | The cliendId is not registered | |
| INVALID_SIGNATURE | The signature is invalid. | |
| INVALID_MERCHANT_ID | The merchant is not registered. | |
| INVALID_HTTP_METHOD | The server does not implement the requested HTTPS method. | |
| INVALID_API | API is not defined. | Check whether the request URL is correct. Ensure that the endpoint of the called API is correct. |
| INVALID_AMOUNT | Payment amount is invalid. | |
| AMOUNT_EXCEEDED_UPPER_LIMIT | The payment amount exceeds the limit at merchant level or account level | |
| AMOUNT_BELOW_MINIMUM_LIMIT | The payment amount is below minimun limit. | |
| REQUEST_PROCESSING | The request already processed or in progress | |
| DOWNSTREAM_ERROR | Partner downstream timeout. (Retriable) | |
| ERROR_GENERAL | Declined due to general reasons other than the specific decline error codes provided. | |
| INSTALLMENT_UNAVAILABLE | The installment package information is invalid. |