# Invoices ## Create **post** `/invoices` Creates an invoice. ### Body Parameters - `invoice_id: string` Unique ID for the invoice. - `line_items: array of object { description, product_id, type, 5 more }` Line items to create with the invoice. - `description: string` Description of the line item. - `product_id: string` Unique identifier for the product. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user: object { id } or object { external_id }` Identifies a user by `id` or `external_id`. - `ID object { id }` - `id: string` FRAGMENT generated unique ID. - `ExternalID object { external_id }` - `external_id: string` User-provided unique ID. - `amount: optional string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price instead. - `currency_code: optional "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `price: optional object { amount, quantity, unit_price }` Price breakdown. Provide amount, or unit_price and quantity, or all three. - `amount: optional string` Total amount as a string in the smallest currency unit, such as cents for USD. Required if unit_price and quantity are not provided. - `quantity: optional number` Number of units for the line item. - `unit_price: optional string` Price per unit as a string in the smallest currency unit, such as cents for USD. - `tags: optional array of object { key, value }` Tags for the line item. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `tags: optional array of object { key, value }` Tags for the invoice. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. ### Returns - `data: Invoice` Invoice object. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices \ -H 'Content-Type: application/json' \ -d '{ "invoice_id": "invoice_2024_001", "line_items": [ { "description": "Professional services for January 2026", "product_id": "prod_1234567890", "type": "payout", "user": { "id": "user_abc123" }, "amount": "1000", "currency_code": "USD" } ] }' ``` #### Response ```json { "data": { "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" } } ``` ## Create Batch Get **post** `/invoices/batch-get` Retrieves multiple invoices. ### Body Parameters - `ids: array of string` Invoice ids to retrieve. Up to 200 per request. ### Returns - `data: object { invoices, not_found }` Result of a batch invoice retrieval. - `invoices: array of Invoice` Invoices that were found, in request order. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. - `not_found: array of string` Ids from the request that did not match any invoice. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices/batch-get \ -H 'Content-Type: application/json' \ -d '{ "ids": [ "string" ] }' ``` #### Response ```json { "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" ] } } ``` ## List **get** `/invoices` Lists all invoices. ### Returns - `data: array of Invoice` List of invoices. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices ``` #### Response ```json { "data": [ { "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" } ] } ``` ## List History **get** `/invoices/{id}/history` Retrieves the version history of an invoice. ### Path Parameters - `id: string` Unique identifier for the invoice. ### Returns - `data: array of Invoice` Version history of the invoice. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices/$ID/history ``` #### Response ```json { "data": [ { "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" } ] } ``` ## Retrieve **get** `/invoices/{id}` Retrieves an invoice. ### Path Parameters - `id: string` Unique identifier for the invoice. ### Returns - `data: Invoice` Invoice with balance details. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices/$ID ``` #### Response ```json { "data": { "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" } ] } } ``` ## Search **post** `/invoices/search` Searches invoices. ### Body Parameters - `filter: object { created, modified, status, 4 more }` Filter criteria for the search. - `created: optional object { after, before }` Filter by invoice creation timestamp. When both `after` and `before` are provided, results must fall in the range. - `after: optional string` Returns invoices created at or after the timestamp. ISO 8601 datetime. - `before: optional string` Returns invoices created at or before the timestamp. ISO 8601 datetime. - `modified: optional object { after, before }` Filter by invoice last modified timestamp. When both `after` and `before` are provided, results must fall in the range. - `after: optional string` Returns invoices last modified at or after the timestamp. ISO 8601 datetime. - `before: optional string` Returns invoices last modified at or before the timestamp. ISO 8601 datetime. - `status: optional "open"` Filter by invoice status. `open` returns invoices with non-zero clearing account balances. Pagination is disabled when this filter is set; any `page_info` provided in the request is ignored. - `"open"` - `tags: optional object { all, any }` Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`. - `all: optional array of object { key, value }` Returns invoices matching every specified tag, using AND logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `any: optional array of object { key, value }` Returns invoices matching at least one of the specified tags, using OR logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `transaction_tags: optional object { all, any }` Filter invoices by tags on transactions allocated to them. Returns invoices that have at least one allocated transaction matching the specified tags. - `all: optional array of object { key, value }` Returns transactions matching every specified tag, using AND logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `any: optional array of object { key, value }` Returns transactions matching at least one of the specified tags, using OR logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `user_tag_and_balance: optional object { net_remaining_balance, user_tags }` Returns invoices where at least one line item user, optionally restricted to users matching `user_tags`, has a per-invoice net remaining balance satisfying `net_remaining_balance` on any currency. Pagination is disabled when this filter is set; any `page_info` provided in the request is ignored. - `net_remaining_balance: object { eq, gt, gte, 3 more }` Numeric comparator for the per-user net remaining balance on the invoice. Multiple keys combine with AND logic. - `eq: optional string` Equal to. Decimal integer string in the smallest currency unit, such as cents for USD. - `gt: optional string` Strictly greater than. Decimal integer string in the smallest currency unit, such as cents for USD. - `gte: optional string` Greater than or equal to. Decimal integer string in the smallest currency unit, such as cents for USD. - `lt: optional string` Strictly less than. Decimal integer string in the smallest currency unit, such as cents for USD. - `lte: optional string` Less than or equal to. Decimal integer string in the smallest currency unit, such as cents for USD. - `ne: optional string` Not equal to. Decimal integer string in the smallest currency unit, such as cents for USD. - `user_tags: optional object { all, any, not_any }` Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`. - `all: optional array of object { key, value }` Returns users matching every specified tag, using AND logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `any: optional array of object { key, value }` Returns users matching at least one of the specified tags, using OR logic. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `not_any: optional array of object { key, value }` Returns users that do not match any of the specified tags. - `key: string` Tag key to filter on. Must be an exact match; wildcards are not supported. - `value: string` Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key. - `users: optional object { all, any }` Line item user filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`. - `all: optional array of object { id } or object { external_id }` Returns invoices matching every specified line item user, using AND logic. - `ID object { id }` - `id: string` FRAGMENT generated unique ID. - `ExternalID object { external_id }` - `external_id: string` User-provided unique ID. - `any: optional array of object { id } or object { external_id }` Returns invoices matching at least one of the specified line item users, using OR logic. - `ID object { id }` - `id: string` FRAGMENT generated unique ID. - `ExternalID object { external_id }` - `external_id: string` User-provided unique ID. - `page_info: optional object { after, limit }` Pagination parameters. - `after: optional string` Cursor for fetching the next page of results. - `limit: optional number` Number of results to return. Defaults to 20. ### Returns - `data: object { invoices, page_info }` Search results for invoices. - `invoices: array of Invoice` Invoices matching the search criteria. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. - `page_info: object { next_cursor }` Pagination cursors. - `next_cursor: optional string` Cursor to fetch the next page of results. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices/search \ -H 'Content-Type: application/json' \ -d '{ "filter": {} }' ``` #### Response ```json { "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" } ] } ], "page_info": { "next_cursor": "next_cursor" } } } ``` ## Update **patch** `/invoices/{id}` Updates an invoice. ### Path Parameters - `id: string` Unique identifier for the invoice. ### Body Parameters - `current_invoice_version: number` Current version of the invoice. Must match the stored version. - `line_items: optional object { create, delete, update }` Line item updates. - `create: optional array of object { description, product_id, type, 5 more }` Line items to add to the invoice. - `description: string` Description of the line item. - `product_id: string` Unique identifier for the product. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user: object { id } or object { external_id }` Identifies a user by `id` or `external_id`. - `ID object { id }` - `id: string` FRAGMENT generated unique ID. - `ExternalID object { external_id }` - `external_id: string` User-provided unique ID. - `amount: optional string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price instead. - `currency_code: optional "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `price: optional object { amount, quantity, unit_price }` Price breakdown. Provide amount, or unit_price and quantity, or all three. - `amount: optional string` Total amount as a string in the smallest currency unit, such as cents for USD. Required if unit_price and quantity are not provided. - `quantity: optional number` Number of units for the line item. - `unit_price: optional string` Price per unit as a string in the smallest currency unit, such as cents for USD. - `tags: optional array of object { key, value }` Tags for the line item. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `delete: optional array of object { id }` Line items to remove from the invoice. - `id: string` Unique identifier for the line item to delete. - `update: optional array of object { id, description, price, tags }` Existing line items to update. - `id: string` Unique identifier for the line item to update. - `description: optional string` - `price: optional object { quantity, unit_price, amount }` - `quantity: number` Number of units for the line item. - `unit_price: string` Price per unit as a string in the smallest currency unit, such as cents for USD. - `amount: optional string` Total amount as a string in the smallest currency unit, such as cents for USD. - `tags: optional object { create, delete, set, update }` Tag updates. - `create: optional array of object { key, value }` Tags to create. The tag key must not already exist. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `delete: optional array of object { key }` Tags to remove. - `key: string` Tag key to delete. - `set: optional array of object { key, value }` Tags to set. Creates a new tag or updates an existing tag. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `update: optional array of object { key, value }` Tags to update. The tag key must already exist. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `tags: optional object { create, delete, set, update }` Tag updates. - `create: optional array of object { key, value }` Tags to create. The tag key must not already exist. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `delete: optional array of object { key }` Tags to remove. - `key: string` Tag key to delete. - `set: optional array of object { key, value }` Tags to set. Creates a new tag or updates an existing tag. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. - `update: optional array of object { key, value }` Tags to update. The tag key must already exist. - `key: string` Tag key. Must not contain #, /, or :. Max 50 characters. - `value: string` Tag value. Must not contain #, /, or :. Max 200 characters. ### Returns - `data: Invoice` Invoice object. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Example ```http curl https://api.us-west-2.fragment.dev/billing/invoices/$ID \ -X PATCH \ -H 'Content-Type: application/json' \ -d '{ "current_invoice_version": 3, "line_items": { "update": [ { "id": "li_1234567890", "price": { "quantity": 2, "unit_price": "500", "amount": "2000" } } ] }, "tags": { "set": [ { "key": "department", "value": "engineering" } ] } }' ``` #### Response ```json { "data": { "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" } } ``` ## Domain Types ### Invoice - `Invoice object { id, created, status, 5 more }` Invoice object. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Invoice Create Response - `InvoiceCreateResponse object { data }` - `data: Invoice` Invoice object. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Invoice Create Batch Get Response - `InvoiceCreateBatchGetResponse object { data }` Result of a batch invoice retrieval. - `data: object { invoices, not_found }` Result of a batch invoice retrieval. - `invoices: array of Invoice` Invoices that were found, in request order. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. - `not_found: array of string` Ids from the request that did not match any invoice. ### Invoice List Response - `InvoiceListResponse object { data }` - `data: array of Invoice` List of invoices. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Invoice List History Response - `InvoiceListHistoryResponse object { data }` - `data: array of Invoice` Version history of the invoice. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format. ### Invoice Retrieve Response - `InvoiceRetrieveResponse object { data }` - `data: Invoice` Invoice with balance details. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. ### Invoice Search Response - `InvoiceSearchResponse object { data }` Search results for invoices. - `data: object { invoices, page_info }` Search results for invoices. - `invoices: array of Invoice` Invoices matching the search criteria. - `balances: array of object { currency, net, payins, payouts }` Invoice-level balances by currency. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payments: array of object { amount, currency, posted, 3 more }` Payments allocated to the invoice. - `amount: string` Amount allocated as a string in the smallest currency unit, such as cents for USD. - `currency: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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: string` Timestamp when the parent transaction was posted. Uses ISO 8601 format. - `transaction: object { id, external_id, tags }` Transaction the payment is applied to. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `tags: array of object { key, value }` Tags from the parent transaction. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the payment. - `"payin"` - `"payout"` - `user: object { id, external_id }` User associated with the payment. - `id: string` FRAGMENT generated unique ID. - `external_id: string` User-provided unique ID. - `users: array of object { id, balances, external_id }` Users involved in the invoice. - `id: string` User-provided unique external ID. - `balances: array of object { currency, net, payins, payouts }` Per-currency balance breakdown for the user. - `currency: string` ISO 4217 or crypto currency code. - `net: object { actual, expected, remaining }` Net balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payins: object { actual, expected, remaining }` Payins balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `payouts: object { actual, expected, remaining }` Payouts balance breakdown. - `actual: string` Actual amount as a string in the smallest currency unit, such as cents for USD. - `expected: string` Expected amount as a string in the smallest currency unit, such as cents for USD. - `remaining: string` Remaining amount as a string in the smallest currency unit, such as cents for USD. - `external_id: string` User-provided unique ID. - `page_info: object { next_cursor }` Pagination cursors. - `next_cursor: optional string` Cursor to fetch the next page of results. ### Invoice Update Response - `InvoiceUpdateResponse object { data }` - `data: Invoice` Invoice object. - `id: string` Unique invoice ID. - `created: string` Timestamp when the invoice was created. Uses ISO 8601 format. - `status: "active"` Status of the invoice. Deprecated. - `"active"` - `tags: array of object { key, value }` Tags for the invoice. - `key: string` Tag key. - `value: string` Tag value. - `version: number` Current version of the invoice. - `workspace_id: string` Workspace the invoice belongs to. - `line_items: optional array of object { id, amount, currency_code, 6 more }` Line items for the invoice. - `id: string` FRAGMENT generated unique ID. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead. - `currency_code: "ADA" or "BTC" or "DAI" or 176 more` ISO 4217 or crypto currency code. - `"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"` - `description: string` Description of the line item. - `price: object { amount, quantity, unit_price }` Price breakdown. - `amount: string` Total amount as a string in the smallest currency unit, such as cents for USD. - `quantity: number` Number of units. - `unit_price: string` Unit price as a string in the smallest currency unit, such as cents for USD. - `product_id: string` Unique identifier for the product. - `tags: array of object { key, value }` Tags for the line item. - `key: string` Tag key. - `value: string` Tag value. - `type: "payin" or "payout"` Type of the line item. - `"payin"` - `"payout"` - `user_id: string` User-provided unique external ID. - `modified: optional string` Timestamp when the invoice was last modified. Uses ISO 8601 format.