Invoice

Invoice object fields.

Occurrence

Content

KeyTypeDescription
numberstringComma-separated product names
productsarray of Invoice Products/pages/cAppYOYUoFqP5CLRMyKR
shippingAmountint|nullThe cost the shopper is charged for shipping the order
currencystringISO 4217 of the used currency
testint
  • Was the payment simulated?
  • Possible values: 0 for no or 1 for yes
referenceIdstringAn internal reference ID used by your system
purposestringThe purpose of the payment
paymentRequestIdint|nullID of the Invoice or zahls.ch Gateway created through the API
paymentLinkPayment Link|null
googleAnalyticProductsarray of Google Analytic Products/pages/bgLhob0yVNBmoFPYEa2w
originalAmountintThe amount paid by the shopper
refundedAmountintThe amount refunded to the shopper
custom_fieldsarray of Custom Fields

Example

{
  "test": 1,
  "number": "IV_123",
  "currency": "CHF",
  "discount": {
    "code": null,
    "amount": 0,
    "percentage": null
  },
  "products": [
    {
      "sku": null,
      "name": "Product 1",
      "price": 1000,
      "vatRate": "8.1",
      "quantity": 1,
      "description": "sample-email@mail.com"
    }
  ],
  "paymentLink": null,
  "referenceId": "Custom API Reference",
  "custom_fields": [
    {
      "name": "E-Mail",
      "type": "email",
      "value": "sample-email@mail.com"
    }
  ],
  "originalAmount": 1000,
  "refundedAmount": 0,
  "shippingAmount": null,
  "paymentRequestId": null,
  "googleAnalyticProducts": [
    {
      "price": 10,
      "item_id": 112233,
      "quantity": 1,
      "item_name": "Product 1"
    }
  ]
}

Changelog

2024-12-10

An update to the Invoice Product object.

2021-10-12

The field amount is removed and replaced with two fields providing more details: originalAmount which stores the amount that was paid and refundedAmount which stores the amount refunded to the shopper.

2019-10-15

The type of amount changes from float to int. The price is now displayed in the currency's smallest unit.

An update to the Discount object.

An update to the Invoice Product object.

2019-02-13

An update to the Invoice Product object.