Installments
Build an EMI payment flow
Discover the EMI options available to your merchant account, calculate the full charge breakdown for an order amount, then ask Moneybag to show EMI options or preselect an approved EMI configuration at checkout. Eligibility and charge calculation remain Moneybag-owned decisions; do not maintain a local eligibility or fee table.
Integration sequence
- List available EMI options for your merchant account.
- Calculate eligible configurations and their full charge breakdown for the order amount.
- Create checkout from your trusted backend with the reviewed
payment_infofields, using the selected configuration and payment-service UUID. - Redirect to the exact hosted checkout URL returned by Moneybag.
- Treat the hosted checkout redirect as navigation only.
- Verify the resulting transaction before fulfillment.
Discover EMI options
/api/v2/payments/emi-optionsGet Available EMI Options
Get available EMI options for a specific merchant. This is a customer-facing API.
- Operation ID
get_emi_options_api_v2_payments_emi_options_get- Environment
https://sandbox.api.moneybag.com.bd(Moneybag sandbox)- Authentication
X-Merchant-API-Key— Sandbox merchant API key. Live keys are rejected.
Parameters
No path or query parameters.
Request body
No request body.
Sandbox example
Set the merchant key and replace resource identifiers with values created in your sandbox workspace.
curl --request GET "https://sandbox.api.moneybag.com.bd/api/v2/payments/emi-options" \
--header "X-Merchant-API-Key: $MONEYBAG_MERCHANT_KEY"Run this reviewed operation in the API Lab →
Responses
200 Successful Response
Content type: application/json. Schema: EMIOptionsResponse.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
data | EMIOptionsData | EMIOptionsData[] | null | No | — |
data<EMIOptionsData>.emi_options | EMIBankOption[] | No | — EMI options grouped by bank |
data<EMIOptionsData>.emi_options[].bank_name | string | When parent is present | — Bank/Provider name |
data<EMIOptionsData>.emi_options[].tenures | EMITenureOption[] | When parent is present | — Available tenure options |
data<EMIOptionsData>.emi_options[].tenures[].emi_configuration_id | string | When parent is present | — Unique identifier for the EMI configuration |
data<EMIOptionsData>.emi_options[].tenures[].interest_rate | string | When parent is present | — Interest rate percentage |
data<EMIOptionsData>.emi_options[].tenures[].tenure | string | When parent is present | — EMI tenure in months |
data<EMIOptionsData[]>[].emi_options | EMIBankOption[] | No | — EMI options grouped by bank |
data<EMIOptionsData[]>[].emi_options[].bank_name | string | When parent is present | — Bank/Provider name |
data<EMIOptionsData[]>[].emi_options[].tenures | EMITenureOption[] | When parent is present | — Available tenure options |
data<EMIOptionsData[]>[].emi_options[].tenures[].emi_configuration_id | string | When parent is present | — Unique identifier for the EMI configuration |
data<EMIOptionsData[]>[].emi_options[].tenures[].interest_rate | string | When parent is present | — Interest rate percentage |
data<EMIOptionsData[]>[].emi_options[].tenures[].tenure | string | When parent is present | — EMI tenure in months |
message | string | null | No | — |
meta | object | null | No | — |
success | boolean | Yes | — |
Calculate EMI amounts
Use emi_configuration_ids to restrict the response to specific configurations
returned by discovery, or omit it to receive every eligible configuration for
the order amount. emi_configuration_ids accepts the same emi_configuration_id
string returned per tenure by discovery above.
/api/v2/payments/emi-amountsCalculate EMI Options with Charges
Calculate available EMI options with complete charge breakdown for a given order amount. Optionally filter by specific EMI configuration IDs.
- Operation ID
calculate_emi_amounts_api_v2_payments_emi_amounts_post- Environment
https://sandbox.api.moneybag.com.bd(Moneybag sandbox)- Authentication
X-Merchant-API-Key— Sandbox merchant API key. Live keys are rejected.
Parameters
No path or query parameters.
Request body
Required application/json body using EMICalculateRequest.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
emi_configuration_ids | string[] | null | No | — Optional list of EMI configuration IDs to filter. If provided, only these configurations will be returned. If not provided, all eligible configurations will be returned. |
order_amount | number | string | Yes | pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ Order amount to calculate EMI for |
Sandbox example
Set the merchant key and replace resource identifiers with values created in your sandbox workspace.
curl --request POST "https://sandbox.api.moneybag.com.bd/api/v2/payments/emi-amounts" \
--header "X-Merchant-API-Key: $MONEYBAG_MERCHANT_KEY" \
--header "Content-Type: application/json" \
--data '{
"emi_configuration_ids": [
"emif336d0bcb841465b8045024475c079dd"
],
"order_amount": "12000.00"
}'Run this reviewed operation in the API Lab →
Responses
200 Successful Response
Content type: application/json. Schema: EMICalculateResponse.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
data | EMICalculateData | EMICalculateData[] | null | No | — |
data<EMICalculateData>.emi_payment_options | object[] | When parent is present | — List of EMI payment options with payment options (transformed format) |
data<EMICalculateData>.merchant_bleeding | boolean | When parent is present | — Whether merchant pays service charges |
data<EMICalculateData>.order_amount | string | When parent is present | — Order amount requested |
data<EMICalculateData[]>[].emi_payment_options | object[] | When parent is present | — List of EMI payment options with payment options (transformed format) |
data<EMICalculateData[]>[].merchant_bleeding | boolean | When parent is present | — Whether merchant pays service charges |
data<EMICalculateData[]>[].order_amount | string | When parent is present | — Order amount requested |
message | string | null | No | — |
meta | object | null | No | — |
success | boolean | Yes | — |
422 Validation Error
Content type: application/json. Schema: HTTPValidationError.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string | integer[] | When parent is present | — |
detail[].msg | string | When parent is present | — |
detail[].type | string | When parent is present | — |
Each returned emi_payment_options entry is an object whose exact keys are not
individually declared in the reviewed contract. Read only the fields you need
for display and forwarding; do not hard-code an assumed key set or recompute a
charge from partial fields.
Select EMI at checkout
/api/v2/payments/checkoutSubmit the configuration and payment-service identifiers returned by the discovery and calculation operations above.
{
"payment_info": {
"requires_emi": true,
"emi_configuration_id": "APPROVED_CONFIGURATION_ID",
"emi_payment_id": "PUBLIC_PAYMENT_SERVICE_UUID"
}
}
emi_configuration_id is one selected string. emi_payment_id accepts the
public payment-service UUID and is the reviewed checkout field; do not substitute
the old guide's payment_service_id field.
Never calculate installment fees, settlement amounts, or eligibility locally — use the discovery and calculation operations above instead. Persist only the identifiers and authoritative checkout/verification data your order needs. Do not store card credentials or sensitive authentication data.