Api key provided on integrations tab in Easyflow platform.
Get installment options
Retrieves available installment options based on the business and the amount to be paid. This is an authenticated route.
Each option brings the fees that the buyer pays and the interest of that number of installments. A fee paid by the buyer is a fixed value in cents plus a percentage of the amount, and the fixed value is added to the total: a fee of 99 cents plus 2% on 5000 adds 199 to totalBuyerPaymentTaxValueInCents. The interest is calculated on orderValueInCents, which already includes these fees.
The values of the example are illustrative. They assume an amountToBePaidInCents of 5000 and a business with a fee paid by the buyer of 99 cents plus 2% in every option, so orderValueInCents is 5199.
Headers
x-api-keystringrequiredx-api-secretstringrequiredApi Secret provided on integrations tab in Easyflow platform.
business-idstringrequiredIdentifier of the business the request refers to. The user of your API key must be linked to this business, as explained in The business identifier. A value that is not a business identifier returns
400withInvalid param: [businessId], a business that the user is not linked to returns403, and a request that also sendsx-business-idwith a different value returns401.
Query parameters
amountToBePaidInCentsintegerrequiredAmount to be paid in cents, without interest and without the fees paid by the buyer. It must be greater than zero.
itemsarray of objectsOptional cart items, sent as
items[0][offerItemId]=...&items[0][valueInCents]=.... When sent, the list cannot be empty and every item needsofferItemId(a valid id) andvalueInCents(greater than zero).
Responses
200Installment options successfully retrieved.
Installment options successfully retrieved.
Content typeapplication/jsonobject
statusCodeintegerdataobjectShow child attributesHide child attributes
optionsarray of objectsShow child attributesHide child attributes
installmentsintegerNumber of installments of the option.
parcelValueInCentsintegerValue of each installment, in cents. It is
totalValueInCentsdivided byinstallments, rounded to the nearest cent.totalInterestInCentsintegerInterest that the buyer pays with this number of installments, in cents.
totalValueInCentsintegerTotal that the buyer pays with this number of installments, in cents. It is
orderValueInCentsplustotalInterestInCentsand, when the business passes part of its own fees on to the buyer, that part.orderValueInCentsintegerValue on which the interest is calculated, in cents. It is
amountToBePaidInCentsplus the fees of the order that the buyer pays,totalBuyerPaymentTaxValueInCentsincluded.totalBuyerPaymentTaxValueInCentsintegerSum of the fees of the business that the buyer pays with this number of installments, in cents. Each fee is a fixed value in cents plus a percentage of the amount, and the fixed value is added to the total. It is
0when the buyer pays no fee.
400If the provided parameter is invalid, the API will return the following error response:
If the provided parameter is invalid, the API will return the following error response:
Content typeapplication/jsonobject
messagestringInvalid param: []
errorstringBad Request
statusCodeinteger400
errorCodestringCode that identifies the error. Present only on some errors.
401If the request is unauthorized, the API will return the following error response:
If the request is unauthorized, the API will return the following error response:
Content typeapplication/jsonobject
messagestringInvalid field
errorstringUnauthorized
statusCodeinteger401
403If the request is forbidden, the API will return the following error response:
If the request is forbidden, the API will return the following error response:
Content typeapplication/jsonobject
messagestringForbidden resource
errorstringForbidden
statusCodeinteger403
500If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
If an unexpected condition occurs and the server cannot process the request, the API will return the following error response. This response has no error field.
Content typeapplication/jsonobject
statusCodeintegerHTTP status code.
messagestringExplanation of the error.