Post v3producers contracts charges and credits
This API allows you to charge/credit amounts towards specific customer contracts.
These can be single items or recurring amounts, which will be added to the next customer invoice.
Typical use cases are customer-specific or variable amounts that you want to keep full control over.
An example is bonus payments, which can be granted once as a referral bonus or over several months/years as a promotional bonus.
curl --request POST \
--url https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/ \
--header 'Content-Type: application/json' \
--data '
{
"amount_cent": 1,
"is_gross": true,
"due_date": "2023-12-25",
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"no_of_executions": 2,
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
'import requests
url = "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/"
payload = {
"amount_cent": 1,
"is_gross": True,
"due_date": "2023-12-25",
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"no_of_executions": 2,
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount_cent: 1,
is_gross: true,
due_date: '2023-12-25',
input_id: '<string>',
category: '<string>',
display_name: '<string>',
no_of_executions: 2,
explanation_text: '<string>',
bookkeeping_account: '<string>'
})
};
fetch('https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/', 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.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/",
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([
'amount_cent' => 1,
'is_gross' => true,
'due_date' => '2023-12-25',
'input_id' => '<string>',
'category' => '<string>',
'display_name' => '<string>',
'no_of_executions' => 2,
'explanation_text' => '<string>',
'bookkeeping_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/"
payload := strings.NewReader("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/")
.header("Content-Type", "application/json")
.body("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"contract_id": "CC0001",
"bonus_created": [
{
"ABCDEFGH0001": {
"type_of_transaction": "credit",
"amount_cent": 1000,
"is_gross": true,
"vat_type": "normal",
"due_date": "2022-02-01",
"input_id": "ABCDEFGH0001",
"internal_id": "ABCDEFGH0001__1",
"contract_id": "CC0001",
"category": "non_charging_bonus",
"display_name": "Non-charging bonus",
"explanation_text": "Diesen Bonus erhalten Sie da Sie noch nicht laden.",
"bookkeeping_account": "",
"salespartner": "salespartner_spid"
}
},
{
"ABCDEFGH0001": {
"type_of_transaction": "credit",
"amount_cent": 1000,
"is_gross": true,
"vat_type": "normal",
"due_date": "2022-03-01",
"input_id": "ABCDEFGH0001",
"internal_id": "ABCDEFGH0001__2",
"contract_id": "CC0001",
"category": "non_charging_bonus",
"display_name": "Non-charging bonus",
"explanation_text": "Diesen Bonus erhalten Sie da Sie noch nicht laden.",
"bookkeeping_account": "",
"salespartner": "salespartner_spid"
}
}
]
}{
"amount_cent": [
"Ensure this value is greater than or equal to 0."
],
"execution_cycle": [
"This field required in case when \"no_of_executions\" greater than 1."
]
}Body
Whether the amount shall be charged or credited towards the customers.
credit- creditcharge- charge
credit, charge Monetary Amount in cent. For example "1000" for 10,00 EUR
x >= 0Identifier for whether it is a net (excl. VAT) or gross (incl. VAT) amount
VAT rate for normal is 19% and reduced is 7%. In case of vat changes, the value, which is valid at the due date, will be used.
normal- normalreduced- reduced
normal, reduced Defines which customer bill will include the submitted amount: the bill which covers a billing period including this due_date will contain the submitted amount.
Please submit a unique identifier per contract ID
128Describes the nature of the submitted amount, e. g. "Bonus", and is used to group values of the same category on the customer facing invoice.
40Display name which is exposed on the customer invoice
128In case of recurring payments this field defines how many times the submitted amount shall beexecuted. The unit (months, years) is defined in the field execution_cycle. If left empty, the value defaults to 1 and the amount is only executed once.
x >= 1In case the no_of_executions has been set to a value greater than 1, this field is used to define the frequency of the executions.
month- monthyear- year
month, year Description text explaining the context of the amount. Its displayed on the customer invoice
The bookkeeping account for this transaction, which will be reported back to you in the accounting file. In case of DATEV it is the contra account (Gegenkonto).
128curl --request POST \
--url https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/ \
--header 'Content-Type: application/json' \
--data '
{
"amount_cent": 1,
"is_gross": true,
"due_date": "2023-12-25",
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"no_of_executions": 2,
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
'import requests
url = "https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/"
payload = {
"amount_cent": 1,
"is_gross": True,
"due_date": "2023-12-25",
"input_id": "<string>",
"category": "<string>",
"display_name": "<string>",
"no_of_executions": 2,
"explanation_text": "<string>",
"bookkeeping_account": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount_cent: 1,
is_gross: true,
due_date: '2023-12-25',
input_id: '<string>',
category: '<string>',
display_name: '<string>',
no_of_executions: 2,
explanation_text: '<string>',
bookkeeping_account: '<string>'
})
};
fetch('https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/', 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.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/",
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([
'amount_cent' => 1,
'is_gross' => true,
'due_date' => '2023-12-25',
'input_id' => '<string>',
'category' => '<string>',
'display_name' => '<string>',
'no_of_executions' => 2,
'explanation_text' => '<string>',
'bookkeeping_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/"
payload := strings.NewReader("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/")
.header("Content-Type", "application/json")
.body("{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenaza.de/v3/producers/{userID}/contracts/{contractID}/charges_and_credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_cent\": 1,\n \"is_gross\": true,\n \"due_date\": \"2023-12-25\",\n \"input_id\": \"<string>\",\n \"category\": \"<string>\",\n \"display_name\": \"<string>\",\n \"no_of_executions\": 2,\n \"explanation_text\": \"<string>\",\n \"bookkeeping_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"contract_id": "CC0001",
"bonus_created": [
{
"ABCDEFGH0001": {
"type_of_transaction": "credit",
"amount_cent": 1000,
"is_gross": true,
"vat_type": "normal",
"due_date": "2022-02-01",
"input_id": "ABCDEFGH0001",
"internal_id": "ABCDEFGH0001__1",
"contract_id": "CC0001",
"category": "non_charging_bonus",
"display_name": "Non-charging bonus",
"explanation_text": "Diesen Bonus erhalten Sie da Sie noch nicht laden.",
"bookkeeping_account": "",
"salespartner": "salespartner_spid"
}
},
{
"ABCDEFGH0001": {
"type_of_transaction": "credit",
"amount_cent": 1000,
"is_gross": true,
"vat_type": "normal",
"due_date": "2022-03-01",
"input_id": "ABCDEFGH0001",
"internal_id": "ABCDEFGH0001__2",
"contract_id": "CC0001",
"category": "non_charging_bonus",
"display_name": "Non-charging bonus",
"explanation_text": "Diesen Bonus erhalten Sie da Sie noch nicht laden.",
"bookkeeping_account": "",
"salespartner": "salespartner_spid"
}
}
]
}{
"amount_cent": [
"Ensure this value is greater than or equal to 0."
],
"execution_cycle": [
"This field required in case when \"no_of_executions\" greater than 1."
]
}
