curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enable": true,
"label": "Monthly Volume Billing",
"type": "volume",
"accountTarget": {
"aliases": [
"account_alpha",
"account_beta"
],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"createdAt": "2026-01-01T00:00:00Z",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"feeAmount": "50.00",
"freeQuota": 100,
"id": "00000000-0000-0000-0000-000000000000",
"maintenanceCreditAccount": "account_maintenance_credit",
"organizationId": "00000000-0000-0000-0000-000000000000",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
],
"updatedAt": "2026-01-01T00:00:00Z"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages"
payload := strings.NewReader("{\n \"enable\": true,\n \"label\": \"Monthly Volume Billing\",\n \"type\": \"volume\",\n \"accountTarget\": {\n \"aliases\": [\n \"account_alpha\",\n \"account_beta\"\n ],\n \"portfolioId\": \"00000000-0000-0000-0000-000000000000\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"assetCode\": \"BRL\",\n \"countMode\": \"perRoute\",\n \"createdAt\": \"2026-01-01T00:00:00Z\",\n \"creditAccountAlias\": \"account_fees_credit\",\n \"debitAccountAlias\": \"account_fees_debit\",\n \"deletedAt\": \"2026-06-01T00:00:00Z\",\n \"description\": \"Charges per completed transaction route\",\n \"discountTiers\": [\n {\n \"discountPercentage\": \"10.00\",\n \"minQuantity\": 1000\n }\n ],\n \"feeAmount\": \"50.00\",\n \"freeQuota\": 100,\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"maintenanceCreditAccount\": \"account_maintenance_credit\",\n \"organizationId\": \"00000000-0000-0000-0000-000000000000\",\n \"pricingModel\": \"tiered\",\n \"tiers\": [\n {\n \"minQuantity\": 0,\n \"unitPrice\": \"1.50\",\n \"maxQuantity\": 999\n }\n ],\n \"updatedAt\": \"2026-01-01T00:00:00Z\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enable: true,
label: 'Monthly Volume Billing',
type: 'volume',
accountTarget: {
aliases: ['account_alpha', 'account_beta'],
portfolioId: '00000000-0000-0000-0000-000000000000',
segmentId: '00000000-0000-0000-0000-000000000000'
},
assetCode: 'BRL',
countMode: 'perRoute',
createdAt: '2026-01-01T00:00:00Z',
creditAccountAlias: 'account_fees_credit',
debitAccountAlias: 'account_fees_debit',
deletedAt: '2026-06-01T00:00:00Z',
description: 'Charges per completed transaction route',
discountTiers: [{discountPercentage: '10.00', minQuantity: 1000}],
feeAmount: '50.00',
freeQuota: 100,
id: '00000000-0000-0000-0000-000000000000',
maintenanceCreditAccount: 'account_maintenance_credit',
organizationId: '00000000-0000-0000-0000-000000000000',
pricingModel: 'tiered',
tiers: [{minQuantity: 0, unitPrice: '1.50', maxQuantity: 999}],
updatedAt: '2026-01-01T00:00:00Z'
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages"
payload = {
"enable": True,
"label": "Monthly Volume Billing",
"type": "volume",
"accountTarget": {
"aliases": ["account_alpha", "account_beta"],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"createdAt": "2026-01-01T00:00:00Z",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"feeAmount": "50.00",
"freeQuota": 100,
"id": "00000000-0000-0000-0000-000000000000",
"maintenanceCreditAccount": "account_maintenance_credit",
"organizationId": "00000000-0000-0000-0000-000000000000",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
],
"updatedAt": "2026-01-01T00:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2026-01-01T00:00:00Z",
"enable": true,
"id": "00000000-0000-0000-0000-000000000000",
"label": "Monthly Volume Billing",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"organizationId": "00000000-0000-0000-0000-000000000000",
"type": "volume",
"updatedAt": "2026-01-01T00:00:00Z",
"accountTarget": {
"aliases": [
"account_alpha",
"account_beta"
],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"eventFilter": {
"status": "APPROVED",
"transactionRoute": "payment_route"
},
"feeAmount": "50.00",
"freeQuota": 100,
"maintenanceCreditAccount": "account_maintenance_credit",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
]
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Create a BillingPackage
curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enable": true,
"label": "Monthly Volume Billing",
"type": "volume",
"accountTarget": {
"aliases": [
"account_alpha",
"account_beta"
],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"createdAt": "2026-01-01T00:00:00Z",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"feeAmount": "50.00",
"freeQuota": 100,
"id": "00000000-0000-0000-0000-000000000000",
"maintenanceCreditAccount": "account_maintenance_credit",
"organizationId": "00000000-0000-0000-0000-000000000000",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
],
"updatedAt": "2026-01-01T00:00:00Z"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages"
payload := strings.NewReader("{\n \"enable\": true,\n \"label\": \"Monthly Volume Billing\",\n \"type\": \"volume\",\n \"accountTarget\": {\n \"aliases\": [\n \"account_alpha\",\n \"account_beta\"\n ],\n \"portfolioId\": \"00000000-0000-0000-0000-000000000000\",\n \"segmentId\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"assetCode\": \"BRL\",\n \"countMode\": \"perRoute\",\n \"createdAt\": \"2026-01-01T00:00:00Z\",\n \"creditAccountAlias\": \"account_fees_credit\",\n \"debitAccountAlias\": \"account_fees_debit\",\n \"deletedAt\": \"2026-06-01T00:00:00Z\",\n \"description\": \"Charges per completed transaction route\",\n \"discountTiers\": [\n {\n \"discountPercentage\": \"10.00\",\n \"minQuantity\": 1000\n }\n ],\n \"feeAmount\": \"50.00\",\n \"freeQuota\": 100,\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"maintenanceCreditAccount\": \"account_maintenance_credit\",\n \"organizationId\": \"00000000-0000-0000-0000-000000000000\",\n \"pricingModel\": \"tiered\",\n \"tiers\": [\n {\n \"minQuantity\": 0,\n \"unitPrice\": \"1.50\",\n \"maxQuantity\": 999\n }\n ],\n \"updatedAt\": \"2026-01-01T00:00:00Z\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enable: true,
label: 'Monthly Volume Billing',
type: 'volume',
accountTarget: {
aliases: ['account_alpha', 'account_beta'],
portfolioId: '00000000-0000-0000-0000-000000000000',
segmentId: '00000000-0000-0000-0000-000000000000'
},
assetCode: 'BRL',
countMode: 'perRoute',
createdAt: '2026-01-01T00:00:00Z',
creditAccountAlias: 'account_fees_credit',
debitAccountAlias: 'account_fees_debit',
deletedAt: '2026-06-01T00:00:00Z',
description: 'Charges per completed transaction route',
discountTiers: [{discountPercentage: '10.00', minQuantity: 1000}],
feeAmount: '50.00',
freeQuota: 100,
id: '00000000-0000-0000-0000-000000000000',
maintenanceCreditAccount: 'account_maintenance_credit',
organizationId: '00000000-0000-0000-0000-000000000000',
pricingModel: 'tiered',
tiers: [{minQuantity: 0, unitPrice: '1.50', maxQuantity: 999}],
updatedAt: '2026-01-01T00:00:00Z'
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/ledgers/{ledger_id}/billing-packages"
payload = {
"enable": True,
"label": "Monthly Volume Billing",
"type": "volume",
"accountTarget": {
"aliases": ["account_alpha", "account_beta"],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"createdAt": "2026-01-01T00:00:00Z",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"feeAmount": "50.00",
"freeQuota": 100,
"id": "00000000-0000-0000-0000-000000000000",
"maintenanceCreditAccount": "account_maintenance_credit",
"organizationId": "00000000-0000-0000-0000-000000000000",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
],
"updatedAt": "2026-01-01T00:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2026-01-01T00:00:00Z",
"enable": true,
"id": "00000000-0000-0000-0000-000000000000",
"label": "Monthly Volume Billing",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"organizationId": "00000000-0000-0000-0000-000000000000",
"type": "volume",
"updatedAt": "2026-01-01T00:00:00Z",
"accountTarget": {
"aliases": [
"account_alpha",
"account_beta"
],
"portfolioId": "00000000-0000-0000-0000-000000000000",
"segmentId": "00000000-0000-0000-0000-000000000000"
},
"assetCode": "BRL",
"countMode": "perRoute",
"creditAccountAlias": "account_fees_credit",
"debitAccountAlias": "account_fees_debit",
"deletedAt": "2026-06-01T00:00:00Z",
"description": "Charges per completed transaction route",
"discountTiers": [
{
"discountPercentage": "10.00",
"minQuantity": 1000
}
],
"eventFilter": {
"status": "APPROVED",
"transactionRoute": "payment_route"
},
"feeAmount": "50.00",
"freeQuota": 100,
"maintenanceCreditAccount": "account_maintenance_credit",
"pricingModel": "tiered",
"tiers": [
{
"minQuantity": 0,
"unitPrice": "1.50",
"maxQuantity": 999
}
]
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Organization ID (UUID)
Ledger ID (UUID)
Body
true
"Monthly Volume Billing"
"volume"
Show child attributes
Show child attributes
"BRL"
"perRoute"
"2026-01-01T00:00:00Z"
"account_fees_credit"
"account_fees_debit"
"2026-06-01T00:00:00Z"
"Charges per completed transaction route"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"50.00"
100
"00000000-0000-0000-0000-000000000000"
"account_maintenance_credit"
"00000000-0000-0000-0000-000000000000"
"tiered"
Show child attributes
Show child attributes
"2026-01-01T00:00:00Z"
Response
Created
"2026-01-01T00:00:00Z"
true
"00000000-0000-0000-0000-000000000000"
"Monthly Volume Billing"
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
"volume"
"2026-01-01T00:00:00Z"
Show child attributes
Show child attributes
"BRL"
"perRoute"
"account_fees_credit"
"account_fees_debit"
"2026-06-01T00:00:00Z"
"Charges per completed transaction route"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"50.00"
100
"account_maintenance_credit"
"tiered"
Show child attributes
Show child attributes
Was this page helpful?

