Link Search Menu Expand Document

The /v1/invoice endpoint provides the data that can be used to show the pricing of a rental. Each rental will reference exactly one invoice.

Get An Invoice

This endpoint can be accessed by api key or JWT token. Customers can access only their own invoices using the JWT token.

After having ended a rental, the invoice id will be attached to the rental. This id can then be used to retrieve the invoice

GET https://platform.tier-services.io/v1/invoice/<invoice-id>

Every invoice reflects the minute prices and quantity (duration) of a ride. The different elements can have the following descriptions:

  • UNLOCK_FEE
  • UNLOCK_DISCOUNT
  • RUNNING_FEE
  • RUNNING_DISCOUNT
  • PAUSED_FEE
  • PAUSED_DISCOUNT

In the response, we provide data for the individual postions of the invoice as well as a total. For these data points, we provide both gross and net amounts.

The gross amount refers to the money the user has to pay including the value-added tax (VAT). This is what most users are interested in. The net amount refers to the price that does not include the VAT. We are legally required to provide both net and gross amounts in an invoice, so we do the same in the API.

curl "https://platform.tier-services.io/v1/invoice/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b"
  -H "x-api-key: TIER API KEY"
curl "https://platform.tier-services.io/v1/invoice/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b"
  -H "X-Firebase-Auth: Bearer JWT"
Click to expand JSON data response
    {
      "data": {
        "type": "invoice",
        "id": "7e7a505a-62a5-4e80-b93e-9f013bc2e1e0",
        "attributes": {
          "invoiceNumber": "DE-PARTNER-2019-5-4",
          "positions": [
            {
              "description": "Miete Laufend",
              "type": "RUNNING_FEE",
              "grossPerUnit": {
                "amount": "0.15",
                "currency": "EUR"
              },
              "quantity": 2,
              "gross": {
                "amount": "0.30",
                "currency": "EUR"
              },
              "net": {
                "amount": "0.25",
                "currency": "EUR"
              },
              "taxes": [
                {
                  "code": "VAT",
                  "rate": "0.19",
                  "amount": "0.05",
                  "currency": "EUR"
                }
              ]
            },
            {
              "description": "Freischaltgebühr",
              "type": "UNLOCK_FEE",
              "grossPerUnit": {
                "amount": "1.00",
                "currency": "EUR"
              },
              "quantity": 1,
              "gross": {
                "amount": "1.00",
                "currency": "EUR"
              },
              "net": {
                "amount": "0.84",
                "currency": "EUR"
              },
              "taxes": [
                {
                  "code": "VAT",
                  "rate": "0.19",
                  "amount": "0.16",
                  "currency": "EUR"
                }
              ]
            }
          ],
          "total": {
            "gross": {
              "amount": "1.30",
              "currency": "EUR"
            },
            "net": {
              "amount": "1.09",
              "currency": "EUR"
            },
            "totalTax": {
              "amount": "0.21",
              "currency": "EUR"
            },
            "taxes": [
              {
                "code": "VAT",
                "rate": "0.19",
                "amount": "0.21",
                "currency": "EUR"
              }
            ]
          }
        }
      }
    }

Downloading the invoice PDF

This endpoint can be accessed by API key or JWT token. Customers can download only their own invoices using the JWT token.

HTTP Request

GET https://platform.tier-services.io/v1/invoice/<invoice-id>/pdf-link

ℹ Note: You must download the PDF within 1 hour after having requested the PDF link

curl "https://platform.tier-services.io/v1/invoice/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b/pdf-link"
  -H "x-api-key: TIER API KEY"
curl "https://platform.tier-services.io/v1/invoice/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b/pdf-link"
  -H "X-Firebase-Auth: Bearer JWT"
Click to expand JSON data response
  {
    "data": {
      "type": "pdflink",
      "attributes": {
        "url": "https://something-like-s3.tier-services.io/path-to-pdf/4a35a1bd-fa1a-4b56-ab8d-4b93a2f7534b.pdf"
      }
    }
  }