OpenSylo Marketplace API
    OpenSylo Marketplace API
    • Introduction
    • Getting Started
    • OAuth 2.0 Flow
    • Webhook Integration
    • Sandbox Testing
    • Error Reference
    • Marketplace Dashboard
      • Login to the marketplace dashboard
        POST
      • View OAuth credentials
        GET
      • Regenerate client secret
        POST
    • OAuth 2.0
      • Start OAuth authorization
        GET
      • Exchange code or refresh token
        POST
      • Revoke a token
        POST
      • OAuth discovery / client metadata
        GET
    • Data Ingestion
      • Submit single merchant data
        POST
      • Submit bulk merchant data
        POST
      • Get merchant credit score
        GET
      • Integration health check
        GET
    • 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
        POST
      • Send settlement webhook
        POST
    • Sandbox
      • Sandbox environment info
        GET
      • Get sandbox test credentials
        GET
      • Get sandbox test merchants
        GET
    • Schemas
      • DashboardLoginRequest
      • DashboardLoginResponse
      • CredentialsResponse
      • RegenerateSecretResponse
      • TokenRequest
      • TokenResponse
      • RevokeRequest
      • ClientMetadataResponse
      • MerchantIdentity
      • SalesPerformance
      • RevenueConsistency
      • FulfillmentMetrics
      • PayoutCashFlow
      • PlatformDependency
      • HistoricalCredit
      • BehavioralRisk
      • MerchantDataRequest
      • ScoreBreakdown
      • CreditScore
      • MerchantDataResponse
      • BulkMerchantDataRequest
      • BulkMerchantDataResponse
      • CreditScoreResponse
      • HealthResponse
      • ActiveLoansResponse
      • LoanStatusResponse
      • ValidateDeductionsRequest
      • ValidateDeductionsResponse
      • BulkLoanStatusRequest
      • BulkLoanStatusResponse
      • RepaymentWebhookRequest
      • SettlementWebhookRequest
      • WebhookAckResponse
      • SandboxInfoResponse
      • SandboxCredentialsResponse
      • SandboxMerchantsResponse
      • OAuthError
      • ApiError

    Webhook Integration

    OpenSylo supports both inbound webhooks (marketplace to OpenSylo) and outbound webhooks (OpenSylo to marketplace).

    Inbound Webhooks (Marketplace to OpenSylo)#

    Your marketplace sends webhooks to OpenSylo to report repayment deductions and settlement events.

    Endpoints#

    EndpointPurpose
    POST /api/v1/webhooks/marketplace/repaymentRepayment events (deducted, failed, reversed)
    POST /api/v1/webhooks/marketplace/settlementSettlement events (created, transferred)

    Required Headers#

    HeaderRequiredDescription
    X-Marketplace-SignatureYesHMAC-SHA256 signature of the payload
    X-Marketplace-TimestampYesUnix timestamp (seconds) of when the webhook was sent
    X-Marketplace-IdYesYour marketplace ID
    X-Marketplace-Event-IdNoUnique idempotency key for the event

    Signature Generation#

    Generate the signature using HMAC-SHA256:
    payload = "<timestamp>.<JSON_body>"
    signature = "sha256=" + HMAC-SHA256(your_api_secret, payload)
    TypeScript implementation:
    Bash implementation:
    Timestamp tolerance: The timestamp must be within 5 minutes (300 seconds) of the current server time.

    Inbound Event Types#

    EventDescription
    repayment.deductedA repayment was successfully deducted from a merchant's sale/settlement
    repayment.failedA repayment deduction attempt failed
    repayment.reversedA previously deducted repayment was reversed
    settlement.createdA settlement batch was created containing repayment deductions
    settlement.transferredA settlement was transferred via bank transfer

    Example — repayment.deducted#

    {
      "event": "repayment.deducted",
      "event_id": "evt_rep_001",
      "timestamp": "2026-01-29T10:30:00.000Z",
      "marketplace": {
        "id": "marketplace_uuid",
        "name": "Your Marketplace"
      },
      "merchant": {
        "marketplace_id": "your_internal_merchant_id",
        "opensylo_id": "opensylo_merchant_uuid"
      },
      "loan": {
        "opensylo_id": "loan_uuid",
        "opensylo_reference": "LOAN-2026-001"
      },
      "deduction": {
        "reference": "deduct_ref_001",
        "amount": 5000,
        "currency": "NGN",
        "deducted_at": "2026-01-29T10:30:00.000Z"
      },
      "source_transaction": {
        "id": "order_123",
        "type": "sale",
        "gross_amount": 25000,
        "timestamp": "2026-01-29T10:25:00.000Z"
      },
      "loan_balance": {
        "total_due": 100000,
        "total_paid": 55000,
        "outstanding": 45000
      }
    }

    Webhook Response#

    OpenSylo responds with an acknowledgment:
    {
      "status": "received",
      "event_id": "evt_rep_001",
      "opensylo_reference": "txn_uuid",
      "received_at": "2026-01-29T10:30:01.000Z"
    }

    Outbound Webhooks (OpenSylo to Marketplace)#

    OpenSylo sends webhooks to your configured webhook URL to notify you of loan lifecycle events.

    Verification#

    When receiving a webhook from OpenSylo, verify the signature using the same HMAC-SHA256 method described above, but using OpenSylo's webhook secret (provided during marketplace setup).

    Outbound Event Types#

    EventDescription
    loan.approvedA loan has been approved for one of your merchants. Includes loan terms, repayment terms, and optional repayment schedule.
    loan.disbursedLoan funds have been disbursed to the merchant. Includes disbursement details and repayment start date. Start deducting repayments.
    loan.repayment_updatedRepayment terms have changed (deduction percentage, due date). Update your deduction logic.
    loan.nearly_completeLoan is close to full repayment (>90% paid). Includes max_deduction_amount — cap the next deduction to avoid overpayment.
    loan.completedLoan is fully repaid. Stop all deductions immediately.
    loan.defaultedLoan has defaulted. Includes collection_instructions with priority level.

    Example — loan.approved#

    {
      "event": "loan.approved",
      "event_id": "evt_loan_001",
      "timestamp": "2026-01-29T14:00:00.000Z",
      "loan": {
        "id": "loan_uuid",
        "reference": "LOAN-2026-001",
        "status": "APPROVED"
      },
      "merchant": {
        "opensylo_id": "merchant_uuid",
        "marketplace_id": "your_internal_merchant_id"
      },
      "lender": {
        "id": "lender_uuid",
        "name": "FinCo Lending"
      },
      "terms": {
        "principal_amount": 500000,
        "interest_rate": 5.0,
        "tenor_days": 90,
        "total_repayment": 525000,
        "currency": "NGN"
      },
      "repayment": {
        "method": "sales_deduction",
        "deduction_percentage": 10,
        "minimum_deduction": 500,
        "start_date": "2026-02-01T00:00:00.000Z",
        "due_date": "2026-05-01T00:00:00.000Z"
      },
      "schedule": [
        { "installment": 1, "due_date": "2026-02-01", "amount": 175000 },
        { "installment": 2, "due_date": "2026-03-01", "amount": 175000 },
        { "installment": 3, "due_date": "2026-04-01", "amount": 175000 }
      ]
    }

    Example — loan.completed#

    {
      "event": "loan.completed",
      "event_id": "evt_loan_005",
      "timestamp": "2026-04-15T09:00:00.000Z",
      "loan": {
        "id": "loan_uuid",
        "reference": "LOAN-2026-001",
        "status": "REPAID"
      },
      "merchant": {
        "opensylo_id": "merchant_uuid",
        "marketplace_id": "your_internal_merchant_id"
      },
      "summary": {
        "principal_repaid": 500000,
        "interest_repaid": 25000,
        "total_repaid": 525000,
        "total_deductions": 42,
        "first_deduction_at": "2026-02-01T10:00:00.000Z",
        "final_deduction_at": "2026-04-15T08:55:00.000Z",
        "completed_at": "2026-04-15T09:00:00.000Z"
      },
      "action_required": "stop_deductions",
      "message": "Loan fully repaid. Stop all deductions for this loan immediately."
    }

    Retry Policy#

    OpenSylo retries failed webhook deliveries with exponential backoff:
    AttemptDelay
    1Immediate
    21 minute
    35 minutes
    430 minutes
    52 hours
    After 5 failed attempts, the webhook is marked as failed. Your webhook endpoint should return a 2xx status code to acknowledge receipt.

    Webhook Headers Reference#

    HeaderDirectionDescription
    X-Marketplace-SignatureInbound (you to OpenSylo)sha256= + HMAC-SHA256 hex digest
    X-Marketplace-TimestampInbound (you to OpenSylo)Unix timestamp in seconds
    X-Marketplace-IdInbound (you to OpenSylo)Your marketplace UUID
    X-Marketplace-Event-IdInbound (you to OpenSylo)Idempotency key (optional)

    Signature Formula#

    payload = "<unix_timestamp>.<JSON.stringify(body)>"
    signature = "sha256=" + HMAC_SHA256(api_secret, payload).hexdigest()
    Modified at 2026-01-29 23:21:00
    Previous
    OAuth 2.0 Flow
    Next
    Sandbox Testing
    Built with