logoSellhub
Invoices
background
Sellhub Docs
Sellhub Docs
Get Invoices
GET
/invoices

Authorization

Authorization<token>

In: header

Query Parameters

idstring

Generic ID filter (e.g., product, bundle, coupon, etc.)

createdAtFromstring

Earliest creation date (ISO 8601 datetime)

Format: "date-time"
createdAtTostring

Latest creation date (ISO 8601 datetime)

Format: "date-time"
curl -X GET "https://dash.sellhub.cx/api/sellhub/invoices?id=%3Cstring%3E&createdAtFrom=2019-08-24T14%3A15%3A22Z&createdAtTo=2019-08-24T14%3A15%3A22Z" \
  -H "Authorization: <token>"

Successful response

{
  "data": {
    "invoices": [
      {
        "id": "inv_123",
        "customerId": "cust_123",
        "totalInUsd": 50,
        "paymentMethod": "credit_card",
        "displayedPaymentInfo": "Visa ****1234",
        "createdOnSessionId": "sess_123",
        "leftFeedback": true,
        "status": "paid",
        "createdAt": "2023-06-15T14:30:00Z",
        "discordAccount": {
          "discordId": "discord_123",
          "email": "example@discord.com"
        },
        "invoiceFields": [
          {
            "key": "string",
            "value": "string",
            "type": "string"
          }
        ],
        "invoiceItems": [
          {
            "productVariantId": "var_123",
            "quantity": 1,
            "price": 50,
            "couponId": "coup_123"
          }
        ],
        "invoiceLogs": [
          {
            "log": "Payment received",
            "type": "info",
            "createdAt": "2023-06-15T14:35:00Z"
          }
        ]
      }
    ]
  }
}