Update a fee
curl --request PUT \
--url https://core.nozle.app/api/v1/fees/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fee": {
"payment_status": "succeeded"
}
}
'import requests
url = "https://core.nozle.app/api/v1/fees/{id}"
payload = { "fee": { "payment_status": "succeeded" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fee: {payment_status: 'succeeded'}})
};
fetch('https://core.nozle.app/api/v1/fees/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/fees/{id}"
payload := strings.NewReader("{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/fees/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/fees/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fee' => [
'payment_status' => 'succeeded'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/fees/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}")
.asString();{
"fee": {
"amount_cents": 100,
"amount_currency": "EUR",
"taxes_amount_cents": 20,
"taxes_rate": 20,
"units": "0.32",
"precise_unit_amount": "312.5",
"total_aggregated_units": "0.32",
"total_amount_cents": 120,
"total_amount_currency": "EUR",
"pay_in_advance": true,
"invoiceable": true,
"payment_status": "pending",
"sub_total_excluding_taxes_amount_cents": 100,
"sub_total_excluding_taxes_precise_amount_cents": "100.0",
"item": {
"type": "subscription",
"code": "startup",
"name": "Startup",
"lago_item_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"item_type": "Subscription",
"description": "Startup",
"invoice_display_name": "Setup Fee (SF1)",
"filter_invoice_display_name": "AWS eu-east-1",
"filters": {},
"grouped_by": {}
},
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_charge_filter_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_fixed_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_true_up_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_true_up_parent_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "external_id",
"external_subscription_id": "external_id",
"precise_amount": "1.0001",
"precise_total_amount": "1.0212",
"taxes_precise_amount": "0.20123",
"events_count": 23,
"from_date": "2022-04-29T08:59:51Z",
"to_date": "2022-05-29T08:59:51Z",
"created_at": "2022-08-24T14:58:59Z",
"succeeded_at": "2022-08-24T14:58:59Z",
"failed_at": "2022-08-24T14:58:59Z",
"refunded_at": "2022-08-24T14:58:59Z",
"event_transaction_id": "transaction_1234567890",
"description": "Fee description",
"precise_coupons_amount_cents": "0.0",
"amount_details": {
"plan_amount_cents": 10000,
"graduated_ranges": [
{
"units": "10.0",
"from_value": 0,
"to_value": 10,
"flat_unit_amount": "1.0",
"per_unit_amount": "1.0",
"per_unit_total_amount": "10.0",
"total_with_flat_amount": "11.0"
}
],
"graduated_percentage_ranges": [
{
"units": "10.0",
"from_value": 0,
"to_value": 10,
"flat_unit_amount": "1.0",
"rate": "1.0",
"per_unit_total_amount": "10.0",
"total_with_flat_amount": "11.0"
}
],
"free_units": "10.0",
"paid_units": "40.0",
"per_package_size": 1000,
"per_package_unit_amount": "0.5",
"per_unit_total_amount": "10.0",
"units": "20.0",
"free_events": 10,
"rate": "1.0",
"paid_events": 20,
"fixed_fee_unit_amount": "1.0",
"fixed_fee_total_amount": "20.0",
"min_max_adjustment_total_amount": "20.0",
"per_unit_amount": "0.5",
"flat_unit_amount": "10.0"
},
"self_billed": false,
"applied_taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_tax_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"tax_name": "TVA",
"tax_code": "french_standard_vat",
"tax_rate": 20,
"tax_description": "French standard VAT",
"amount_cents": 2000,
"amount_currency": "USD",
"created_at": "2022-09-14T16:35:31Z",
"lago_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
],
"pricing_unit_details": {
"lago_pricing_unit_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"pricing_unit_code": "credits",
"short_name": "CR",
"amount_cents": 200,
"precise_amount_cents": "200.0",
"unit_amount_cents": 100,
"precise_unit_amount": "100.0",
"conversion_rate": "0.5"
},
"presentation_breakdowns": [
{
"presentation_by": {},
"units": "9.0"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 405,
"error": "Method Not Allowed",
"code": "not_allowed"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Fees
Update a fee
This endpoint is used for updating a specific fee that has been issued.
PUT
/
fees
/
{id}
Update a fee
curl --request PUT \
--url https://core.nozle.app/api/v1/fees/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fee": {
"payment_status": "succeeded"
}
}
'import requests
url = "https://core.nozle.app/api/v1/fees/{id}"
payload = { "fee": { "payment_status": "succeeded" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fee: {payment_status: 'succeeded'}})
};
fetch('https://core.nozle.app/api/v1/fees/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/fees/{id}"
payload := strings.NewReader("{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/fees/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/fees/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fee' => [
'payment_status' => 'succeeded'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/fees/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fee\": {\n \"payment_status\": \"succeeded\"\n }\n}")
.asString();{
"fee": {
"amount_cents": 100,
"amount_currency": "EUR",
"taxes_amount_cents": 20,
"taxes_rate": 20,
"units": "0.32",
"precise_unit_amount": "312.5",
"total_aggregated_units": "0.32",
"total_amount_cents": 120,
"total_amount_currency": "EUR",
"pay_in_advance": true,
"invoiceable": true,
"payment_status": "pending",
"sub_total_excluding_taxes_amount_cents": 100,
"sub_total_excluding_taxes_precise_amount_cents": "100.0",
"item": {
"type": "subscription",
"code": "startup",
"name": "Startup",
"lago_item_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"item_type": "Subscription",
"description": "Startup",
"invoice_display_name": "Setup Fee (SF1)",
"filter_invoice_display_name": "AWS eu-east-1",
"filters": {},
"grouped_by": {}
},
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_charge_filter_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_fixed_charge_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_invoice_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_true_up_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_true_up_parent_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_customer_id": "external_id",
"external_subscription_id": "external_id",
"precise_amount": "1.0001",
"precise_total_amount": "1.0212",
"taxes_precise_amount": "0.20123",
"events_count": 23,
"from_date": "2022-04-29T08:59:51Z",
"to_date": "2022-05-29T08:59:51Z",
"created_at": "2022-08-24T14:58:59Z",
"succeeded_at": "2022-08-24T14:58:59Z",
"failed_at": "2022-08-24T14:58:59Z",
"refunded_at": "2022-08-24T14:58:59Z",
"event_transaction_id": "transaction_1234567890",
"description": "Fee description",
"precise_coupons_amount_cents": "0.0",
"amount_details": {
"plan_amount_cents": 10000,
"graduated_ranges": [
{
"units": "10.0",
"from_value": 0,
"to_value": 10,
"flat_unit_amount": "1.0",
"per_unit_amount": "1.0",
"per_unit_total_amount": "10.0",
"total_with_flat_amount": "11.0"
}
],
"graduated_percentage_ranges": [
{
"units": "10.0",
"from_value": 0,
"to_value": 10,
"flat_unit_amount": "1.0",
"rate": "1.0",
"per_unit_total_amount": "10.0",
"total_with_flat_amount": "11.0"
}
],
"free_units": "10.0",
"paid_units": "40.0",
"per_package_size": 1000,
"per_package_unit_amount": "0.5",
"per_unit_total_amount": "10.0",
"units": "20.0",
"free_events": 10,
"rate": "1.0",
"paid_events": 20,
"fixed_fee_unit_amount": "1.0",
"fixed_fee_total_amount": "20.0",
"min_max_adjustment_total_amount": "20.0",
"per_unit_amount": "0.5",
"flat_unit_amount": "10.0"
},
"self_billed": false,
"applied_taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_tax_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"tax_name": "TVA",
"tax_code": "french_standard_vat",
"tax_rate": 20,
"tax_description": "French standard VAT",
"amount_cents": 2000,
"amount_currency": "USD",
"created_at": "2022-09-14T16:35:31Z",
"lago_fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
}
],
"pricing_unit_details": {
"lago_pricing_unit_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"pricing_unit_code": "credits",
"short_name": "CR",
"amount_cents": 200,
"precise_amount_cents": "200.0",
"unit_amount_cents": 100,
"precise_unit_amount": "100.0",
"conversion_rate": "0.5"
},
"presentation_breakdowns": [
{
"presentation_by": {},
"units": "9.0"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 405,
"error": "Method Not Allowed",
"code": "not_allowed"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier assigned to the fee within the Nozle application. This ID is exclusively created by Nozle and serves as a unique identifier for the fee's record within the Nozle system.
Example:
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Body
application/json
Fee payload
Show child attributes
Show child attributes
Response
Fee updated
Show child attributes
Show child attributes