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

    Error Reference

    HTTP Status Codes#

    CodeMeaningWhen It Occurs
    200OKSuccessful request
    201CreatedResource created (registration)
    400Bad RequestValidation error, missing parameters, invalid data
    401UnauthorizedMissing/invalid/expired token, invalid credentials, invalid webhook signature
    403ForbiddenInsufficient OAuth scopes, sandbox not enabled
    404Not FoundResource not found
    409ConflictDuplicate event (webhook idempotency), email already registered
    500Internal Server ErrorUnexpected server error

    OAuth Errors (RFC 6749)#

    OAuth-related errors follow the RFC 6749 format:
    {
      "error": "invalid_grant",
      "error_description": "Authorization code expired"
    }

    Error Codes#

    Error CodeHTTP StatusDescriptionCommon Cause
    invalid_request400Missing or invalid parametersMissing client_id, redirect_uri, or grant_type
    invalid_grant401Invalid authorization code, expired code, or invalid refresh tokenCode used more than once, code expired (5-minute TTL), refresh token expired (30 days)
    invalid_client401Invalid client_id or client_secretWrong credentials, secret was regenerated
    access_denied403Merchant denied authorizationUser clicked "Deny" on the consent screen
    server_error500Internal server errorUnexpected server-side issue

    Handling OAuth Errors#

    Authorization callback errors — If the merchant denies consent or an error occurs during authorization, your redirect_uri receives error parameters:
    https://yourmarketplace.com/oauth/callback
      ?error=access_denied
      &error_description=User+denied+authorization
      &state=random_csrf_token_123
    Token exchange errors — Returned as JSON in the response body:
    {
      "error": "invalid_grant",
      "error_description": "Authorization code expired"
    }
    Token refresh errors — When a refresh token has expired:
    {
      "error": "invalid_grant",
      "error_description": "Refresh token expired"
    }
    When you receive invalid_grant on a refresh attempt, the merchant must re-authorize through the OAuth flow.

    API Errors#

    API endpoints return structured error responses with a consistent format:

    Simple Error#

    {
      "statusCode": 400,
      "message": "Validation failed",
      "error": "Bad Request"
    }

    Validation Error with Field Details#

    {
      "statusCode": 400,
      "message": [
        "salesPerformance.gmv30Days must not be less than 0",
        "revenueConsistency.revenueConcentration must not be greater than 100"
      ],
      "error": "Bad Request"
    }
    The message field can be either a string or an array of strings. When it is an array, each entry describes a specific field-level validation failure.

    Common API Error Scenarios#

    ScenarioStatusErrorMessage
    Missing Authorization header401UnauthorizedMissing or invalid token
    Expired access token401UnauthorizedToken expired
    Insufficient scope403ForbiddenInsufficient scope for this operation
    Invalid merchant ID404Not FoundMerchant not found
    Invalid loan ID404Not FoundLoan not found or does not belong to this marketplace
    Missing required field400Bad RequestField-specific validation message
    Invalid field value400Bad RequestField-specific validation message
    Bulk batch too large400Bad RequestMaximum 1000 merchants per batch
    Data timestamp too old400Bad RequestdataTimestamp must be within the last 30 days

    Webhook Errors#

    Inbound Webhook Errors (Your Webhooks to OpenSylo)#

    ScenarioStatusDescription
    Missing X-Marketplace-Signature header401Signature header is required
    Invalid HMAC signature401Signature does not match
    Timestamp outside 5-minute window401Timestamp too old or too far in the future
    Missing X-Marketplace-Id header401Marketplace ID header is required
    Unknown marketplace ID401Marketplace not found
    Duplicate X-Marketplace-Event-Id409Event already processed (idempotency)

    Outbound Webhook Failures (OpenSylo Webhooks to You)#

    When OpenSylo sends webhooks to your endpoint and receives a non-2xx response, it retries with exponential backoff:
    AttemptDelay
    1Immediate
    21 minute
    35 minutes
    430 minutes
    52 hours
    After 5 failed attempts, the webhook is marked as failed. Ensure your webhook endpoint:
    Returns a 2xx status code to acknowledge receipt
    Responds within 30 seconds
    Handles duplicate deliveries idempotently (check event_id)

    Error Handling Best Practices#

    1.
    Always check HTTP status codes before parsing response bodies. A 2xx status means success; anything else is an error.
    2.
    Handle token expiry gracefully. When you receive a 401 on an API call, attempt a token refresh. If the refresh also fails with invalid_grant, the merchant needs to re-authorize.
    3.
    Implement exponential backoff for retries on 500 errors. Do not retry 4xx errors (except 429 if rate-limited).
    4.
    Log correlation IDs. When submitting merchant data, include a correlationId so you can trace issues across systems.
    5.
    Validate webhook signatures before processing any inbound webhook payload. Reject requests with invalid signatures immediately.
    6.
    Handle array messages. The message field in API errors can be a string or an array of strings. Your error handling should accommodate both formats.
    Modified at 2026-01-29 23:21:00
    Previous
    Sandbox Testing
    Next
    Login to the marketplace dashboard
    Built with