{"openapi":"3.1.0","info":{"title":"Layaway Math API","version":"0.1.0","description":"An installment/BNPL cost calculator: a genuinely computed actuarial effective-APR solver, installment scheduling, credit-card and pay-in-full comparisons, late-fee impact maths, an affordability heuristic, and a glossary. Every figure is computed from what you provide.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://layawaymath.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/layawaymath/docs"},"termsOfService":"https://connectorbay.com/layawaymath/terms"},"servers":[{"url":"https://layawaymath.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/layawaymath/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/bnpl_total_cost":{"post":{"operationId":"bnpl_total_cost","summary":"Computes the total paid, the finance charge, and the effective APR (via the actuarial present-value","description":"Computes the total paid, the finance charge, and the effective APR (via the actuarial present-value\n    method) for an arbitrary installment/BNPL payment schedule. Use for \"what's the real APR on a $300 item paid\n    in 4 biweekly installments of $75 each\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"description":"The item's price.","examples":[300],"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"payments":{"description":"Each payment: {amount, days_from_purchase}.","examples":[[{"amount":75,"days_from_purchase":0},{"amount":75,"days_from_purchase":14},{"amount":75,"days_from_purchase":28},{"amount":75,"days_from_purchase":42}]],"items":{"additionalProperties":true,"type":"object"},"maxItems":60,"minItems":1,"title":"Payments","type":"array"}},"required":["purchase_price","payments"],"title":"bnpl_total_costArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/pay_in_4_calculator":{"post":{"operationId":"pay_in_4_calculator","summary":"A convenience calculator for the common 'pay in 4' (or similar equal-installment) BNPL structure: computes","description":"A convenience calculator for the common 'pay in 4' (or similar equal-installment) BNPL structure: computes\n    the schedule, total cost, and effective APR from just the price, installment count, frequency, and any fee.\n    Use for \"pay in 4 on a $200 purchase with a $5 fee, what's the APR\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"description":"The item's price.","examples":[200],"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"num_installments":{"default":4,"description":"Number of equal installments.","maximum":12,"minimum":2,"title":"Num Installments","type":"integer"},"frequency_days":{"default":14,"description":"Days between installments.","maximum":90,"minimum":1,"title":"Frequency Days","type":"integer"},"fees":{"default":0.0,"description":"Any flat fee added to the total.","minimum":0,"title":"Fees","type":"number"},"first_payment_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"YYYY-MM-DD; defaults to today.","title":"First Payment Date"}},"required":["purchase_price"],"title":"pay_in_4_calculatorArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/installment_schedule":{"post":{"operationId":"installment_schedule","summary":"Computes the exact due date and amount for each installment of a plan. Use for \"give me the payment","description":"Computes the exact due date and amount for each installment of a plan. Use for \"give me the payment\n    schedule for a $600 purchase in 6 monthly installments starting October 1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"num_installments":{"maximum":60,"minimum":1,"title":"Num Installments","type":"integer"},"first_payment_date":{"description":"YYYY-MM-DD.","title":"First Payment Date","type":"string"},"frequency_days":{"default":30,"maximum":90,"minimum":1,"title":"Frequency Days","type":"integer"},"fees":{"default":0.0,"minimum":0,"title":"Fees","type":"number"}},"required":["purchase_price","num_installments","first_payment_date"],"title":"installment_scheduleArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/compare_to_credit_card":{"post":{"operationId":"compare_to_credit_card","summary":"Computes the interest cost of instead paying with a credit card at its APR over a stated payoff period","description":"Computes the interest cost of instead paying with a credit card at its APR over a stated payoff period\n    (equal monthly payments, no new charges), and says which option — the BNPL plan or the card — is cheaper.\n    Use for \"is a 24.99% APR card over 6 months cheaper than this BNPL plan's $15 fee\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"bnpl_finance_charge":{"description":"The BNPL plan's total finance charge (fees/interest above the price).","minimum":0,"title":"Bnpl Finance Charge","type":"number"},"card_apr_pct":{"description":"The credit card's annual interest rate.","examples":[24.99],"maximum":100,"minimum":0,"title":"Card Apr Pct","type":"number"},"months_to_payoff":{"description":"How many months you'd take to pay off the card.","maximum":120,"minimum":1,"title":"Months To Payoff","type":"integer"}},"required":["purchase_price","bnpl_finance_charge","card_apr_pct","months_to_payoff"],"title":"compare_to_credit_cardArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/compare_to_pay_in_full":{"post":{"operationId":"compare_to_pay_in_full","summary":"Shows exactly what a BNPL plan costs on top of simply paying the full price up front. Use for \"how much","description":"Shows exactly what a BNPL plan costs on top of simply paying the full price up front. Use for \"how much\n    extra am I paying by using BNPL instead of paying in full\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"bnpl_total_paid":{"description":"The total you'd pay across the full BNPL plan.","minimum":0,"title":"Bnpl Total Paid","type":"number"}},"required":["purchase_price","bnpl_total_paid"],"title":"compare_to_pay_in_fullArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/late_fee_impact":{"post":{"operationId":"late_fee_impact","summary":"Computes the added cost of one or more missed/late installment payments. Use for \"what happens if I miss","description":"Computes the added cost of one or more missed/late installment payments. Use for \"what happens if I miss\n    two $50 payments with a $10 late fee each\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"installment_amount":{"exclusiveMinimum":0,"title":"Installment Amount","type":"number"},"late_fee":{"minimum":0,"title":"Late Fee","type":"number"},"number_of_late_payments":{"maximum":60,"minimum":1,"title":"Number Of Late Payments","type":"integer"}},"required":["installment_amount","late_fee","number_of_late_payments"],"title":"late_fee_impactArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/total_cost_of_credit":{"post":{"operationId":"total_cost_of_credit","summary":"The simple finance-charge computation: total of all payments minus the original price, and that charge as","description":"The simple finance-charge computation: total of all payments minus the original price, and that charge as\n    a percentage of the price. Use for \"if I pay $330 total for a $300 item, what's the finance charge\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purchase_price":{"exclusiveMinimum":0,"title":"Purchase Price","type":"number"},"total_of_payments":{"minimum":0,"title":"Total Of Payments","type":"number"}},"required":["purchase_price","total_of_payments"],"title":"total_cost_of_creditArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/affordability_check":{"post":{"operationId":"affordability_check","summary":"Computes what share of monthly income your installment obligations would take up including a new one,","description":"Computes what share of monthly income your installment obligations would take up including a new one,\n    banded against common budgeting rules of thumb — general education, not personalized financial advice. Use\n    for \"can I afford another $60 a month installment on my income\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"monthly_income":{"description":"Your gross or net monthly income (be consistent).","exclusiveMinimum":0,"title":"Monthly Income","type":"number"},"existing_installment_obligations":{"description":"Total of other recurring installment/debt payments per month.","minimum":0,"title":"Existing Installment Obligations","type":"number"},"new_installment_amount":{"description":"The new installment payment per month you're considering.","minimum":0,"title":"New Installment Amount","type":"number"}},"required":["monthly_income","existing_installment_obligations","new_installment_amount"],"title":"affordability_checkArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/bnpl_glossary":{"post":{"operationId":"bnpl_glossary","summary":"Defines BNPL/installment terms — effective APR, finance charge, deferred interest, hard credit check,","description":"Defines BNPL/installment terms — effective APR, finance charge, deferred interest, hard credit check,\n    autopay. Use for \"what's deferred interest\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific term to look up; omit to list all.","title":"Term"}},"title":"bnpl_glossaryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/bnpl_red_flags":{"post":{"operationId":"bnpl_red_flags","summary":"Common ways BNPL plans go wrong: stacking multiple plans, autopay overdrafts, deferred-interest traps, and","description":"Common ways BNPL plans go wrong: stacking multiple plans, autopay overdrafts, deferred-interest traps, and\n    more. Use for \"what should I watch out for with buy now pay later\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"bnpl_red_flagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}