Skip to main content

API Overview

Base URL

KingsPay provides two API environments for merchants:

EnvironmentBase URL
Productionhttps://merchant-api.kingspay.id
Sandboxhttps://sandbox-merchant-api.kingspay.id/

All API endpoints follow the format: {baseUrl}/api/v1/{resource}/{action}

Authentication

API authentication details will be provided by KingsPay to registered merchants. Typically, requests require headers such as Authorization (Bearer token or API Key) and Content-Type: application/json.

Request & Response Format

  • Content-Type: application/json
  • Response: All responses return JSON with the structure:
    • status (boolean): Request success status
    • message (string): Descriptive message
    • logId (string): Unique ID for tracking/debugging
    • data (object, optional): Response data (only on success)

HTTP Status Codes

CodeDescription
200Request processed successfully
400Bad Request — Validation failed or invalid parameters
401Unauthorized — Authentication failed
404Not Found — Resource not found
500Internal Server Error — Server error