Invoices
List Invoices
List invoice-led invoices, newest first, filtered by status, customer, subscription, dates, amount or collection method.
GET
/
billing
/
invoices
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 invoice of client.invoices.list()) {
console.log(invoice.amount_paid);
}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.invoices.list()
page = page.items[0]
print(page.amount_paid)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.Invoices.List(context.TODO(), dodopayments.InvoiceListParams{})
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.invoices.InvoiceListPage;
import com.dodopayments.api.models.invoices.InvoiceListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
InvoiceListPage page = client.invoices().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.invoices.InvoiceListPage
import com.dodopayments.api.models.invoices.InvoiceListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: InvoiceListPage = client.invoices().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.invoices.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->invoices->list(
collectionMethod: 'auto_charge',
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
customerID: 'customer_id',
dueAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
dueAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
pageNumber: 0,
pageSize: 0,
status: ['open'],
subscriptionID: 'subscription_id',
tags: ['refunded'],
totalAmountGte: 0,
totalAmountLte: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Invoices;
DodoPaymentsClient client = new();
InvoiceListParams parameters = new();
var page = await client.Invoices.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
.invoices()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/billing/invoices \
--header 'Authorization: Bearer <token>'{
"items": [
{
"allowed_actions": [
"edit"
],
"amount_due": 123,
"amount_paid": 123,
"amount_refunded": 123,
"billing_mode": "normal",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credits": 123,
"currency": "AED",
"customer": {
"billing_address": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"cc_emails": [
"<string>"
],
"customer_id": "<string>",
"email": "<string>",
"tax_id": "<string>"
},
"discount_ids": [
"<string>"
],
"editable_fields": [
"customer"
],
"frequency": {
"type": "one_time"
},
"invoice_id": "<string>",
"metadata": {},
"refund_ids": [
"<string>"
],
"retry_count": 123,
"review_required": true,
"row_version": 123,
"status": "open",
"subscription_ids": [
"<string>"
],
"tags": [
"refunded"
],
"tax": 123,
"total_amount": 123,
"collection_method": "auto_charge",
"due_at": "2023-11-07T05:31:56Z",
"dunning_state": "not_started",
"finalized_at": "2023-11-07T05:31:56Z",
"hosted_url": "<string>",
"lines": [
{
"amount": 123,
"kind": "subscription",
"quantity": 123,
"tax": 123,
"tax_inclusive": true,
"unit_amount": 123,
"addon_id": "<string>",
"description": "<string>",
"name": "<string>",
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"product_id": "<string>",
"subscription_id": "<string>",
"tax_rate": 123
}
],
"memo": "<string>",
"next_reminder_at": "2023-11-07T05:31:56Z",
"next_retry_at": "2023-11-07T05:31:56Z",
"payment_method_id": "<string>",
"payment_terms_days": 123,
"payments": [
{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"retry_attempt": 123,
"status": "succeeded"
}
],
"pdf_url": "<string>",
"reminder_settings": {
"kind": "snapshot",
"offsets_minutes": [
123
],
"paused": true,
"reminders_enabled": true
},
"review_deadline": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Send your API key as a bearer token: Authorization: Bearer <api_key>. A test mode key starts with dodo_test_, for example dodo_test_AbCd1234EfGh5678.<secret>. A live mode key starts with dodo_live_. Use a test mode key on test.dodopayments.com and a live mode key on live.dodopayments.com. Keys from before these tags have no tag and operate as before.
Query Parameters
Last modified on November 10, 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 invoice of client.invoices.list()) {
console.log(invoice.amount_paid);
}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.invoices.list()
page = page.items[0]
print(page.amount_paid)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.Invoices.List(context.TODO(), dodopayments.InvoiceListParams{})
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.invoices.InvoiceListPage;
import com.dodopayments.api.models.invoices.InvoiceListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
InvoiceListPage page = client.invoices().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.invoices.InvoiceListPage
import com.dodopayments.api.models.invoices.InvoiceListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: InvoiceListPage = client.invoices().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.invoices.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->invoices->list(
collectionMethod: 'auto_charge',
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
customerID: 'customer_id',
dueAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
dueAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
pageNumber: 0,
pageSize: 0,
status: ['open'],
subscriptionID: 'subscription_id',
tags: ['refunded'],
totalAmountGte: 0,
totalAmountLte: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Invoices;
DodoPaymentsClient client = new();
InvoiceListParams parameters = new();
var page = await client.Invoices.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
.invoices()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/billing/invoices \
--header 'Authorization: Bearer <token>'{
"items": [
{
"allowed_actions": [
"edit"
],
"amount_due": 123,
"amount_paid": 123,
"amount_refunded": 123,
"billing_mode": "normal",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"credits": 123,
"currency": "AED",
"customer": {
"billing_address": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"cc_emails": [
"<string>"
],
"customer_id": "<string>",
"email": "<string>",
"tax_id": "<string>"
},
"discount_ids": [
"<string>"
],
"editable_fields": [
"customer"
],
"frequency": {
"type": "one_time"
},
"invoice_id": "<string>",
"metadata": {},
"refund_ids": [
"<string>"
],
"retry_count": 123,
"review_required": true,
"row_version": 123,
"status": "open",
"subscription_ids": [
"<string>"
],
"tags": [
"refunded"
],
"tax": 123,
"total_amount": 123,
"collection_method": "auto_charge",
"due_at": "2023-11-07T05:31:56Z",
"dunning_state": "not_started",
"finalized_at": "2023-11-07T05:31:56Z",
"hosted_url": "<string>",
"lines": [
{
"amount": 123,
"kind": "subscription",
"quantity": 123,
"tax": 123,
"tax_inclusive": true,
"unit_amount": 123,
"addon_id": "<string>",
"description": "<string>",
"name": "<string>",
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"product_id": "<string>",
"subscription_id": "<string>",
"tax_rate": 123
}
],
"memo": "<string>",
"next_reminder_at": "2023-11-07T05:31:56Z",
"next_retry_at": "2023-11-07T05:31:56Z",
"payment_method_id": "<string>",
"payment_terms_days": 123,
"payments": [
{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment_id": "<string>",
"retry_attempt": 123,
"status": "succeeded"
}
],
"pdf_url": "<string>",
"reminder_settings": {
"kind": "snapshot",
"offsets_minutes": [
123
],
"paused": true,
"reminders_enabled": true
},
"review_deadline": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
]
}