Project

Our API project is designed to serve as an integrated platform for grouping merchant businesses within our application. By centralizing various merchant operations, this robust API allows for streamlined management, enhanced data analytics, and optimized user experience, all while simplifying administrative tasks for the merchants. The objective is to create a cohesive ecosystem that benefits both the merchants and end-users.


GET{{HOST}}/balance

Check Balance

This is especially true when there's no message body to include. Hashing only the Project Key ensures a level of authentication between the client and the server.

# Signature 98Pays Check Balance For PHP Code
$xSignature =  hash_hmac('sha512',  $ClientKey, $ClientToken)

Allows Merchants to check the project's balance from the 98Pays API

Check Balance

GET
{{HOST}}/balance
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => '{{HOST}}/balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
    'X-Client-Key: ',
    'X-Client-Token: ',
    'X-Signature: '
    ),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

Response Check Balance

POST
{{HOST}}/balance
{
    "responseCode": 200,
    "responseMessage": "success",
    "responseData": {
        "active": 1000000,
        "pending": 10000,
        "total": 1010000
    }
}

GET{{HOST}}/v1/projects

List Active Projects

Returns all active projects owned by the merchant associated with the authenticated project. This endpoint is used to map projectId and projectName between systems.

  • Name
    projectId
    Type
    integer
    Description

    Unique project identifier used by reconciliation report filters.

  • Name
    projectName
    Type
    string
    Description

    Project name registered in 98Pays.

  • Name
    status
    Type
    string
    Description

    Project status. Only projects with the ACTIVE status are returned.

List Active Projects

GET
{{HOST}}/v1/projects
curl --request GET '{{HOST}}/v1/projects' \
  --header 'X-Client-Key: &lt;PROJECT_KEY&gt;' \
  --header 'X-Client-Token: &lt;PROJECT_TOKEN&gt;' \
  --header 'X-Signature: &lt;HMAC_SHA512_SIGNATURE&gt;'

Response

200
application/json
{
  "code": "OK",
  "message": "Project list retrieved successfully.",
  "data": [
    {
      "projectId": 13,
      "projectName": "QA Testing Project 1",
      "status": "ACTIVE"
    },
    {
      "projectId": 14,
      "projectName": "Production Project Utama",
      "status": "ACTIVE"
    }
  ]
}

Was this page helpful?