curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
"{ \"currency\": \"USD\", \"amount\": 55.00, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"note\": \"Testing\", \"metadata\": { \"color\": \"black\" } }"
'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes"
payload = "{ \"currency\": \"USD\", \"amount\": 55.00, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"note\": \"Testing\", \"metadata\": { \"color\": \"black\" } }"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify('{ "currency": "USD", "amount": 55.00, "description": "Grant Credit", "reason": "Testing purpose", "note": "Testing", "metadata": { "color": "black" } }')
};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('{ "currency": "USD", "amount": 55.00, "description": "Grant Credit", "reason": "Testing purpose", "note": "Testing", "metadata": { "color": "black" } }'),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes"
payload := strings.NewReader("\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\""
response = http.request(request)
puts response.read_body"{ \"object\": \"CurrencyAmount\", \"vid\": \"c1f3ad8a05fe075ff387dbe05aa88ed8846be357\", \"currency\": \"USD\", \"amount\": 55, \"metadata\": { \"color\": \"black\" }, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"granted_by_cashbox\": false, \"granted\": \"2022-12-30T10:39:15+00:00\", \"source\": \"Account\", \"note\": \"Testing\" }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Modify a Currency Credit
Update an existing Currency Credit Amount, including incrementing/decrementing the amount or Revoking the remainder of the Credit. Using a CurrencyAmount Object, manipulate the amount by providing positive values to increase the credit amount, negative values to decrease the credit amount, or a negative for the full remaining credit amount to revoke the currency credit entirely.
curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
"{ \"currency\": \"USD\", \"amount\": 55.00, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"note\": \"Testing\", \"metadata\": { \"color\": \"black\" } }"
'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes"
payload = "{ \"currency\": \"USD\", \"amount\": 55.00, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"note\": \"Testing\", \"metadata\": { \"color\": \"black\" } }"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify('{ "currency": "USD", "amount": 55.00, "description": "Grant Credit", "reason": "Testing purpose", "note": "Testing", "metadata": { "color": "black" } }')
};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('{ "currency": "USD", "amount": 55.00, "description": "Grant Credit", "reason": "Testing purpose", "note": "Testing", "metadata": { "color": "black" } }'),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes"
payload := strings.NewReader("\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\"")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/accounts/{ID}/currency_amount_changes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "\"{ \\\"currency\\\": \\\"USD\\\", \\\"amount\\\": 55.00, \\\"description\\\": \\\"Grant Credit\\\", \\\"reason\\\": \\\"Testing purpose\\\", \\\"note\\\": \\\"Testing\\\", \\\"metadata\\\": { \\\"color\\\": \\\"black\\\" } }\""
response = http.request(request)
puts response.read_body"{ \"object\": \"CurrencyAmount\", \"vid\": \"c1f3ad8a05fe075ff387dbe05aa88ed8846be357\", \"currency\": \"USD\", \"amount\": 55, \"metadata\": { \"color\": \"black\" }, \"description\": \"Grant Credit\", \"reason\": \"Testing purpose\", \"granted_by_cashbox\": false, \"granted\": \"2022-12-30T10:39:15+00:00\", \"source\": \"Account\", \"note\": \"Testing\" }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The id or the vid of the Account to retrieve A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.
128Body
JSON - A (new) Currency Amount sub-resource. The Currency Amount object represents the change in the Currency Credit.
The CurrencyAmount object represents the currency credit detail associated with a particular grant of currency credits.
Value is “CurrencyAmount”
CurrencyAmount A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.
128The currency amount of the credit.
Metadata are sets of key-value pairs and are useful for storing additional, structured information on an object. This object is used to store a list of keys, which you create and associate with text string values. You use these key-value pairs to store custom data for your own internal tracking purposes, or to store CashBox specific data for defined CashBox purposes.
The metadata field supports key-value pairs with the following limitations:
Keys can be up to 256 characters
Keys can be any string that is needed, except only CashBox can prefix keys with vin:
Values can be up to 1024 characters
In some cases metadata from one object will be inherited automatically from one object to another that is spawned from it. e.g. metadata on a Subscription and SubscriptionItem will be inherited by all Transactions and TransactionItems that result from them.
Order of precedence value.
Text provided upon credit grant.
Text provided upon credit grant.
The date and time the credit was originally granted.
The Account represents a merchant’s customer. As such it can contain as much or as little information as you collect about the customers (people or organizations) to which you offer billing and subscriptions. Subscriptions and Transactions must belong to an Account - as such, Accounts will be required in CashBox for billing. Read More in our User Guide
An Account can have any number of children accounts and may have up to one parent account. Read more in our User Guide.
An Account owns the “on file” payment methods to be used by it in billing.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
JSON - A (new) Currency Amount sub-resource.
The CurrencyAmount object represents the currency credit detail associated with a particular grant of currency credits.
Value is “CurrencyAmount”
CurrencyAmount A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.
128The currency amount of the credit.
Metadata are sets of key-value pairs and are useful for storing additional, structured information on an object. This object is used to store a list of keys, which you create and associate with text string values. You use these key-value pairs to store custom data for your own internal tracking purposes, or to store CashBox specific data for defined CashBox purposes.
The metadata field supports key-value pairs with the following limitations:
Keys can be up to 256 characters
Keys can be any string that is needed, except only CashBox can prefix keys with vin:
Values can be up to 1024 characters
In some cases metadata from one object will be inherited automatically from one object to another that is spawned from it. e.g. metadata on a Subscription and SubscriptionItem will be inherited by all Transactions and TransactionItems that result from them.
Order of precedence value.
Text provided upon credit grant.
Text provided upon credit grant.
The date and time the credit was originally granted.
The Account represents a merchant’s customer. As such it can contain as much or as little information as you collect about the customers (people or organizations) to which you offer billing and subscriptions. Subscriptions and Transactions must belong to an Account - as such, Accounts will be required in CashBox for billing. Read More in our User Guide
An Account can have any number of children accounts and may have up to one parent account. Read more in our User Guide.
An Account owns the “on file” payment methods to be used by it in billing.
Show child attributes
Show child attributes
Show child attributes
Show child attributes

