Moderation
Get Moderation Usage
Get your billable moderation screens per day for the last 30 days, your unbilled screens, and how many screens remain until the next charge.
GET
/
moderation
/
usage
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const response = await client.moderation.retrieveUsage();
console.log(response.daily);import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
response = client.moderation.retrieve_usage()
print(response.daily)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
response, err := client.Moderation.GetUsage(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Daily)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageParams;
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ModerationRetrieveUsageResponse response = client.moderation().retrieveUsage();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageParams
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: ModerationRetrieveUsageResponse = client.moderation().retrieveUsage()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.moderation.retrieve_usage
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$response = $client->moderation->retrieveUsage();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Moderation;
DodoPaymentsClient client = new();
ModerationRetrieveUsageParams parameters = new();
var response = await client.Moderation.RetrieveUsage(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.moderation()
.retrieve_usage()
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/moderation/usage \
--header 'Authorization: Bearer <token>'{
"daily": [
{
"date": "2023-12-25",
"screens": 123
}
],
"screens_to_next_block": 123,
"unbilled_screens": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Your moderation usage.
Your billable screens per UTC day for the last 30 days, charged or not. A day with no screens is not in the list.
Show child attributes
Show child attributes
Billable screens still needed to fill the next block of 1000. A full block is charged within one hour, so this value is 1000 when your unbilled screens fill whole blocks.
Billable screens that Dodo Payments has not charged for yet.
Last modified on September 26, 2026
Was this page helpful?
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const response = await client.moderation.retrieveUsage();
console.log(response.daily);import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
response = client.moderation.retrieve_usage()
print(response.daily)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
response, err := client.Moderation.GetUsage(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Daily)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageParams;
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ModerationRetrieveUsageResponse response = client.moderation().retrieveUsage();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageParams
import com.dodopayments.api.models.moderation.ModerationRetrieveUsageResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: ModerationRetrieveUsageResponse = client.moderation().retrieveUsage()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.moderation.retrieve_usage
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$response = $client->moderation->retrieveUsage();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Moderation;
DodoPaymentsClient client = new();
ModerationRetrieveUsageParams parameters = new();
var response = await client.Moderation.RetrieveUsage(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.moderation()
.retrieve_usage()
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/moderation/usage \
--header 'Authorization: Bearer <token>'{
"daily": [
{
"date": "2023-12-25",
"screens": 123
}
],
"screens_to_next_block": 123,
"unbilled_screens": 123
}