Skip to main content
POST
/
plans
/
{code}
/
charges
Create a charge
curl --request POST \
  --url https://api.getlago.com/api/v1/plans/{code}/charges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "charge": {
    "billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "invoice_display_name": "Setup",
    "min_amount_cents": 0,
    "properties": {
      "grouped_by": [
        "agent_name"
      ],
      "pricing_group_keys": [
        "agent_name"
      ],
      "graduated_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "flat_amount": "10",
          "per_unit_amount": "0.5"
        }
      ],
      "graduated_percentage_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "rate": "1",
          "flat_amount": "10"
        }
      ],
      "amount": "30",
      "free_units": 100,
      "package_size": 1000,
      "rate": "1",
      "fixed_amount": "0.5",
      "free_units_per_events": 5,
      "free_units_per_total_aggregation": "500",
      "per_transaction_max_amount": "3.75",
      "per_transaction_min_amount": "1.75",
      "volume_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "flat_amount": "10",
          "per_unit_amount": "0.5"
        }
      ],
      "presentation_group_keys": [
        {
          "value": "region",
          "options": {
            "display_in_invoice": true
          }
        }
      ]
    },
    "filters": [
      {
        "properties": {
          "grouped_by": [
            "agent_name"
          ],
          "pricing_group_keys": [
            "agent_name"
          ],
          "graduated_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "flat_amount": "10",
              "per_unit_amount": "0.5"
            }
          ],
          "graduated_percentage_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "rate": "1",
              "flat_amount": "10"
            }
          ],
          "amount": "30",
          "free_units": 100,
          "package_size": 1000,
          "rate": "1",
          "fixed_amount": "0.5",
          "free_units_per_events": 5,
          "free_units_per_total_aggregation": "500",
          "per_transaction_max_amount": "3.75",
          "per_transaction_min_amount": "1.75",
          "volume_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "flat_amount": "10",
              "per_unit_amount": "0.5"
            }
          ]
        },
        "values": {
          "region": [
            "us-east-1"
          ]
        },
        "invoice_display_name": "AWS"
      }
    ],
    "tax_codes": [
      "french_standard_vat"
    ],
    "applied_pricing_unit": {
      "code": "credits",
      "conversion_rate": "0.5"
    },
    "code": "api_requests_charge",
    "pay_in_advance": false,
    "invoiceable": true,
    "regroup_paid_fees": null,
    "prorated": false,
    "cascade_updates": true
  }
}
'
import requests

url = "https://api.getlago.com/api/v1/plans/{code}/charges"

payload = { "charge": {
"billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"invoice_display_name": "Setup",
"min_amount_cents": 0,
"properties": {
"grouped_by": ["agent_name"],
"pricing_group_keys": ["agent_name"],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"presentation_group_keys": [
{
"value": "region",
"options": { "display_in_invoice": True }
}
]
},
"filters": [
{
"properties": {
"grouped_by": ["agent_name"],
"pricing_group_keys": ["agent_name"],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
]
},
"values": { "region": ["us-east-1"] },
"invoice_display_name": "AWS"
}
],
"tax_codes": ["french_standard_vat"],
"applied_pricing_unit": {
"code": "credits",
"conversion_rate": "0.5"
},
"code": "api_requests_charge",
"pay_in_advance": False,
"invoiceable": True,
"regroup_paid_fees": None,
"prorated": False,
"cascade_updates": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charge: {
billable_metric_id: '1a901a90-1a90-1a90-1a90-1a901a901a90',
invoice_display_name: 'Setup',
min_amount_cents: 0,
properties: {
grouped_by: ['agent_name'],
pricing_group_keys: ['agent_name'],
graduated_ranges: [{from_value: 0, to_value: 10, flat_amount: '10', per_unit_amount: '0.5'}],
graduated_percentage_ranges: [{from_value: 0, to_value: 10, rate: '1', flat_amount: '10'}],
amount: '30',
free_units: 100,
package_size: 1000,
rate: '1',
fixed_amount: '0.5',
free_units_per_events: 5,
free_units_per_total_aggregation: '500',
per_transaction_max_amount: '3.75',
per_transaction_min_amount: '1.75',
volume_ranges: [{from_value: 0, to_value: 10, flat_amount: '10', per_unit_amount: '0.5'}],
presentation_group_keys: [{value: 'region', options: {display_in_invoice: true}}]
},
filters: [
{
properties: {
grouped_by: ['agent_name'],
pricing_group_keys: ['agent_name'],
graduated_ranges: [{from_value: 0, to_value: 10, flat_amount: '10', per_unit_amount: '0.5'}],
graduated_percentage_ranges: [{from_value: 0, to_value: 10, rate: '1', flat_amount: '10'}],
amount: '30',
free_units: 100,
package_size: 1000,
rate: '1',
fixed_amount: '0.5',
free_units_per_events: 5,
free_units_per_total_aggregation: '500',
per_transaction_max_amount: '3.75',
per_transaction_min_amount: '1.75',
volume_ranges: [{from_value: 0, to_value: 10, flat_amount: '10', per_unit_amount: '0.5'}]
},
values: {region: ['us-east-1']},
invoice_display_name: 'AWS'
}
],
tax_codes: ['french_standard_vat'],
applied_pricing_unit: {code: 'credits', conversion_rate: '0.5'},
code: 'api_requests_charge',
pay_in_advance: false,
invoiceable: true,
regroup_paid_fees: null,
prorated: false,
cascade_updates: true
}
})
};

fetch('https://api.getlago.com/api/v1/plans/{code}/charges', 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.getlago.com/api/v1/plans/{code}/charges",
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([
'charge' => [
'billable_metric_id' => '1a901a90-1a90-1a90-1a90-1a901a901a90',
'invoice_display_name' => 'Setup',
'min_amount_cents' => 0,
'properties' => [
'grouped_by' => [
'agent_name'
],
'pricing_group_keys' => [
'agent_name'
],
'graduated_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'flat_amount' => '10',
'per_unit_amount' => '0.5'
]
],
'graduated_percentage_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'rate' => '1',
'flat_amount' => '10'
]
],
'amount' => '30',
'free_units' => 100,
'package_size' => 1000,
'rate' => '1',
'fixed_amount' => '0.5',
'free_units_per_events' => 5,
'free_units_per_total_aggregation' => '500',
'per_transaction_max_amount' => '3.75',
'per_transaction_min_amount' => '1.75',
'volume_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'flat_amount' => '10',
'per_unit_amount' => '0.5'
]
],
'presentation_group_keys' => [
[
'value' => 'region',
'options' => [
'display_in_invoice' => true
]
]
]
],
'filters' => [
[
'properties' => [
'grouped_by' => [
'agent_name'
],
'pricing_group_keys' => [
'agent_name'
],
'graduated_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'flat_amount' => '10',
'per_unit_amount' => '0.5'
]
],
'graduated_percentage_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'rate' => '1',
'flat_amount' => '10'
]
],
'amount' => '30',
'free_units' => 100,
'package_size' => 1000,
'rate' => '1',
'fixed_amount' => '0.5',
'free_units_per_events' => 5,
'free_units_per_total_aggregation' => '500',
'per_transaction_max_amount' => '3.75',
'per_transaction_min_amount' => '1.75',
'volume_ranges' => [
[
'from_value' => 0,
'to_value' => 10,
'flat_amount' => '10',
'per_unit_amount' => '0.5'
]
]
],
'values' => [
'region' => [
'us-east-1'
]
],
'invoice_display_name' => 'AWS'
]
],
'tax_codes' => [
'french_standard_vat'
],
'applied_pricing_unit' => [
'code' => 'credits',
'conversion_rate' => '0.5'
],
'code' => 'api_requests_charge',
'pay_in_advance' => false,
'invoiceable' => true,
'regroup_paid_fees' => null,
'prorated' => false,
'cascade_updates' => true
]
]),
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;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.getlago.com/api/v1/plans/{code}/charges"

payload := strings.NewReader("{\n \"charge\": {\n \"billable_metric_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"invoice_display_name\": \"Setup\",\n \"min_amount_cents\": 0,\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"presentation_group_keys\": [\n {\n \"value\": \"region\",\n \"options\": {\n \"display_in_invoice\": true\n }\n }\n ]\n },\n \"filters\": [\n {\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ]\n },\n \"values\": {\n \"region\": [\n \"us-east-1\"\n ]\n },\n \"invoice_display_name\": \"AWS\"\n }\n ],\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"applied_pricing_unit\": {\n \"code\": \"credits\",\n \"conversion_rate\": \"0.5\"\n },\n \"code\": \"api_requests_charge\",\n \"pay_in_advance\": false,\n \"invoiceable\": true,\n \"regroup_paid_fees\": null,\n \"prorated\": false,\n \"cascade_updates\": true\n }\n}")

req, _ := http.NewRequest("POST", 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))

}
HttpResponse<String> response = Unirest.post("https://api.getlago.com/api/v1/plans/{code}/charges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"charge\": {\n \"billable_metric_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"invoice_display_name\": \"Setup\",\n \"min_amount_cents\": 0,\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"presentation_group_keys\": [\n {\n \"value\": \"region\",\n \"options\": {\n \"display_in_invoice\": true\n }\n }\n ]\n },\n \"filters\": [\n {\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ]\n },\n \"values\": {\n \"region\": [\n \"us-east-1\"\n ]\n },\n \"invoice_display_name\": \"AWS\"\n }\n ],\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"applied_pricing_unit\": {\n \"code\": \"credits\",\n \"conversion_rate\": \"0.5\"\n },\n \"code\": \"api_requests_charge\",\n \"pay_in_advance\": false,\n \"invoiceable\": true,\n \"regroup_paid_fees\": null,\n \"prorated\": false,\n \"cascade_updates\": true\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.getlago.com/api/v1/plans/{code}/charges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"charge\": {\n \"billable_metric_id\": \"1a901a90-1a90-1a90-1a90-1a901a901a90\",\n \"invoice_display_name\": \"Setup\",\n \"min_amount_cents\": 0,\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"presentation_group_keys\": [\n {\n \"value\": \"region\",\n \"options\": {\n \"display_in_invoice\": true\n }\n }\n ]\n },\n \"filters\": [\n {\n \"properties\": {\n \"grouped_by\": [\n \"agent_name\"\n ],\n \"pricing_group_keys\": [\n \"agent_name\"\n ],\n \"graduated_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ],\n \"graduated_percentage_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"rate\": \"1\",\n \"flat_amount\": \"10\"\n }\n ],\n \"amount\": \"30\",\n \"free_units\": 100,\n \"package_size\": 1000,\n \"rate\": \"1\",\n \"fixed_amount\": \"0.5\",\n \"free_units_per_events\": 5,\n \"free_units_per_total_aggregation\": \"500\",\n \"per_transaction_max_amount\": \"3.75\",\n \"per_transaction_min_amount\": \"1.75\",\n \"volume_ranges\": [\n {\n \"from_value\": 0,\n \"to_value\": 10,\n \"flat_amount\": \"10\",\n \"per_unit_amount\": \"0.5\"\n }\n ]\n },\n \"values\": {\n \"region\": [\n \"us-east-1\"\n ]\n },\n \"invoice_display_name\": \"AWS\"\n }\n ],\n \"tax_codes\": [\n \"french_standard_vat\"\n ],\n \"applied_pricing_unit\": {\n \"code\": \"credits\",\n \"conversion_rate\": \"0.5\"\n },\n \"code\": \"api_requests_charge\",\n \"pay_in_advance\": false,\n \"invoiceable\": true,\n \"regroup_paid_fees\": null,\n \"prorated\": false,\n \"cascade_updates\": true\n }\n}"

response = http.request(request)
puts response.read_body
{
  "charge": {
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "billable_metric_code": "requests",
    "created_at": "2022-09-14T16:35:31Z",
    "pay_in_advance": true,
    "invoiceable": true,
    "regroup_paid_fees": "invoice",
    "prorated": false,
    "min_amount_cents": 1200,
    "properties": {
      "grouped_by": [
        "agent_name"
      ],
      "pricing_group_keys": [
        "agent_name"
      ],
      "graduated_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "flat_amount": "10",
          "per_unit_amount": "0.5"
        }
      ],
      "graduated_percentage_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "rate": "1",
          "flat_amount": "10"
        }
      ],
      "amount": "30",
      "free_units": 100,
      "package_size": 1000,
      "rate": "1",
      "fixed_amount": "0.5",
      "free_units_per_events": 5,
      "free_units_per_total_aggregation": "500",
      "per_transaction_max_amount": "3.75",
      "per_transaction_min_amount": "1.75",
      "volume_ranges": [
        {
          "from_value": 0,
          "to_value": 10,
          "flat_amount": "10",
          "per_unit_amount": "0.5"
        }
      ],
      "presentation_group_keys": [
        {
          "value": "region",
          "options": {
            "display_in_invoice": true
          }
        }
      ]
    },
    "filters": [
      {
        "invoice_display_name": "AWS",
        "properties": {
          "grouped_by": [
            "agent_name"
          ],
          "pricing_group_keys": [
            "agent_name"
          ],
          "graduated_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "flat_amount": "10",
              "per_unit_amount": "0.5"
            }
          ],
          "graduated_percentage_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "rate": "1",
              "flat_amount": "10"
            }
          ],
          "amount": "30",
          "free_units": 100,
          "package_size": 1000,
          "rate": "1",
          "fixed_amount": "0.5",
          "free_units_per_events": 5,
          "free_units_per_total_aggregation": "500",
          "per_transaction_max_amount": "3.75",
          "per_transaction_min_amount": "1.75",
          "volume_ranges": [
            {
              "from_value": 0,
              "to_value": 10,
              "flat_amount": "10",
              "per_unit_amount": "0.5"
            }
          ]
        },
        "values": {
          "region": [
            "us-east-1"
          ]
        }
      }
    ],
    "code": "api_requests_charge",
    "invoice_display_name": "Setup",
    "taxes": [
      {
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
        "name": "TVA",
        "code": "french_standard_vat",
        "rate": 20,
        "applied_to_organization": true,
        "created_at": "2023-07-06T14:35:58Z",
        "description": "French standard VAT"
      }
    ],
    "applied_pricing_unit": {
      "code": "unit_code",
      "conversion_rate": "0.5"
    },
    "accepts_target_wallet": false,
    "lago_parent_id": "1a901a90-1a90-1a90-1a90-1a901a901a90"
  }
}
{
"status": 400,
"error": "Bad request"
}
{
"status": 401,
"error": "Unauthorized"
}
{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}
{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

code
string
required

Code of the existing plan.

Example:

"startup"

Body

application/json

Charge payload

charge
object
required

Properties of a charge that can be overridden at the subscription level.

Response

Charge created

charge
object
required