POST
/
v1
/
invoices
/
{id}
/
transactions
curl --request POST \
  --url https://api.hyperline.co/v1/invoices/{id}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 31500,
  "process_at": "2023-11-12T07:38:39.222Z"
}'
{
  "id": "inv_1eTaiytfA0i2Va",
  "number": "INV-35",
  "type": "invoice",
  "document_name": "<string>",
  "status": "paid",
  "reference": "V0KAHOU6J3",
  "purchase_order": "PO-12345",
  "original_invoice_id": "<string>",
  "original_invoice_number": "<string>",
  "currency": "EUR",
  "total_amount": 24000,
  "amount_due": 123,
  "amount_paid": 24000,
  "amount_fixed": 20000,
  "amount_excluding_tax": 20000,
  "tax_rate": 20,
  "tax_amount": 4000,
  "tax_scheme": "standard",
  "discount_amount": 123,
  "conversion_rate": 1,
  "converted_amount": 24000,
  "converted_at": "2023-10-13T02:00:00.000Z",
  "payment_method_id": "pm_1ryTrMj4TTAT1N",
  "attempt_count": 123,
  "customer": {
    "id": "cus_Typ0px2W0aiEtl",
    "name": "Acme",
    "email": "billing@acme.com",
    "external_id": "<string>",
    "vat_number": "FR123456789",
    "address": {
      "name": "Acme",
      "line1": "5 rue de Paradis",
      "line2": "<string>",
      "city": "Paris",
      "zip": "75010",
      "state": "<string>",
      "country": "FR"
    }
  },
  "seller": {
    "id": "ive_47484fjdhy5",
    "name": "Name of the invoicing entity",
    "tax_id": "FR5878986578",
    "address": {
      "name": "Acme",
      "line1": "5 rue de Paradis",
      "line2": "<string>",
      "city": "Paris",
      "zip": "75010",
      "state": "<string>",
      "country": "FR"
    }
  },
  "subscription_id": "sub_amiaWZ3lzDIWaoT",
  "period_starts_at": "2023-10-13T00:00:00.000Z",
  "period_ends_at": "2023-11-13T00:00:00.000Z",
  "emitted_at": "2023-10-13T00:00:00.000Z",
  "due_at": "2023-11-12T00:00:00.000Z",
  "refunded_at": "2023-11-07T05:31:56Z",
  "grace_period_ended_at": "2023-11-07T05:31:56Z",
  "settled_at": "2023-10-15T14:01:56.000Z",
  "transactions": [
    {
      "id": "tra_2QdJDDUej969ev",
      "type": "subscription",
      "amount": 31500,
      "currency": "EUR",
      "customer_id": "cus_QalW2vTAdkR6IY",
      "provider_id": "pi_xxxxxxxxxx",
      "process_at": "2023-11-12T07:38:39.222Z",
      "refunded_at": "2023-11-07T05:31:56Z",
      "last_refreshed_at": "2023-11-07T05:31:56Z",
      "payment_method_type": "card",
      "payment_method": {
        "id": "pm_1xMpj5bwRqN7LM",
        "type": "card",
        "last_4_digits": 2718,
        "expiration_date": "2026-11",
        "brand": "visa"
      },
      "status": "settled"
    }
  ],
  "line_items": [
    {
      "id": "ili_0FACNpeoEFkGu3",
      "name": "Platform access",
      "product_id": "itm_KbLcWt2qm5p1S2",
      "product_type": "flat_fee",
      "units_count": 1,
      "unit_amount": 24000,
      "amount": 24000,
      "amount_excluding_tax": 20000,
      "tax_rate": 20,
      "tax_amount": 4000,
      "discount_amount": 123,
      "discount_percent": 123
    }
  ],
  "coupons": [
    {
      "id": "cou_DKL4Xcb5VSa8CQ",
      "name": "Partner discount",
      "discount_amount": 2000,
      "discount_percent": 123,
      "line_item_ids": [
        "ili_0FACNpeoEFkGu3"
      ]
    }
  ]
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
amount
number
required

Monetary amount in currency's smallest unit.

process_at
string
required

UTC date time string in the ISO 8601 format.

Response

201 - application/json
id
string
required

Invoice ID.

number
string
required

Invoice number is generated by Hyperline and follows the format defined in your settings.

type
enum<string>
required

The type of the invoice: - invoice: the base type for a legal invoice to charge your customer - credit_note: the base type for a legal credit note to refund your customer or cancel an invoice - document: a type that has no legal value you can generate from a subscription to create a summary for instance

Available options:
invoice,
credit_note,
document
document_name
string | null
required

If the invoice is of type document you can give it a custom name (will be displayed before the number)

status
enum<string>
required

Indicates the current state of the invoice.

Available options:
draft,
open,
to_pay,
grace_period,
partially_paid,
paid,
late,
voided,
closed,
error,
missing_info,
archived
reference
string | null
required

Unique identifier generated by Hyperline to ease reconciliation with payment. Useful for bank transfer.

purchase_order
string | null
required

Reference to the purchase order linked to the invoice.

original_invoice_id
string | null
required

ID of the original invoice this credit note is linked to (only used for credit note).

original_invoice_number
string | null
required

Number of the original invoice this credit note is linked to (only used for credit note).

currency
string
required

Currency code. See ISO 4217.

total_amount
number
required

Sum of the amount and taxes amount of all products on the invoice. Expressed in the currency's smallest unit.

amount_due
number
required

Amount still need to be paid for the invoice. Expressed in the currency's smallest unit.

amount_paid
number
required

Amount already paid for the invoice. Expressed in the currency's smallest unit.

amount_fixed
number
required

Amount corresponding to the recurring non-variable part of the total amount. Expressed in the currency's smallest unit.

amount_excluding_tax
number
required

Total amount without the taxes amount. Expressed in the currency's smallest unit.

tax_rate
number
required

Tax amount of the invoice. Expressed in the currency's smallest unit.

tax_amount
number
required

Tax amount of the invoice. Expressed in the currency's smallest unit.

tax_scheme
enum<string>
required
  • standard: Default behavior, tax is automatically computed and applied.
  • exempt: No tax rate applied because the customer country doesn't require it.
  • reverse_charge: No tax rate applied because the customer is eligible to EU reverse charge.
  • manual: Tax rate has been manually specified when creating the invoice.
  • not_eligible: You've disabled tax collection in this country.
Available options:
exempt,
standard,
reverse_charge,
manual,
not_eligible
discount_amount
number
required

Amount corresponding to the discounted part of the total amount. Expressed in the currency's smallest unit.

conversion_rate
number | null
required

Conversion rate used between the invoice currency and your accounting currency.

converted_amount
number
required

Amount converted using the conversion rate. Expressed in the currency's smallest unit.

converted_at
string | null
required

Date of the conversion of the amount.

payment_method_id
string | null
required

ID of the payment method used to pay the invoice.

attempt_count
number
required

Number of attempts to pay the invoice.

customer
object
required
seller
object
required
subscription_id
string | null
required

ID of the subscription related to the invoice.

period_starts_at
string | null
required

Beginning of the billing period of the invoice.

period_ends_at
string | null
required

End of the billing period of the invoice.

emitted_at
string
required

Emission date of the invoice.

due_at
string
required

Due date of the invoice. Computed from the emission date and the payment delay configured in your settings.

refunded_at
string | null
required

Date corresponding to the refund of the invoice, previously paid. A credit note exists with an original invoice ID equals to this invoice ID.

grace_period_ended_at
string | null
required

Date the invoice grace period ended. This happens at the emission date + the grace period duration configured in your settings.

settled_at
string | null
required

Date the invoice was fully paid.

transactions
object[]
required
  • Option 1

  • Option 2

  • Option 3

  • Option 4

line_items
object[]
required
coupons
object[]
required