# Contract object

The fields of a contract as the Shop API returns it: the contract, its line items, cycle discounts and pagination.

https://www.kachingappz.com/developers/subscriptions/contract-object/ · Updated 2026-11-23

## Top-level contract fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Shopify GID for the contract. |
| `status` | string | One of `ACTIVE`, `PAUSED`, `FAILED`, `EXPIRED`, `CANCELLED`, `STALE`. |
| `currencyCode` | string | ISO currency code for the contract. |
| `lastPaymentStatus` | string | `SUCCEEDED` or `FAILED`. |
| `revisionId` | string | Opaque identifier for the current revision. Use to detect contract changes. |
| `createdAt` | string | ISO-8601 timestamp. |
| `updatedAt` | string | ISO-8601 timestamp. |
| `deliveryPolicy` | object | `{ interval, intervalCount }` — how often deliveries happen. |
| `billingPolicy` | object | `{ interval, intervalCount, maxCycles, minCycles }` — billing cadence and limits. |
| `deliveryPrice` | object | `{ amount, currencyCode }` — shipping/delivery charge per cycle. |
| `deliveryMethod` | object | Delivery method, e.g. `SubscriptionDeliveryMethodShipping` with an `address`. |
| `linesCount` | object | `{ count }` — total number of line items on the contract. |
| `lines` | object | Connection of line items — see below. |
| `discounts` | object | Connection of contract-level discount allocations. |
| `customer` | object | `{ id, displayName, defaultEmailAddress.emailAddress }`. |
| `orders` | object | Connection of orders generated by this contract. |

`interval` values: `DAY`, `WEEK`, `MONTH`, `YEAR`.

## Line item fields (lines.edges\[\].node)

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Shopify GID for the line. |
| `title` | string | Product title. |
| `variantTitle` | string | Variant title. |
| `productId` | string | Shopify product GID. |
| `variantId` | string | Shopify variant GID. |
| `quantity` | number | Number of units per delivery. |
| `lineDiscountedPrice` | object | `{ amount, currencyCode }` — final per-line price after discounts. |
| `pricingPolicy` | object | `{ basePrice, cycleDiscounts[] }` — base price and per-cycle adjustments. |
| `discountAllocations` | array | Line-level discount allocations — see the note below. |

Inside `discountAllocations[].discount`, the `type` field is Shopify's `DiscountType` — `MANUAL`, `CODE_DISCOUNT` or `AUTOMATIC_DISCOUNT` — describing how the discount was *applied*. It is **not** the percentage/fixed-amount distinction. For that, read `discount.value` (`{ percentage }` or `{ amount, appliesOnEachItem }`), or `pricingPolicy.cycleDiscounts[].adjustmentType`.

## Cycle discount fields (pricingPolicy.cycleDiscounts\[\])

| Field | Type | Description |
| --- | --- | --- |
| `adjustmentType` | string | `PERCENTAGE`, `FIXED_AMOUNT`, or `PRICE`. |
| `afterCycle` | number | Cycle index after which the discount applies (0 = starting with cycle 1). |
| `computedPrice` | object | `{ amount, currencyCode }` — resolved price once the discount applies. |
| `adjustmentValue` | object | Either `{ percentage }` or `{ amount, currencyCode }`, depending on type. |

## Pagination (pageInfo)

Connections (`lines`, `orders`, top-level list) return `pageInfo`:

| Field | Type | Description |
| --- | --- | --- |
| `hasNextPage` | boolean | `true` if more pages exist. |
| `hasPreviousPage` | boolean | `true` if previous pages exist. |
| `endCursor` | string | Cursor for the last item in the current page. |
| `startCursor` | string | Cursor for the first item in the current page. |
