curl --request POST \
--url https://api.hyperline.co/v2/invoices/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"customer_id": "cus_Typ0px2W0aiEtl",
"line_items": [
{
"name": "Platform access",
"unit_amount": 24000,
"description": "Access fee for the period of November 2024",
"units_count": 1,
"tax_rate": 20,
"period_start": "2024-10-13T00:00:00.000Z",
"period_end": "2024-11-13T00:00:00.000Z",
"display_unit_amount": true,
"display_service_period": false,
"product_id": "itm_KbLcWt2qm5p1S2"
}
],
"batch_invoice_id": "invoice-123",
"currency": "EUR",
"status": "paid",
"invoicing_entity_id": "ive_47484fjdhy5",
"number": "INV-35",
"type": "invoice",
"document_name": "<string>",
"reference": "V0KAHOU6J3",
"purchase_order": "PO-12345",
"custom_note": "Thank you for your purchase!",
"additional_info": "This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied.",
"footer": "ACME (Acme SAS) is a company registered in France | SIREN N°123456",
"tax_rate": 50,
"tax_scheme": "auto",
"payment_method_strategy": "external",
"payment_method_id": "pm_1ryTrMj4TTAT1N",
"bank_account_id": "bac_KJyPrMA1toAqRG",
"emitted_at": "2024-10-13T00:00:00.000Z",
"due_at": "2024-11-12T00:00:00.000Z",
"settled_at": "2024-10-15T14:01:56.000Z",
"properties": {},
"transactions": [
{
"amount": 31500,
"process_at": "2024-11-12T07:38:39.222Z",
"payment_method_id": "pm_1xMpj5bwRqN7LM"
}
],
"coupons": [
{
"coupon_id": "cou_1eTaiytfA0i2Vb",
"name": "Black Friday 2023",
"discount_amount": 500,
"line_item_indexes": [
0,
1
]
}
]
}
],
"batch_id": "f65f58f3-ecb0-4711-be22-1e64102a380d"
}
'{
"batch_id": "f65f58f3-ecb0-4711-be22-1e64102a380d"
}Create invoices async in batch (max 50). Results can be tracked via webhooks.
curl --request POST \
--url https://api.hyperline.co/v2/invoices/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoices": [
{
"customer_id": "cus_Typ0px2W0aiEtl",
"line_items": [
{
"name": "Platform access",
"unit_amount": 24000,
"description": "Access fee for the period of November 2024",
"units_count": 1,
"tax_rate": 20,
"period_start": "2024-10-13T00:00:00.000Z",
"period_end": "2024-11-13T00:00:00.000Z",
"display_unit_amount": true,
"display_service_period": false,
"product_id": "itm_KbLcWt2qm5p1S2"
}
],
"batch_invoice_id": "invoice-123",
"currency": "EUR",
"status": "paid",
"invoicing_entity_id": "ive_47484fjdhy5",
"number": "INV-35",
"type": "invoice",
"document_name": "<string>",
"reference": "V0KAHOU6J3",
"purchase_order": "PO-12345",
"custom_note": "Thank you for your purchase!",
"additional_info": "This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied.",
"footer": "ACME (Acme SAS) is a company registered in France | SIREN N°123456",
"tax_rate": 50,
"tax_scheme": "auto",
"payment_method_strategy": "external",
"payment_method_id": "pm_1ryTrMj4TTAT1N",
"bank_account_id": "bac_KJyPrMA1toAqRG",
"emitted_at": "2024-10-13T00:00:00.000Z",
"due_at": "2024-11-12T00:00:00.000Z",
"settled_at": "2024-10-15T14:01:56.000Z",
"properties": {},
"transactions": [
{
"amount": 31500,
"process_at": "2024-11-12T07:38:39.222Z",
"payment_method_id": "pm_1xMpj5bwRqN7LM"
}
],
"coupons": [
{
"coupon_id": "cou_1eTaiytfA0i2Vb",
"name": "Black Friday 2023",
"discount_amount": 500,
"line_item_indexes": [
0,
1
]
}
]
}
],
"batch_id": "f65f58f3-ecb0-4711-be22-1e64102a380d"
}
'{
"batch_id": "f65f58f3-ecb0-4711-be22-1e64102a380d"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Create invoices payload.
Identifier of the batch request.
"f65f58f3-ecb0-4711-be22-1e64102a380d"
Was this page helpful?