getInvoices

The purpose of this query is to retrieve the purchase history of a user, which includes all the purchases they have made in the past.

Sample query

query getInvoices($orgID: UUID1!, $limit: Int, $page: Int) {
  getInvoices(orgID: $orgID, limit: $limit, page: $page) {
    data {
      userName
      userEmail
      invoiceID
      invoiceNumber
      invoiceCreatedAt
      status
      cryptoAmount
      supportedCurrency {
        id
        name
        networkId
        network {
          id
          name
          chainID
        }
      }
      paymentID
      items {
        invoiceItemID
        collectionItemID
        collectionTitle
        collectionItemTitle
        units
        unitPrice
        buyersPremium
        overheadPremium
        totalPrice
        taxes
        transactionHash
        transactionStatus
      }
    }
    pagination {
      totalCount
    }
  }
}

Sample variable

{
  "orgID": "d086ea16-d40d-454c-84a4-64b5e940670a",
  "limit": 2,
  "page": 2
}

Sample response

{
  "data": {
    "getInvoices": {
      "data": [
        {
          "userName": "",
          "userEmail": null,
          "invoiceID": "d0ed6b6f-cf0c-49d8-a8c6-7b7c79f95ccf",
          "invoiceNumber": 23951,
          "invoiceCreatedAt": "2023-05-10T20:41:42+05:30",
          "status": "Paid",
          "cryptoAmount": 0.08,
          "supportedCurrency": {
            "id": "501796ca-8f03-4cf6-8c36-2b1c50e6489b",
            "name": "ETH",
            "networkId": "b260424b-bb37-4a3e-86d0-0866175e5e68",
            "network": {
              "id": "b260424b-bb37-4a3e-86d0-0866175e5e68",
              "name": "Sepolia Testnet",
              "chainID": 11155111
            }
          },
          "paymentID": "00000000-0000-0000-0000-000000000000",
          "items": [
            {
              "invoiceItemID": "2fa9e6c3-85f5-4dc7-94e1-9492d223447f",
              "collectionItemID": "2b7ce220-d428-4891-93d2-9a497bd19a6a",
              "collectionTitle": "",
              "collectionItemTitle": "TEST_DUTCH_03",
              "units": 1,
              "unitPrice": 149.7464,
              "buyersPremium": 0,
              "overheadPremium": 0,
              "totalPrice": 149.7464,
              "taxes": 0,
              "transactionHash": "0xf8409d3d2b9a1310f0c6567232618e918ecaedc971fe3534073ade7be1756597",
              "transactionStatus": "Delivered"
            }
          ]
        },
        {
          "userName": "",
          "userEmail": null,
          "invoiceID": "4f197159-2e76-4939-84af-bc1a434c3923",
          "invoiceNumber": 23950,
          "invoiceCreatedAt": "2023-05-10T20:38:32+05:30",
          "status": "Paid",
          "cryptoAmount": 0.09,
          "supportedCurrency": {
            "id": "501796ca-8f03-4cf6-8c36-2b1c50e6489b",
            "name": "ETH",
            "networkId": "b260424b-bb37-4a3e-86d0-0866175e5e68",
            "network": {
              "id": "b260424b-bb37-4a3e-86d0-0866175e5e68",
              "name": "Sepolia Testnet",
              "chainID": 11155111
            }
          },
          "paymentID": "00000000-0000-0000-0000-000000000000",
          "items": [
            {
              "invoiceItemID": "b643632a-565d-4fd9-9a42-e66670bc807b",
              "collectionItemID": "2b7ce220-d428-4891-93d2-9a497bd19a6a",
              "collectionTitle": "",
              "collectionItemTitle": "TEST_DUTCH_03",
              "units": 1,
              "unitPrice": 168.4521,
              "buyersPremium": 0,
              "overheadPremium": 0,
              "totalPrice": 168.4521,
              "taxes": 0,
              "transactionHash": "0x76d6c94d45b92e57c0331174610452108433ed81883ccc81ff918c8c4f87ef1d",
              "transactionStatus": "Delivered"
            }
          ]
        }
      ],
      "pagination": {
        "totalCount": "9"
      }
    }
  }
}

Arguments

NameTypeDescription
orgIDUUIDThe organization id.

Field

NameTypeDescription
InvoiceWithPageObjectContains all information from InvoiceWithPage

Example

Load invoice by auth bearer token user in the organization.