Skip to content

Create Batch Get

invoices.create_batch_get(InvoiceCreateBatchGetParams**kwargs) -> InvoiceCreateBatchGetResponse
POST/invoices/batch-get

Retrieves multiple invoices.

ParametersExpand Collapse
ids: SequenceNotStr[str]

Invoice ids to retrieve. Up to 200 per request.

ReturnsExpand Collapse
class InvoiceCreateBatchGetResponse:

Result of a batch invoice retrieval.

data: Data

Result of a batch invoice retrieval.

invoices: List[DataInvoice]

Invoices that were found, in request order.

balances: List[DataInvoiceBalance]

Invoice-level balances by currency.

currency: str

ISO 4217 or crypto currency code.

net: DataInvoiceBalanceNet

Net balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

payins: DataInvoiceBalancePayins

Payins balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

payouts: DataInvoiceBalancePayouts

Payouts balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

payments: List[DataInvoicePayment]

Payments allocated to the invoice.

amount: str

Amount allocated as a string in the smallest currency unit, such as cents for USD.

currency: Literal["ADA", "BTC", "DAI", 176 more]

ISO 4217 or crypto currency code.

Accepts one of the following:
"ADA"
"BTC"
"DAI"
"ETH"
"SOL"
"USDC"
"USDT"
"USDG"
"EURC"
"CADC"
"CADT"
"XLM"
"UNI"
"BCH"
"LTC"
"AAVE"
"LINK"
"MATIC"
"PTS"
"AED"
"AFN"
"ALL"
"AMD"
"ANG"
"AOA"
"ARS"
"AUD"
"AWG"
"AZN"
"BAM"
"BBD"
"BDT"
"BGN"
"BHD"
"BIF"
"BMD"
"BND"
"BOB"
"BRL"
"BSD"
"BTN"
"BWP"
"BYR"
"BZD"
"CAD"
"CDF"
"CHF"
"CLP"
"CNY"
"COP"
"CRC"
"CUC"
"CUP"
"CVE"
"CZK"
"DJF"
"DKK"
"DOP"
"DZD"
"EGP"
"ERN"
"ETB"
"EUR"
"FJD"
"FKP"
"GBP"
"GEL"
"GGP"
"GHS"
"GIP"
"GMD"
"GNF"
"GTQ"
"GYD"
"HKD"
"HNL"
"HRK"
"HTG"
"HUF"
"IDR"
"ILS"
"IMP"
"INR"
"IQD"
"IRR"
"ISK"
"JMD"
"JOD"
"JPY"
"KES"
"KGS"
"KHR"
"KMF"
"KPW"
"KRW"
"KWD"
"KYD"
"KZT"
"LAK"
"LBP"
"LKR"
"LRD"
"LSL"
"LYD"
"MAD"
"MDL"
"MGA"
"MKD"
"MMK"
"MNT"
"MOP"
"MUR"
"MVR"
"MWK"
"MXN"
"MYR"
"MZN"
"NAD"
"NGN"
"NIO"
"NOK"
"NPR"
"NZD"
"OMR"
"PAB"
"PEN"
"PGK"
"PHP"
"PKR"
"PLN"
"PYG"
"QAR"
"RON"
"RSD"
"RUB"
"RWF"
"SAR"
"SBD"
"SCR"
"SDG"
"SEK"
"SGD"
"SHP"
"SLL"
"SOS"
"SPL"
"SRD"
"SVC"
"SYP"
"STN"
"SZL"
"THB"
"TJS"
"TMT"
"TND"
"TOP"
"TRY"
"TTD"
"TVD"
"TWD"
"TZS"
"UAH"
"UGX"
"USD"
"UYU"
"UZS"
"VEF"
"VND"
"VUV"
"WST"
"XAF"
"XCD"
"XOF"
"XPF"
"YER"
"ZAR"
"ZMW"
"LOGICAL"
"CUSTOM"
posted: datetime

Timestamp when the parent transaction was posted. Uses ISO 8601 format.

formatdate-time
transaction: DataInvoicePaymentTransaction

Transaction the payment is applied to.

id: str

FRAGMENT generated unique ID.

external_id: str

User-provided unique ID.

tags: List[DataInvoicePaymentTransactionTag]

Tags from the parent transaction.

key: str

Tag key.

value: str

Tag value.

type: Literal["payin", "payout"]

Type of the payment.

Accepts one of the following:
"payin"
"payout"
user: DataInvoicePaymentUser

User associated with the payment.

id: str

FRAGMENT generated unique ID.

external_id: str

User-provided unique ID.

users: List[DataInvoiceUser]

Users involved in the invoice.

id: str

User-provided unique external ID.

balances: List[DataInvoiceUserBalance]

Per-currency balance breakdown for the user.

currency: str

ISO 4217 or crypto currency code.

net: DataInvoiceUserBalanceNet

Net balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

payins: DataInvoiceUserBalancePayins

Payins balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

payouts: DataInvoiceUserBalancePayouts

Payouts balance breakdown.

actual: str

Actual amount as a string in the smallest currency unit, such as cents for USD.

expected: str

Expected amount as a string in the smallest currency unit, such as cents for USD.

remaining: str

Remaining amount as a string in the smallest currency unit, such as cents for USD.

external_id: str

User-provided unique ID.

not_found: List[str]

Ids from the request that did not match any invoice.

Create Batch Get

from fragment import Fragment

client = Fragment()
response = client.invoices.create_batch_get(
    ids=["string"],
)
print(response.data)
{
  "data": {
    "invoices": [
      {
        "id": "inv_1234567890",
        "created": "2024-01-13T00:00:00Z",
        "status": "active",
        "tags": [
          {
            "key": "department",
            "value": "engineering"
          }
        ],
        "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": "department",
                "value": "engineering"
              }
            ],
            "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": "2024-01-13T00:00:00Z",
            "transaction": {
              "id": "txn_dHhuX2ZyYWdfMDAx",
              "external_id": "bank_txn_123",
              "tags": [
                {
                  "key": "department",
                  "value": "engineering"
                }
              ]
            },
            "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"
                }
              }
            ],
            "external_id": "user_ext_789"
          }
        ]
      }
    ],
    "not_found": [
      "string"
    ]
  }
}
Returns Examples
{
  "data": {
    "invoices": [
      {
        "id": "inv_1234567890",
        "created": "2024-01-13T00:00:00Z",
        "status": "active",
        "tags": [
          {
            "key": "department",
            "value": "engineering"
          }
        ],
        "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": "department",
                "value": "engineering"
              }
            ],
            "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": "2024-01-13T00:00:00Z",
            "transaction": {
              "id": "txn_dHhuX2ZyYWdfMDAx",
              "external_id": "bank_txn_123",
              "tags": [
                {
                  "key": "department",
                  "value": "engineering"
                }
              ]
            },
            "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"
                }
              }
            ],
            "external_id": "user_ext_789"
          }
        ]
      }
    ],
    "not_found": [
      "string"
    ]
  }
}