Developer

Endpoints
The endpoints are organised to reflect the integration flow: check wallet balance, transfer money.

1. Check Wallet Balance
Endpoint: POST https://1stcurrency.org/v1/balance

Description: Retrieves the current wallet balance of the authenticated user.

Authentication: Required (API Key. SignIn to generate API Key).

Parameters Type Required Description
apiKey integer Required 16 digits access key
accountNo integer Required account number
password integer Required account password


Sample Request: PHP Curl

$post_data['apiKey'] = "7543192815834900";
$post_data['accountNo'] = "0713989814";
$post_data['password'] = "0000";
//traverse array and prepare data for posting (key1=value1)
foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; }
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection = curl_init('https://1stcurrency.org/v1/balance');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_POST, true); // Use POST method
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
echo $result;
//close the connection
curl_close($curl_connection);
//decode json result $decoded_data = json_decode($result, true);
// Accessing a simple nested value
$status = $decoded_data['status'];
$balance = $decoded_data['balance'];
$symbol = $decoded_data['symbol'];

Sample Success Response:

{ "status": "success", "message": "Wallet balance retrieved successfully!", "balance":"1000","symbol":"CEDI", }

Error Responses:
100: wallet_error – API Key not found.
102: login error.

2. Wallet To Wallet Transfer(P2P)

Endpoint: POST https://1stcurrency.org/v1/apiDirect

Description: Money Transfer from client to another client.

Authentication: Required (API Key).
Parameters Type Required Description
apiKey integer Required 16 digits access key
accountNo integer Required account number of sender
password integer Required password of sender
amount integer Required amount to be sent
account_no1 integer Required Beneficiary account
serialNo integer Required unique transaction id


Sample Request: PHP Curl

$post_data['apiKey'] = "7543192815834900";
$post_data['accountNo'] = "0713989814";
$post_data['password'] = "0000";
$post_data['account_no1'] = "0713989815";
$post_data['amount'] = "10";
$post_data['serialNo'] = mt_rand(100000, 500000);
//traverse array and prepare data for posting (key1=value1)
foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; }
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection = curl_init('https://1stcurrency.org/v1/apiDirect');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_POST, true); // Use POST method
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
echo $result;
//close the connection
curl_close($curl_connection);

Sample Success Response:
{"status":"success","message":"Transaction was successful","id":"540621738","amount":"10","symbol":"CEDI","accountNo":"0713989815","reeiver":"Asa/Will","tel":"2330713989815"}

Error Responses:
100: API Key not found.
101: wallet_error – local transfers ONLY.
102: wallet_error – login error.
103: wallet_error – Low balance.
105: Duplicate transaction.

3. Wallet To Wallet Transfer(P2P), with Multi-Factor Authentication.

Endpoint: POST https://1stcurrency.org/v1/api

Description: Money Transfer from client to another client, with OTP validation activated.

Authentication: Required (API Key).
Parameters Type Required Description
apiKey integer Required 16 digits access key
accountNo integer Required account number of sender
password integer Required password of sender
amount integer Required amount to be sent
account_no1 integer Required Beneficiary account
return_url string Required your website receipt page
serialNo integer Required unique transaction id


Sample Request: PHP Curl
$post_data['apiKey'] = "7543192815834900";
$post_data['accountNo'] = "0713989814";
$post_data['password'] = "0000";
$post_data['account_no1'] = "0713989815";
$post_data['amount'] = "10";
$post_data['return_url'] = "www.example.com/receipt.php";
$post_data['serialNo'] = mt_rand(100000, 500000);
//traverse array and prepare data for posting (key1=value1)
foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; }
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection = curl_init('https://1stcurrency.org/v1/api');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_POST, true); // Use POST method
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
echo $result;
//close the connection
curl_close($curl_connection);

Error Responses:
100: API Key not found.
101: wallet_error – local transfers ONLY.
102: wallet_error – login error.
103: wallet_error – Low balance.
104: wallet_error – OTP not found.
105: Duplicate transaction.