1. Loan API
marketplace-doc
  • Data Ingestion
  • Errors
  • Introduction
  • Loan API & Deduction Lifecycle
  • Getting Started
  • OAuth
  • Webhooks
  • Embedded Journey
  • OpenSylo Marketplace Integration API
    • OAuth 2.0
      • Start OAuth authorization
      • Exchange authorization code or refresh token
      • Revoke a token
      • Discover OAuth capabilities
    • Data Ingestion
      • Submit single merchant data
      • Submit bulk merchant data
      • Poll batch processing status
      • Get merchant credit score
      • Data ingestion health check
    • Sales & Events
      • Submit a sales event
      • Submit a repayment event
      • Submit an account flag
    • Loan API
      • Get active loans for a merchant
      • Get loan status
      • Validate deduction amounts
      • Bulk loan status
    • Inbound Webhooks
      • Repayment events
      • Settlement events
    • Outbound Webhooks
      • loan.approved
      • loan.disbursed
      • loan.repayment_updated
      • loan.nearly_complete
      • loan.completed
      • loan.defaulted
      • merchant.created
      • kyc.submitted
      • kyc.approved
      • kyc.rejected
      • funding_request.created
      • funding_request.fulfilled
      • funding_request.rejected
    • Embedded Journey (Marketplace API)
      • Create (or fetch) a merchant
      • Get merchant status (KYC, credit score, funding requests)
      • Update business KYC information
      • Add directors (bulk)
      • Attach a KYC document
      • Submit KYC for review
      • Submit sales data for credit scoring
      • Create a funding request
      • Mint an embed token for the hosted journey
  • OpenSylo Marketplace API
    • OAuth 2.0
      • Start OAuth authorization
      • Exchange code or refresh token
      • Revoke a token
      • OAuth discovery / client metadata
    • Data Ingestion
      • Submit single merchant data
      • Submit bulk merchant data
      • Get merchant credit score
      • Integration health check
    • Loan API
      • Get active loans for a merchant
        GET
      • Get loan status
        GET
      • Validate deduction amounts
        POST
      • Bulk loan status check
        POST
    • Inbound Webhooks
      • Send repayment webhook
      • Send settlement webhook
  1. Loan API

Validate deduction amounts

POST
/api/v1/marketplace/loans/deductions/validate
Before applying deductions to a merchant's sale, call this endpoint to calculate the correct deduction amounts across all active loans. The validation result is valid for 15 minutes.
Required scope: repayment.report

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Deduction validation result
Bodyapplication/json

🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/marketplace/loans/deductions/validate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "merchant_id": "your_merchant_id",
    "merchant_id_type": "marketplace",
    "sale_amount": 50000
}'
Response Response Example
200 - Success Example
{
    "merchant": {
        "opensylo_id": "merchant_uuid",
        "marketplace_id": "your_merchant_id",
        "name": "Yakoyo Foods Ltd"
    },
    "sale_amount": 50000,
    "should_deduct": true,
    "deductions": [
        {
            "loan_id": "loan_uuid",
            "reference": "LOAN-2026-001",
            "status": "DISBURSED",
            "deduction_percentage": 10,
            "calculated_amount": 5000,
            "outstanding_balance": 325000,
            "capped_amount": 5000
        }
    ],
    "summary": {
        "total_deduction": 5000,
        "merchant_receives": 45000,
        "loans_count": 1
    },
    "valid_until": "2026-01-29T12:15:00.000Z",
    "timestamp": "2026-01-29T12:00:00.000Z"
}
Modified at 2026-04-08 17:24:40
Previous
Get loan status
Next
Bulk loan status check
Built with