Gets an invoice by ID with balance details
Parameters
id: str
Invoice ID
Returns
Retrieve
from fragment import Fragment
client = Fragment()
invoice = client.invoices.retrieve(
"inv_1234567890",
)
print(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"
}
}