Create
POST/invoices
Creates a new invoice
Body ParametersJSON
invoice_id: string
Unique identifier for the invoice. Make this the canonical ID from your system for the transaction.
Returns
Create
curl https://api.us-west-2.fragment.dev/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"
}
]
}'{
"data": {
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}Returns Examples
{
"data": {
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}