Create Wallet
Connect your website/mobile application to 1app wallet system
post
https://api.1app.online/v1/business/createwallet
Create 1app Wallet
Take a look at how you might do this:
cURL
NodeJs
PHP - cURL
Python
1
curl --location --request POST 'https://api.1app.online/v1/business/createwallet' \
2
--header 'Authorization: Bearer SECRET_KEY' \
3
--form 'apptoken="APPID"' \
4
--form 'fname="testname"' \
5
--form 'sname="testsurname"' \
6
--form 'email="[email protected]"' \
7
--form 'phoneno="08000000000"' \
8
--form 'auth="[email protected]!"' \
9
--form 'referby=""'
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://api.1app.online/v1/business/createwallet',
5
'headers': {
6
'Authorization': 'Bearer SECRET_KEY'
7
},
8
formData: {
9
'apptoken': 'APPID',
10
'fname': 'testname',
11
'sname': 'testsurname',
12
'email': '[email protected]',
13
'phoneno': '08000000000',
14
'auth': '[email protected]',
15
'referby': ''
16
}
17
};
18
request(options, function (error, response) {
19
if (error) throw new Error(error);
20
console.log(response.body);
21
});
22
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.1app.online/v1/business/createwallet',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('apptoken' => 'APPID','fname' => 'testname','sname' => 'testsurname','email' => '[email protected]','phoneno' => '08000000000','auth' => '[email protected]','referby' => ''),
15
CURLOPT_HTTPHEADER => array(
16
'Authorization: Bearer SECRET_KEY'
17
),
18
));
19
20
$response = curl_exec($curl);
21
22
curl_close($curl);
23
echo $response;
24
Copied!
1
import requests
2
3
url = "https://api.1app.online/v1/business/createwallet"
4
5
payload={'apptoken': 'APPID',
6
'fname': 'testname',
7
'sname': 'testsurname',
8
'email': '[email protected]',
9
'phoneno': '08000000000',
10
11
'referby': ''}
12
files=[
13
14
]
15
headers = {
16
'Authorization': 'Bearer SECRET_KEY'
17
}
18
19
response = requests.request("POST", url, headers=headers, data=payload, files=files)
20
21
print(response.text)
22
Copied!

Sample Response

1
{
2
"status": true,
3
"email": "[email protected]",
4
"accountid": "3107908",
5
"businessid": "",
6
"msg": "Wallet successfully created!"
7
}
Copied!