Skip to main content
POST
/
v1
/
invoices
/
{id}
/
charge
Charge invoice
curl --request POST \
  --url https://api.hyperline.co/v1/invoices/{id}/charge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "payment_method_id": "pm_1xMpj5bwRqN7LM"
}'
{
  "id": "inv_1eTaiytfA0i2Va",
  "number": "INV-35",
  "type": "invoice",
  "document_name": null,
  "status": "paid",
  "reference": "V0KAHOU6J3",
  "purchase_order": "PO-12345",
  "original_invoice_id": null,
  "original_invoice_number": null,
  "currency": "EUR",
  "source": "hyperline",
  "total_amount": 24000,
  "amount_due": 0,
  "amount_paid": 24000,
  "amount_fixed": 20000,
  "amount_excluding_tax": 20000,
  "tax_rate": 20,
  "tax_amount": 4000,
  "tax_scheme": "standard",
  "discount_amount": 0,
  "conversion_rate": 1,
  "converted_amount": 24000,
  "converted_at": "2024-10-13T02:00:00.000Z",
  "payment_method_id": "pm_1ryTrMj4TTAT1N",
  "bank_account_id": "bac_KJyPrMA1toAqRG",
  "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",
  "customer": {
    "id": "cus_Typ0px2W0aiEtl",
    "name": "Acme",
    "email": "[email protected]",
    "external_id": null,
    "vat_number": "FR123456789",
    "address": {
      "name": "Acme",
      "line1": "5 rue de Paradis",
      "line2": null,
      "city": "Paris",
      "zip": "75010",
      "state": "CA",
      "country": "FR"
    }
  },
  "seller": {
    "id": "ive_47484fjdhy5",
    "name": "Name of the invoicing entity",
    "tax_id": "FR5878986578",
    "address": {
      "name": "Acme",
      "line1": "5 rue de Paradis",
      "line2": null,
      "city": "Paris",
      "zip": "75010",
      "state": "CA",
      "country": "FR"
    }
  },
  "subscription_id": "sub_amiaWZ3lzDIWaoT",
  "period_starts_at": "2024-10-13T00:00:00.000Z",
  "period_ends_at": "2024-11-13T00:00:00.000Z",
  "emitted_at": "2024-10-13T00:00:00.000Z",
  "due_at": "2024-11-12T00:00:00.000Z",
  "refunded_at": null,
  "grace_period_ended_at": null,
  "settled_at": "2024-10-15T14:01:56.000Z",
  "updated_at": "2024-10-15T14:01:56.000Z",
  "properties": null,
  "line_items": [
    {
      "id": "ili_0FACNpeoEFkGu3",
      "name": "Platform access",
      "entry_type": "debit",
      "product_id": "itm_KbLcWt2qm5p1S2",
      "product_type": "flat_fee",
      "units_count": 1,
      "unit_amount": 24000,
      "amount": 24000,
      "amount_excluding_tax": 20000,
      "tax_rate": 20,
      "tax_rate_id": null,
      "tax_amount": 4000,
      "discount_amount": 0,
      "discount_percent": 123,
      "period_starts_at": "2024-10-13T00:00:00.000Z",
      "period_ends_at": "2024-11-13T00:00:00.000Z"
    }
  ],
  "coupons": [
    {
      "id": "cou_DKL4Xcb5VSa8CQ",
      "name": "Partner discount",
      "discount_amount": 2000,
      "discount_percent": null,
      "line_item_ids": [
        "ili_0FACNpeoEFkGu3"
      ]
    }
  ],
  "transactions": [
    {
      "id": "tra_2QdJDDUej969ev",
      "type": "subscription",
      "amount": 31500,
      "currency": "EUR",
      "customer_id": "cus_QalW2vTAdkR6IY",
      "provider_id": "pi_xxxxxxxxxx",
      "process_at": "2024-11-12T07:38:39.222Z",
      "refunded_at": null,
      "last_refreshed_at": null,
      "provider_fee": null,
      "chargeback": null,
      "payment_method_type": "card",
      "payment_method": {
        "id": "pm_1xMpj5bwRqN7LM",
        "status": "active",
        "type": "card",
        "last_4_digits": 2718,
        "expiration_date": "2027-11",
        "brand": "visa"
      },
      "status": "settled"
    }
  ],
  "integrations": [
    {
      "entity_id": "123456789",
      "provider_name": "stripe",
      "provider_account_id": "acc_1234567890"
    }
  ],
  "public_url": "<string>"
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Body

application/json
payment_method_id
string
Example:

Response

200 - application/json
id
string
required
Example:
number
string
required
Example:
type
enum<string>
required
Available options:
invoice,
credit_note,
document,
child_invoice_ref,
child_creditnote_ref
Example:
document_name
string | null
required
Example:
status
enum<string>
required
Available options:
draft,
open,
to_pay,
grace_period,
partially_paid,
paid,
voided,
closed,
error,
missing_info,
archived,
charged_on_parent,
pending_parent_concat,
uncollectible
Example:
reference
string | null
required
Example:
purchase_order
string | null
required
Example:
original_invoice_id
string | null
required
Example:
original_invoice_number
string | null
required
Example:
currency
enum<string>
required
Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
XOF,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
YER,
ZAR,
ZMW,
ZWL
Example:
source
enum<string>
required
Available options:
hyperline,
api,
pennylane,
chargebee,
stripe,
lago,
sequence,
other
Example:
total_amount
number
required
Example:
amount_due
number
required
Example:
amount_paid
number
required
Example:
amount_fixed
number
required
Example:
amount_excluding_tax
number
required
Example:
tax_rate
number
required
Example:
tax_amount
number
required
Example:
tax_scheme
enum<string>
required
Available options:
exempt,
standard,
reverse_charge,
manual,
not_eligible
Example:
discount_amount
number
required
Example:
conversion_rate
number | null
required
Example:
converted_amount
number | null
required
Example:
converted_at
string<date-time> | null
required
Example:
payment_method_id
string | null
required
Example:
bank_account_id
string | null
required
Example:
custom_note
string | null
required
Example:
additional_info
string | null
required
Example:
Example:
customer
object
required
seller
object
required
subscription_id
string | null
required
Example:
period_starts_at
string<date-time> | null
required
Example:
period_ends_at
string<date-time> | null
required
Example:
emitted_at
string<date-time>
required
Example:
due_at
string<date-time>
required
Example:
refunded_at
string<date-time> | null
required
Example:
grace_period_ended_at
string<date-time> | null
required
Example:
settled_at
string<date-time> | null
required
Example:
updated_at
string<date-time> | null
required
Example:
properties
object | null
required
Example:
line_items
object[]
required
coupons
object[]
required
transactions
object[]
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
integrations
object[]
required
public_url
string<uri>
required