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.


POST{{HOST}}/projects

Create Project

Allows Merchants to create new project from the SenGo

  • Name
    name
    Type
    mandatory
    Description

    The name or identifier of the project can be filled with letters and numbers.

  • Name
    domain
    Type
    mandatory
    Description

    A unique website address of the project by the merchant.

  • Name
    ip
    Type
    mandatory
    Description

    The IP address that will be able to access the engine.

Create Project

POST
{{HOST}}/projects
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{HOST}}/projects',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
    "name": "Project SenGo",
    "domain": "https://sengo.id",
    "ip": [
        "0.0.0.0/0"
    ]
}',
CURLOPT_HTTPHEADER => array(
    'X-Client-Key: ',
    'X-Client-Token: ',
    'X-Signature: '
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response Create Project

Response Create Project

POST
{{HOST}}/projects
{
    "responseCode": 200,
    "responseMessage": "success",
        "responseData": {
        "id": 1,
        "name": "SenGo",
        "domain": "https://sengo.id",
        "ip": [
            "0.0.0.0/0"
        ],
        "status": "Review"
    }
}

Response Parameters

ParameterDescription
responseCodeThe HTTP response code indicating the status of the request. See the Error Codes section for details.
responseMessageA descriptive message indicating the status of the request.
responseDataAn object containing the data related to the transaction response.
responseData.idSenGo unique identifier for the transaction.
responseData.nameThe name of the merchant's project.
responseData.domainThe total balance of the merchant's project.
responseData.ipThe whitelisted IP addresses have permission to access the engine.
responseData.statusThe status of the created project.

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 SenGo Check Balance For PHP Code
$codesignature = hash_hmac('sha512',  $key, $token)

Allows Merchants to check the project's balance from the SenGo 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 Create Project

Response Check Balance

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

Was this page helpful?