Use this endpoint to retrieve the balance on a subaccount.
curl -L -X GET 'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/balance' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/balance"
payload = "{\r\n \"amount\": 5000,\r\n \"currency\": \"USD\"\r\n}"
headers = {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/balance"
method := "GET"
payload := strings.NewReader("{
\n \"amount\": 5000,
\n \"currency\": \"USD\"
\n}")
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/balance',
'headers': {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}'
},
body: JSON.stringify({"amount":5000,"currency":"USD"})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"amount": 5000,
"currency": "USD"
}
Name | Type | Description |
---|---|---|
amount | int | The amount in the subaccount balance |
currency | string |
Currency code used to display pricing to subaccount. Possible values: See Glossary – Subaccount display currencies. |