1. OAuth 2.0
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
        GET
      • Exchange code or refresh token
        POST
      • Revoke a token
        POST
      • OAuth discovery / client metadata
        GET
    • 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 loan status
      • Validate deduction amounts
      • Bulk loan status check
    • Inbound Webhooks
      • Send repayment webhook
      • Send settlement webhook
  1. OAuth 2.0

Exchange code or refresh token

POST
/oauth/token
Exchange an authorization code for tokens (grant_type=authorization_code) or refresh an expired access token (grant_type=refresh_token). Access tokens are valid for 1 hour; refresh tokens for 30 days. Refresh tokens are NOT rotated.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Tokens issued
Bodyapplication/json

🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location '/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
    "grant_type": "authorization_code",
    "code": "auth_code_abc123",
    "client_id": "yourmarketplace_client_a1b2c3d4",
    "client_secret": "cs_secret_your_secret",
    "redirect_uri": "https://yourmarketplace.com/oauth/callback",
    "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}'
Response Response Example
200 - Success Example
{
    "access_token": "opaque_access_token",
    "token_type": "Bearer",
    "expires_in": 3600,
    "refresh_token": "opaque_refresh_token",
    "scope": "data.share.sales data.share.profile credit.score.read"
}
Modified at 2026-04-08 17:24:40
Previous
Start OAuth authorization
Next
Revoke a token
Built with