Customer Blocklist
List Blocked Customers
List the customers on your blocklist, with filters and a total count.
GET
/
blocklist
/
customers
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const blockedCustomer of client.blocklist.customers.list()) {
console.log(blockedCustomer.id);
}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
)
page = client.blocklist.customers.list()
page = page.items[0]
print(page.id)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"),
)
page, err := client.Blocklist.Customers.List(context.TODO(), dodopayments.BlocklistCustomerListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.blocklist.customers.CustomerListPage;
import com.dodopayments.api.models.blocklist.customers.CustomerListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListPage page = client.blocklist().customers().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.blocklist.customers.CustomerListPage
import com.dodopayments.api.models.blocklist.customers.CustomerListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: CustomerListPage = client.blocklist().customers().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.blocklist.customers.list
puts(page)<?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 {
$page = $client->blocklist->customers->list(
blockedByEmail: 'blocked_by_email',
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
identifier: 'identifier',
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Blocklist.Customers;
DodoPaymentsClient client = new();
CustomerListParams parameters = new();
var page = await client.Blocklist.Customers.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.blocklist()
.customers()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/blocklist/customers \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"customer_email": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"id": "<string>",
"identifier": "<string>",
"source": "blocklist_page",
"blocked_by_email": "<string>",
"cancelled_subscription_ids": [
"<string>"
],
"notes": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"note": "<string>",
"author_email": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"reason": "<string>",
"remaining_subscription_ids": [
"<string>"
],
"subscriptions_swept": true,
"unblocked_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Partial, case-insensitive match on the email and on the customer id.
Filter by the dashboard user who blocked the customer.
Blocked on or after this time.
Blocked on or before this time.
Page size. Default 10, maximum 100.
Required range:
x >= 0Page number. Default 0.
Required range:
x >= 0Last modified on October 28, 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
});
// Automatically fetches more pages as needed.
for await (const blockedCustomer of client.blocklist.customers.list()) {
console.log(blockedCustomer.id);
}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
)
page = client.blocklist.customers.list()
page = page.items[0]
print(page.id)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"),
)
page, err := client.Blocklist.Customers.List(context.TODO(), dodopayments.BlocklistCustomerListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.blocklist.customers.CustomerListPage;
import com.dodopayments.api.models.blocklist.customers.CustomerListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
CustomerListPage page = client.blocklist().customers().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.blocklist.customers.CustomerListPage
import com.dodopayments.api.models.blocklist.customers.CustomerListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: CustomerListPage = client.blocklist().customers().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.blocklist.customers.list
puts(page)<?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 {
$page = $client->blocklist->customers->list(
blockedByEmail: 'blocked_by_email',
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
identifier: 'identifier',
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Blocklist.Customers;
DodoPaymentsClient client = new();
CustomerListParams parameters = new();
var page = await client.Blocklist.Customers.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.blocklist()
.customers()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/blocklist/customers \
--header 'Authorization: Bearer <token>'{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"customer_email": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"id": "<string>",
"identifier": "<string>",
"source": "blocklist_page",
"blocked_by_email": "<string>",
"cancelled_subscription_ids": [
"<string>"
],
"notes": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"note": "<string>",
"author_email": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"reason": "<string>",
"remaining_subscription_ids": [
"<string>"
],
"subscriptions_swept": true,
"unblocked_at": "2023-11-07T05:31:56Z"
}
],
"total": 123
}