Skip to main content

Properties of the Invoice Data JSON

Understand the structure and meaning of each JSON property used by Comply to generate invoices in Shopify.

Support Comply avatar
Written by Support Comply
Updated this week

In this article, you will find a clear description of each property in the invoice data JSON, its purpose within the invoicing process, and the considerations you should keep in mind to validate the information.

Understanding these properties will allow you to perform advanced integrations and ensure that the generated invoices comply with the fiscal and operational standards defined in Comply.


Introduction

Comply can automatically store invoice data as metaobjects within Shopify. This functionality enables further integrations (for example, with automations or external apps) using the metaobjects/create webhook.

Learn in THIS ARTICLE how to configure invoice metaobjects.


JSON Data

Main Object: Invoice

Property

Type

Description

invoiceNumber

String

Unique invoice number (format: year-locationid-register-type-sequence)

issuedAt

String (ISO 8601)

Date and time when the invoice is issued, with timezone

invoiceType

String

Invoice type:
FULL = "F1" SIMPLIFIED = "F2" RECTIFIED_OTHERS = "R4", RECTIFIED_SIMPLIFIED = "R5"

seriesId

String

Identifier of the invoicing series

lineItems

Array<LineItem> / Null

Array of product line items (used in invoices and refunds, null in exchanges)

lineItemsAdded

Array<LineItem> / Null

Added items (only in exchanges, null otherwise)

lineItemsRemoved

Array<LineItem> / Null

Removed items (only in exchanges, null otherwise)

paymentMethods

Array<PaymentMethod>

Payment methods used

taxBreakdown

Array<TaxBreakdown>

Tax breakdown per rate

grandTotalAmount

Number

Total invoice amount (negative in money refunds)

currency

String

Invoice currency

shopifyOrderId

Number

Shopify order ID

rectifiedInvoice

RectifiedInvoice / Null

Information about the rectified invoice (present in rectifying invoices)

shopifyReturnId

Number / Null

Shopify return ID (present in refunds and exchanges)

shopifyExchangeId

Number / Null

Shopify exchange ID (present only in exchanges)


Object: LineItem

Property

Type

Description

uuid

String (UUID)

Unique identifier of the line item. In sales transactions, Shopify provides the cart UUID; in returns/exchanges, the line item ID.

quantity

Number

Quantity of the product

title

String

Name or description of the product

price

Number

Unit price of the product

taxable

Boolean

Indicates if the product is taxable

taxLines

Array<TaxLine>

Tax lines applied to the product

variantId

Number

Shopify variant ID

isGiftCard

Boolean

Indicates if the product is a gift card

discountAllocations

Array<DiscountAllocation>

Distributed discount allocations

properties

Object

Custom product properties

attributeUserId

String / Null

Attributed user ID (null if not applicable)

productId

Number

Shopify product ID

requiresSellingPlan

Boolean

Indicates if a selling/subscription plan is required

hasSellingPlanGroups

Boolean

Indicates if the product has selling plan groups

components

Array

Product components in case of bundles


Object: TaxLine

Property

Type

Description

price

Price

Object containing tax amount and currency

title

String

Tax name (e.g., "ES VAT")

uuid

String (UUID)

Unique identifier of the tax line

rate

Number

Tax rate in decimal format (e.g., 0.1 = 10%)

enabled

Boolean

Indicates if the tax is enabled


Object: Price

Property

Type

Description

amount

Number

Price or tax amount

currency

String

Currency (e.g., "EUR")


Object: DiscountAllocation

Property

Type

Description

allocatedAmount

AllocatedAmount

Assigned discount amount


Object: AllocatedAmount

Property

Type

Description

amount

String

Amount of the assigned discount

currencyCode

String

Currency code of the discount


Object: PaymentMethod

Property

Type

Description

type

String

Payment method type (e.g., "Cash")

amount

Number

Amount paid with this method (may be negative in refunds)

currency

String

Payment currency


Object: TaxBreakdown

Property

Type

Description

taxRate

Number

Tax rate in decimal format

taxAmountCharged

Number

Total tax charged

taxableBaseAmount

Number

Taxable base amount


Important Notes

  • Normal invoices: lineItems contains the products; lineItemsAdded and lineItemsRemoved are null.

  • Refunds: shopifyReturnId is present; lineItems contains the returned products.

  • Exchanges: Both shopifyReturnId and shopifyExchangeId are present; lineItems is null, lineItemsAdded contains new products, and lineItemsRemoved contains returned products.

  • Rectifying invoices: Include the rectifiedInvoice object with the original invoice data.

Did this answer your question?