Search
client.invoices.search(InvoiceSearchParams { filter, page_info } body, RequestOptionsoptions?): InvoiceSearchResponse { data }
POST/invoices/search
Searches invoices
Parameters
Returns
Search
import Fragment from '@fragment-dev/ts-node';
const client = new Fragment();
const response = await client.invoices.search({
filter: {},
page_info: {},
});
console.log(response.data);{
"data": {
"invoices": [
{
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
],
"payments": [
{
"amount": "150",
"currency": "USD",
"posted": "2026-02-12T00:00:00.000Z",
"transaction": {
"id": "txn_dHhuX2ZyYWdfMDAx",
"external_id": "bank_txn_123",
"tags": [
{
"key": "region",
"value": "us-east"
}
]
},
"type": "payin",
"user": {
"id": "user_abc123",
"external_id": "user-ext-001"
}
}
],
"users": [
{
"id": "user_ext_789",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
]
}
]
}
],
"page_info": {
"next_cursor": "next_cursor"
}
}
}Returns Examples
{
"data": {
"invoices": [
{
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
],
"payments": [
{
"amount": "150",
"currency": "USD",
"posted": "2026-02-12T00:00:00.000Z",
"transaction": {
"id": "txn_dHhuX2ZyYWdfMDAx",
"external_id": "bank_txn_123",
"tags": [
{
"key": "region",
"value": "us-east"
}
]
},
"type": "payin",
"user": {
"id": "user_abc123",
"external_id": "user-ext-001"
}
}
],
"users": [
{
"id": "user_ext_789",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
]
}
]
}
],
"page_info": {
"next_cursor": "next_cursor"
}
}
}