Get Wallet Data
curl --request GET \
--url https://api.zbdpay.com/v1/oauth2/wallet \
--header 'apikey: <apikey>' \
--header 'usertoken: <usertoken>'import requests
url = "https://api.zbdpay.com/v1/oauth2/wallet"
headers = {
"usertoken": "<usertoken>",
"apikey": "<apikey>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {usertoken: '<usertoken>', apikey: '<apikey>'}};
fetch('https://api.zbdpay.com/v1/oauth2/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zbdpay.com/v1/oauth2/wallet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <apikey>",
"usertoken: <usertoken>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zbdpay.com/v1/oauth2/wallet"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("usertoken", "<usertoken>")
req.Header.Add("apikey", "<apikey>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zbdpay.com/v1/oauth2/wallet")
.header("usertoken", "<usertoken>")
.header("apikey", "<apikey>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zbdpay.com/v1/oauth2/wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["usertoken"] = '<usertoken>'
request["apikey"] = '<apikey>'
response = http.request(request)
puts response.read_body{
"data": {
"balance": "98251000",
"remainingAmountLimits": {
"daily": "1000000000",
"maxCredit": "4901749000",
"monthly": "25000000000",
"weekly": "5000000000",
},
},
"message": "Successfully fetched user wallet.",
"success": true,
}
API Reference
Get Wallet Data
Fetch wallet-related information about a logged-in ZBD User.
GET
/
v1
/
oauth2
/
wallet
Get Wallet Data
curl --request GET \
--url https://api.zbdpay.com/v1/oauth2/wallet \
--header 'apikey: <apikey>' \
--header 'usertoken: <usertoken>'import requests
url = "https://api.zbdpay.com/v1/oauth2/wallet"
headers = {
"usertoken": "<usertoken>",
"apikey": "<apikey>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {usertoken: '<usertoken>', apikey: '<apikey>'}};
fetch('https://api.zbdpay.com/v1/oauth2/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zbdpay.com/v1/oauth2/wallet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <apikey>",
"usertoken: <usertoken>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zbdpay.com/v1/oauth2/wallet"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("usertoken", "<usertoken>")
req.Header.Add("apikey", "<apikey>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zbdpay.com/v1/oauth2/wallet")
.header("usertoken", "<usertoken>")
.header("apikey", "<apikey>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zbdpay.com/v1/oauth2/wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["usertoken"] = '<usertoken>'
request["apikey"] = '<apikey>'
response = http.request(request)
puts response.read_body{
"data": {
"balance": "98251000",
"remainingAmountLimits": {
"daily": "1000000000",
"maxCredit": "4901749000",
"monthly": "25000000000",
"weekly": "5000000000",
},
},
"message": "Successfully fetched user wallet.",
"success": true,
}
Description
You can use this API endpoint to fetch information about a given ZBD User’s Wallet, granted you can pass the providedaccessToken.
Usage
Read here for more details on how to setup ZBD Login (OAuth2) with your platform.Configuration
Header Parameters
string
required
OAuth2 Access Token
string
required
ZBD Project API Key
{
"data": {
"balance": "98251000",
"remainingAmountLimits": {
"daily": "1000000000",
"maxCredit": "4901749000",
"monthly": "25000000000",
"weekly": "5000000000",
},
},
"message": "Successfully fetched user wallet.",
"success": true,
}
Was this page helpful?
⌘I