Skip to main content
GET
/
payments
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 paymentListResponse of client.payments.list()) {
  console.log(paymentListResponse.brand_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.payments.list()
page = page.items[0]
print(page.brand_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.Payments.List(context.TODO(), dodopayments.PaymentListParams{})
	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.payments.PaymentListPage;
import com.dodopayments.api.models.payments.PaymentListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

        PaymentListPage page = client.payments().list();
    }
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.payments.PaymentListPage
import com.dodopayments.api.models.payments.PaymentListParams

fun main() {
    val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

    val page: PaymentListPage = client.payments().list()
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
  bearer_token: "My Bearer Token",
  environment: "test_mode" # defaults to "live_mode"
)

page = dodo_payments.payments.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->payments->list(
    brandID: 'brand_id',
    createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
    createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
    customerID: 'customer_id',
    pageNumber: 0,
    pageSize: 0,
    productID: 'product_id',
    status: 'succeeded',
    subscriptionID: 'subscription_id',
  );

  var_dump($page);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Payments;

DodoPaymentsClient client = new();

PaymentListParams parameters = new();

var page = await client.Payments.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
        .payments()
        .list()
        .query(serde_json::json!({}))
        .await?;
    println!("{result:?}");
    Ok(())
}
curl --request GET \
  --url https://test.dodopayments.com/payments \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "brand_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "customer": {
        "customer_id": "<string>",
        "email": "<string>",
        "name": "<string>",
        "metadata": {},
        "phone_number": "<string>"
      },
      "digital_products_delivered": true,
      "has_license_key": true,
      "metadata": {},
      "payment_id": "<string>",
      "total_amount": 123,
      "card_last_four": "<string>",
      "card_network": "<string>",
      "invoice_id": "<string>",
      "invoice_url": "<string>",
      "payment_method": "<string>",
      "payment_method_type": "<string>",
      "subscription_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

created_at_gte
string<date-time>

Get events after this created time

created_at_lte
string<date-time>

Get events created before this time

page_size
integer<int32>

Page size default is 10 max is 100

Required range: x >= 0
page_number
integer<int32>

Page number default is 0

Required range: x >= 0
customer_id
string

Filter by customer id

subscription_id
string

Filter by subscription id

status
enum<string>

Filter by status

Available options:
succeeded,
failed,
cancelled,
processing,
requires_customer_action,
requires_merchant_action,
requires_payment_method,
requires_confirmation,
requires_capture,
partially_captured,
partially_captured_and_capturable
brand_id
string

filter by Brand id

product_id
string

Filter by product id

Response

items
object[]
required
Last modified on March 25, 2026