Retrieve
client.invoices.retrieve(stringid, RequestOptionsoptions?): InvoiceRetrieveResponse { data }
GET/invoices/{id}
Gets an invoice by ID with balance details
Parameters
id: string
Invoice ID
Returns
Retrieve
import Fragment from '@fragment-dev/ts-node';
const client = new Fragment();
const invoice = await client.invoices.retrieve('inv_1234567890');
console.log(invoice.data);{
"data": {
"id": "inv_1234567890",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
],
"created": "2024-01-13T00:00:00Z",
"status": "active",
"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"
}
}
]
}
],
"version": 1,
"workspaceId": "ws_1234567890",
"lineItems": [
{
"id": "item_1234567890",
"amount": "1000",
"currencyCode": "USD",
"description": "Professional services for January 2026",
"product_id": "prod_1234567890",
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}Returns Examples
{
"data": {
"id": "inv_1234567890",
"balances": [
{
"currency": "USD",
"net": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payins": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
},
"payouts": {
"actual": "5000",
"expected": "10000",
"remaining": "5000"
}
}
],
"created": "2024-01-13T00:00:00Z",
"status": "active",
"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"
}
}
]
}
],
"version": 1,
"workspaceId": "ws_1234567890",
"lineItems": [
{
"id": "item_1234567890",
"amount": "1000",
"currencyCode": "USD",
"description": "Professional services for January 2026",
"product_id": "prod_1234567890",
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}