# Firmhouse for Developers

Use our developer resources to build an amazing subscription business.

Welcome to Firmhouse's developer docs. Here you'll learn how to add Firmhouse to your current e-commerce system or build a fully customized storefront, customize webhooks and emails via our Liquid templating system, and build advanced use cases between Firmhouse and your current stack via our GraphQL API.&#x20;

Take a look at the topics below to get a quick start. Or explore the sidebar to find the specific page you need.

<table data-card-size="large" data-column-title-hidden data-view="cards" data-full-width="false"><thead><tr><th align="center"></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center">Add our Storefront JS SDK</td><td></td><td></td><td><a href="/pages/da6PMi7hO8mcMYgTkQrF">/pages/da6PMi7hO8mcMYgTkQrF</a></td></tr><tr><td align="center">Connect with our GraphQL API</td><td></td><td></td><td><a href="/pages/Y4WX9JmX1M8Xq5og4zBL">/pages/Y4WX9JmX1M8Xq5og4zBL</a></td></tr></tbody></table>

### Explore our guides and reference

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>GraphQL API</strong></td><td>Use our GraphQL API for deep frontend or backend integration with Firmhouse.<br><br></td><td><a href="/pages/ESTCdpRL81XQKDDUVHGv">API Reference</a></td></tr><tr><td><strong>Liquid</strong></td><td>Learn about available Liquid tags that you can use for email and webhook templates for easy configuration or editing.<br></td><td><a href="/pages/TmlcLIH9fdti7kQtngtL">Liquid Overview</a></td></tr><tr><td><strong>Webhooks</strong></td><td>Learn about available webhooks that you can use to communicate with various applications<br></td><td><a href="/pages/vP6T7KvQ6W4HWaoApBip">Webhooks Overview</a></td></tr><tr><td><strong>Guides</strong></td><td>A collection of follow-along guides for achieving some common customisation use cases.<br></td><td><a href="/pages/xMutc8wxx6tGl5QHLt7J">Our latest guide</a></td></tr></tbody></table>


# Introduction

The Firmhouse GraphQL API can be used to deeply integrate Firmhouse with your website, e-commerce platform, or headless storefront. You can use it to build custom cart and checkout experiences. But also get access to data like invoices and orders so that you can trigger your own logistics processes or sync up with your CRM or accounting software.

You can use our GraphQL API in two primary ways:

1. Server-to-server communication that gives your backend application access to read and write all kinds of data of all the customers in your Firmhouse project.
2. Client or Headless communication straight from your customer's browser to the API. Useful for creating custom storefront experiences and self-service capabilities scoped to a specific customer or only public information.

## Use Cases

You can do anything you want with the data that our API exposes. But here are a few common so you know when to use our GraphQL API:

* Build a Headless storefront experience and load available products, plans and build custom cart and checkout experiences.
* Add subscription and membership functionality to your existing e-commerce website on Shopify, Magento, Shopworks, or WooCommerce.
* Sync all Invoices with your accounting software.
* Fire off a logistics or fulfilment process when an Order is created.
* Sync and update customer records with your CRM.
* Build a unique self service or "My Account" portal for your customers.
* Extract raw data for business analysis in other dashboarding and data crunching tools.

## Getting Started

* Learn how to authenticate with the Firmhouse GraphQL API in Headless or in Read/Write mode to start executing queries and making mutation calls.
* Explore the available Objects, Queries and Mutations in the API.

## Support

Need help? Don't hesitate to email <support@firmhouse.com> with your questions. Or get in touch via the Chat bubble when logged into the Firmhouse portal.


# Getting Started

Use the instructions on this page to learn how to authenticate with the Firmhouse GraphQL API and how to make your first API calls.

## Authentication

All calls to the Firmhouse GraphQL API require a valid `X-Project-Access-Token` HTTP header to be passed in every request. You can generate a Project Access Token by going to the **Settings > Integrations** page in your Firmhouse project as a project manager.

### Access Token Types

Each Project Access Token has a specific access type. The access type controls what the token can do (or cannot do) and which data is accessible via the token.

There a currently two access types: **write** and **storefront**. In the near future we will also introduce a **read** type. Read below on the details per access type.

#### **Write**

The write access type gives you full API access to all data. Treat this as an administrative secret that you should not expose to the public. This token can read and modify all data in your project. Always securely embed this token into your application and never expose this token to regular users or the public.

#### **Storefront**

The storefront access type is meant for building Headless applications or storefronts without needing a server-side component in your app. For example in your frontend React application or Apollo JS client. It is safe to expose this token to the public as part of your runtime codebase.

A storefront token will only give limited access to available products and plans. And it allows you to build a cart and initiate a subscription checkout and payment flow. This token does not give you access to subscription data after the subscription has signed up.

## Making calls

The API is exposed on the following endpoint:

```
POST https://portal.firmhouse.com/graphql
```

All calls towards our API should be made with a HTTP `POST`. Your HTTP `POST` should include a valid `X-Project-Access-Token` HTTP header as explained under Authentication.

Certain queries and mutations also need a `X-Subscription-Token` HTTP header to be present, alongside the `X-Project-Access-Token`. This is usually the case when a query or mutation accesses data of an individual subscription.

Calls can be made via standard server-to-server HTTP communication, but also by using Fetch from your customer's browser if you're building a frontend or headless experience without server-side component.

## Clients and libraries

There are several ways and clients that can be used to interact with the API. For example:

* Use a tool such as [GraphiQL](https://github.com/graphql/graphiql) or [Insomnia](https://insomnia.rest/products/insomnia) to interactively explore the API and its documentation.
* Use cURL to manually make calls from the command-line.
* Use the [GraphQL Ruby Client](https://github.com/github/graphql-client) to make calls from a Ruby on Rails app.
* Use [Apollo](https://www.apollographql.com/) when using React, Vue, or Next.js.

## Query Complexity

Every call to our API has a calculated query complexity. In the near future we will be rejecting queries that exceed a total complexity of **1000** for a single query.

New projects already have this limit applied. Existing API consumers will be notified of this change and will get the time to update their queries.

### How is complexity calculated?

Take the following example query, its total complexity is 27. The complexity is calculated based on the maximum possible value. In this example "collectionCases" could be less then 10 pages but its attributes are still multiplied by 10.

```gql
query {
  getSubscription(token: "token") {                  # +1
    token                                            # +1
    collectionCases(first: 10) {                     # +1
      nodes {                                        # +1
        id                                           # +10 (+1, multiplied by `first:` above)
        caseNumber                                   # +10 (+1, multiplied by `first:` above)
      }
      pageInfo {                                     # +1
        endCursor                                    # +1
      }
      totalCount                                     # +1
    }
  }
}
```

These are the defaults but it could be that certain fields take more resources to compute. We might increase the complexity manually for such fields.

The response of every query includes information about the requested complexity found in the path: "extensions.complexity.requestedQueryComplexity".

```json
{
  "data": {
    "getSubscription": {
      "token": "token",
      "collectionCases": {
        "nodes": [...],
        "pageInfo": {
          "endCursor": "..."
        },
        "totalCount": 1
      }
    }
  },
  "extensions": {
    "complexity": {
      "requestedQueryComplexity": 27
    }
  }
}
```

Take a look at the [pagination](/graphql-api/pagination) documentation for more information about how to paginate over large result sets and optimize your queries.


# Pagination

Learn how to use GraphQL pagination to limit the amount of results and use cursor-based pagination

## How pagination works

When working with our GraphQL API, it is important to efficiently manage the amount of data returned in each query. Pagination enables you to split large result sets into smaller, more manageable chunks, which improves performance and allows for better control of the data being processed or displayed.

In our GraphQL API, pagination follows the Relay Cursor Connections Specification, which is commonly used in GraphQL for managing large lists of data. This approach relies on cursors rather than traditional numeric offsets, making it more efficient for navigating large datasets, even when items are inserted or removed.

The key concepts involved in pagination are:

* Edges and nodes: Each paginated connection consists of a collection of edges. Each edge contains a node, which represents an individual item in the list.
* Cursors: Each edge has a unique cursor, which identifies the position of an item within the result set. This cursor is used to move forward or backward through the list of results.
* Limits: You can control how many items are fetched by specifying a limit (the number of results you want in a single query).

Pagination can be handled in two primary ways: forward pagination and backward pagination.

## Pagination Types

### Forward Pagination

Forward pagination is used when you want to start from a particular point in a dataset and move forward to retrieve the next set of results. Parameters:

* `first`: This parameter specifies the number of items to fetch after the starting point (cursor).
* `after`: This parameter is used to specify the cursor after which the query should start fetching items.

**Example:**

```graphql
query ($first: Int!, $after: String) {
  invoices(first: $first, after: $after) {
    nodes {
      id
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

**Variables:**

```json
{
  "first": 2,
  "after": null
}
```

**Response:**

```json
{
  "data": {
    "invoices": {
      "nodes": [
        {
          "id": "1"
        },
        {
          "id": "2"
        }
      ],
      "pageInfo": {
        // The response shows that there is a next page and provides the cursor needed to use as the after input for retrieving the next set of nodes.
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yLWZyb20tZGVmaW5pdGlvbjoy"
      }
    }
  }
}
```

In this example:

* The `first` parameter requests the next 2 invoices.
* The `after` parameter is not provided, so the query starts from the beginning of the dataset.

The response will include:

* `nodes`: An array of invoices
* `pageInfo`: Metadata about whether there are more results (hasNextPage) and the cursor of the last item (endCursor) to continue pagination.

You can retrieve the next page by reusing the same query with different variables:

**Variables:**

```json
{
  "first": 2,
  "after": "Y3Vyc29yLWZyb20tZGVmaW5pdGlvbjoy"
}
```

**Response:**

```json
{
  "data": {
    "invoices": {
      "nodes": [
        {
          "id": "3"
        },
        {
          "id": "4"
        }
      ],
      "pageInfo": {
        // The response shows that there are no more pages, indicating this is the final page of the connection.
        "hasNextPage": false,
        "endCursor": "Y3Vyc29yLWZyb20tZGVmaW5pdGlvbjo0"
      }
    }
  }
}
```

### Backward Pagination

Backward pagination allows you to move backward in the dataset to retrieve results that were previously loaded or skipped.

**Parameters:**

* `last`: This parameter specifies the number of items to fetch before the starting point (cursor).
* `before`: This parameter is used to specify the cursor before which the query should start fetching items.

**Example:**

```graphql
query ($last: Int!, $before: String) {
  invoices(last: $last, before: $before) {
    nodes {
      id
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

**Variables:**

```json
{
  "last": 2,
  "before": null
}
```

**Response:**

```json
{
  "data": {
    "invoices": {
      "nodes": [
        {
          "id": "3",
        },
        {
          "id": "4",
        }
      ],
      "pageInfo": {
        "hasPreviousPage": true,
        "startCursor": "Y3Vyc29yLWZyb20tZGVmaW5pdGlvbjox"
      }
    }
  }
}
```

In this example:

* The `last` parameter requests the previous 2 invoices.
* The `before` parameter is not provided, so the query starts from the end of the dataset.

The response will include:

* `nodes`: An array of invoices
* `pageInfo`: Metadata about whether there are more results (hasPreviousPage) and the cursor of the first item (startCursor) to continue pagination.

You can retrieve the previous page by reusing the same query with different variables:

**Variables:**

```json
{
  "last": 2,
  "before": "Y3Vyc29yLWZyb20tZGVmaW5pdGlvbjox"
}
```

**Response:**

```json
{
  "data": {
    "invoices": {
      "nodes": [
        {
          "id": "1"
        },
        {
          "id": "2"
        }
      ],
      "pageInfo": {
        "hasPreviousPage": false,
        "startCursor": "yc29yLTM4OWZkNjcyLWE1YzEtNGJmY4a"
      }
    }
  }
}
```

## Connection Edges

In connections, an `Edge` type represents the link between a node and its parent. Typically, querying `nodes` and `pageInfo` is recommended over querying edges. However, if you need metadata specific to an `Edge`, you can query `edges` instead. Each `Edge` includes at least the edge's cursor and the associated node.

**Example:**

```graphql
query($first: Int!) {
  invoices(first: $first) {
    edges {
      cursor
      node {
        id
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

**Variables:**

```json
{
  "first": 2
}
```

**Response:**

```json
{
  "data": {
    "invoices": {
      "edges": [
        {
          "cursor": "NjcyLWE1YzEtNGJmYy1iMmZkLTY0YzM5",
          "node": {
            "id": "1"
          }
        },
        {
          "cursor": "ZjgzLTdiNDctNGE1Yi05YTJmLTFkNzM4",
          "node": {
            "id": "2"
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "ZjgzLTdiNDctNGE1Yi05YTJmLTFkNzM4"
      }
    }
  }
}
```

**In this example:**

The `PageInfo.endCursor` matches the last edge's cursor, and the `edges[].node` list is equivalent to the `nodes` list in a forward pagination query.


# Handling Errors

This article explains how to handle different types of errors in GraphQL API

## Validation Errors

If you use an input parameter that fails validation in the mutation the API will return a validation error. You can use the `errors` field in the mutation to access those validation errors. The type of `errors` field is a list of [ModelValidationError](/graphql-api/api-reference/objects/model-validation-error) object.

Here is an example response for an [`updateAddressDetails`](/graphql-api/api-reference/objects/update-address-details-payload) mutation.

{% code title="GraphQL mutation" %}

```graphql
mutation($input: UpdateAddressDetailsInput!) {
    updateAddressDetails(input: $input){
        subscription {
            id
        }
        errors {
            attribute
            message
            path
        }
    }
}
```

{% endcode %}

{% hint style="info" %}
Note that you need to include `errors` field in the query to retrieve the validation errors.
{% endhint %}

{% code title="GraphQL Variables" %}

```json
{
    "input": {
        "name": "John Doe",
        "email": "johndoe",
        "address": "X street",
        "city": "test",
        "country": "XXXXXX",
        "termsAccepted": true
    }
}
```

{% endcode %}

{% code title="Response" %}

```json5
{
    "data": {
        "updateAddressDetails": {
            "subscription": {
                "id": "0"
            },
            "errors": [
                {
                    "attribute": "country",
                    "message": "not allowed",
                    "path": null
                },
                {
                    "attribute": "email",
                    "message": "Your email address is invalid",
                    "path": null
                }
            ]
        }
    }
}
```

{% endcode %}

As you can see in the sample response, if one of the input parameters fails validation it will show up on the `data.<mutation_name>.errors` field.

## Not Found Errors

If the resource you are trying to access is not found, the GraphQL query will result in an error. In this case, the `errors` field will be directly in the root. You can check if the thrown error is a not found error by checking if the `extensions.code` field is `RECORD_NOT_FOUND`

{% code title="GraphQL mutation" %}

```graphql
mutation UpdateOrderedProductQuantity($input: UpdateOrderedProductQuantityInput!) {
    updateOrderedProductQuantity(input:$input) {
        orderedProduct { 
            id
            quantity
            title
        }
    }
}
```

{% endcode %}

{% code title="GraphQL variables" %}

```json
{
    "input": {
        "orderedProduct": {
            "id": "invalid",
            "quantity": 0
        }
    }
}
```

{% endcode %}

{% code title="GraphQL response" %}

```json
{
    "data": {
        "updateOrderedProductQuantity": null
    },
    "errors": [
        {
            "message": "Ordered product not found",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "updateOrderedProductQuantity"
            ],
            "extensions": {
                "code": "RECORD_NOT_FOUND"
            }
        }
    ]
}
```

{% endcode %}

{% hint style="info" %}
Note that the `errors` field is in the root of the object and not under `data.updateOrderedProductQuantity.`
{% endhint %}

## Unauthorized Errors

If you are using a token with `Storefront` access type, you don't have access to some query and mutations. If that's the case the API will return an Unauthorized error. You can check if the error is an unauthorized error by checking if the `extensions.code` field is `UNAUTHORIZED`.

{% code title="GraphQL query" %}

```graphql
mutation CreateAsset {
    createAsset(input: { productId: "1", internalNumber: "1" }) {
        asset {
          id
        }
    }
}
```

{% endcode %}

{% code title="GraphQL response" %}

```json
{
    "data": {
        "createAsset": null
    },
    "errors": [
        {
            "message": "Not allowed",
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "path": [
                "createAsset"
            ],
            "extensions": {
                "code": "UNAUTHORIZED"
            }
        }
    ]
}
```

{% endcode %}

## Other Errors

If you use a malformed query, such as one with invalid field names or missing required parameters, the API will report this in the `errors` field. You can determine what actually went wrong by checking the `message` property of the error.

Here are some examples of common errors:

```json
{
    "errors": [
        {
            "message": "Argument 'productId' on InputObject 'CreateAssetInput' is required. Expected type ID!",
            "locations": [
                {
                    "line": 2,
                    "column": 24
                }
            ],
            "path": [
                "mutation CreateAsset",
                "createAsset",
                "input",
                "productId"
            ],
            "extensions": {
                "code": "missingRequiredInputObjectAttribute",
                "argumentName": "productId",
                "argumentType": "ID!",
                "inputObjectType": "CreateAssetInput"
            }
        },
        {
            "message": "Field must have selections (field 'asset' returns Asset but has no selections. Did you mean 'asset { ... }'?)",
            "locations": [
                {
                    "line": 4,
                    "column": 9
                }
            ],
            "path": [
                "mutation CreateAsset",
                "createAsset",
                "asset"
            ],
            "extensions": {
                "code": "selectionMismatch",
                "nodeName": "field 'asset'",
                "typeName": "Asset"
            }
        },
        {
            "message": "Field 'invalidMutation' doesn't exist on type 'Mutation'",
            "locations": [
                {
                    "line": 7,
                    "column": 5
                }
            ],
            "path": [
                "mutation CreateAsset",
                "invalidMutation"
            ],
            "extensions": {
                "code": "undefinedField",
                "typeName": "Mutation",
                "fieldName": "invalidMutation"
            }
        }
    ]
}
```


# API Reference


# Queries


# assets

List of assets.

### Arguments

| Argument                                                                                | Description                                                                  |
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| statuses (\[[AssetStatus](/graphql-api/api-reference/objects/asset-status)!])           | Filter assets to those of specific statuses. Lists all assets if none given. |
| productId ([ID](/graphql-api/api-reference/objects/id))                                 | Only list assets that match the passed in product ID                         |
| id ([ID](/graphql-api/api-reference/objects/id))                                        | Only list assets that match the passed Firmhouse ID                          |
| internalNumber ([String](/graphql-api/api-reference/objects/string))                    | Only list assets that match the passed internal number                       |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter assets to those that were updated since the given datetime.           |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.       |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor.      |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                                |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                                 |

### Return fields

#### edges (\[[AssetEdge](/graphql-api/api-reference/objects/asset-edge)])

A list of edges.

#### nodes (\[[Asset](/graphql-api/api-reference/objects/asset)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# bulkOperation

Fetch a GraphQL bulk operation by id.

### Arguments

| Argument                                          | Description |
| ------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### completedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

When the bulk operation reached a terminal state.

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the bulk operation was created.

#### errorCode ([String](/graphql-api/api-reference/objects/string))

The error code if the bulk operation failed.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

ID to identify the bulk operation with.

#### status ([GraphqlBulkOperationStatus](/graphql-api/api-reference/objects/graphql-bulk-operation-status)!)

The bulk operation status.

#### url ([String](/graphql-api/api-reference/objects/string))

URL to download the completed JSONL result file.


# churnRequests

List of churn requests for cancellation reporting.

### Arguments

| Argument                                                                                | Description                                                             |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| createdSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter churn requests to those created since the given datetime.        |
| createdUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter churn requests to those created until the given datetime.        |
| status ([ChurnRequestStatus](/graphql-api/api-reference/objects/churn-request-status))  | Filter churn requests by status. Lists all if none given.               |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                            | Filter churn requests to a specific subscription.                       |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[ChurnRequestEdge](/graphql-api/api-reference/objects/churn-request-edge)])

A list of edges.

#### nodes (\[[ChurnRequest](/graphql-api/api-reference/objects/churn-request)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# currentCart

Returns current cart calculations object identified by X-Subscription-Token.

### Return fields

#### activePlan ([Plan](/graphql-api/api-reference/objects/plan))

The plan that's set for this cart.

#### address ([String](/graphql-api/api-reference/objects/string))

The customer's shipping address or just street. Can include houseNumber if not separately stored in houseNumber field.

#### billToAddress ([String](/graphql-api/api-reference/objects/string))

The customer's billing address address line or street.

#### billToAddress2 ([String](/graphql-api/api-reference/objects/string))

The customer's billing address additional address information.

#### billToCity ([String](/graphql-api/api-reference/objects/string))

The customer's billing address city or town.

#### billToCompanyName ([String](/graphql-api/api-reference/objects/string))

The company name of the customer's billing address.

#### billToCountry ([String](/graphql-api/api-reference/objects/string))

The customer's billing address country code (ISO3661).

#### billToDistrict ([String](/graphql-api/api-reference/objects/string))

The customer's billing address district.

#### billToFullAddress ([String](/graphql-api/api-reference/objects/string))

The customer's billing address full address by combining address and house number.

#### billToFullName ([String](/graphql-api/api-reference/objects/string))

The customer's billing address full name.

#### billToHouseNumber ([String](/graphql-api/api-reference/objects/string))

The customer's billing address house, building, or appartment number.

#### billToHouseNumberAddition ([String](/graphql-api/api-reference/objects/string))

The customer's billing address house, building, or appartment number addition.

#### billToLastName ([String](/graphql-api/api-reference/objects/string))

The customer's billing address last name.

#### billToName ([String](/graphql-api/api-reference/objects/string))

The customer' billing address first name.

#### billToPhoneNumber ([String](/graphql-api/api-reference/objects/string))

The customer's billing address phone number (international format).

#### billToSalutation ([String](/graphql-api/api-reference/objects/string))

The customer's billing address salutation (mr,ms,mx).

#### billToState ([String](/graphql-api/api-reference/objects/string))

The customer's billing address state or province (ISO3661-2).

#### billToZipcode ([String](/graphql-api/api-reference/objects/string))

The customer's billing address zip code or postal code.

#### city ([String](/graphql-api/api-reference/objects/string))

The customer's city

#### companyName ([String](/graphql-api/api-reference/objects/string))

The customer's company name in case of a B2B customer.

#### country ([String](/graphql-api/api-reference/objects/string))

The customer's country (two-letter ISO code)

#### dateOfBirth ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))

The customer's date of birth

#### email ([String](/graphql-api/api-reference/objects/string))

The customer's email address

#### extraFields (\[[ExtraFieldAnswer](/graphql-api/api-reference/objects/extra-field-answer)!])

List of extra fields and its values on this cart.

#### fullName ([String](/graphql-api/api-reference/objects/string))

The customer's full name

#### houseNumber ([String](/graphql-api/api-reference/objects/string))

The customer's houseNumber if given

#### id ([Int](/graphql-api/api-reference/objects/int))

The unique ID of this cart

#### initialAmountIncludingTaxCents ([Int](/graphql-api/api-reference/objects/int))

The initial amount the customer will pay at signup including tax in cents.

#### lastName ([String](/graphql-api/api-reference/objects/string))

The customer's last name

#### marketingOptIn ([Boolean](/graphql-api/api-reference/objects/boolean))

Whether the customer is opted in to receiving marketing communication.

#### monthlyAmountExcludingTaxCents ([Int](/graphql-api/api-reference/objects/int))

The monthly amount for this subscription excluding tax in cents

#### monthlyAmountIncludingTaxCents ([Int](/graphql-api/api-reference/objects/int))

The monthly amount for this subscription including tax in cents

#### monthlyAmountTaxCents ([Int](/graphql-api/api-reference/objects/int))

The total amount of tax for this subscription monthly amount in cents

#### name ([String](/graphql-api/api-reference/objects/string))

The customer's first name

#### orderedProducts (\[[OrderedProduct](/graphql-api/api-reference/objects/ordered-product)!])

A list of the cart's ordered products.

#### phoneNumber ([String](/graphql-api/api-reference/objects/string))

The customer's phone number (international format)

#### products (\[[Product](/graphql-api/api-reference/objects/product)!])

A list of the cart's products (via OrderedProducts).

#### ~~project (~~[~~Project~~](/graphql-api/api-reference/objects/project)~~!)~~

*`Deprecated: Will be removed.`*

#### salutation ([String](/graphql-api/api-reference/objects/string))

The customer's salutation (mr, ms, mx)

#### signupCompletedAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription completed their signup and made their initial payment (or no payment if free).

#### state ([String](/graphql-api/api-reference/objects/string))

The customer's state

#### subscribedPlan ([SubscribedPlan](/graphql-api/api-reference/objects/subscribed-plan))

The subscribed plan for this cart

#### token ([String](/graphql-api/api-reference/objects/string))

Token of the subscription represented by this cart.

#### vatNumber ([String](/graphql-api/api-reference/objects/string))

The company's VAT number.

#### zipcode ([String](/graphql-api/api-reference/objects/string))

The customer's postal code or zipcode


# discountCodes

List of discount codes.

### Arguments

| Argument                                                           | Description                                                             |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| redeemable ([Boolean](/graphql-api/api-reference/objects/boolean)) | Only list discount codes that can be redeemed.                          |
| expired ([Boolean](/graphql-api/api-reference/objects/boolean))    | Only list discount codes that are already fully used (expired).         |
| after ([String](/graphql-api/api-reference/objects/string))        | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))       | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))              | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))               | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[DiscountCodeEdge](/graphql-api/api-reference/objects/discount-code-edge)])

A list of edges.

#### nodes (\[[DiscountCode](/graphql-api/api-reference/objects/discount-code)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# getCollectionCase

Fetch a collection case by id.

### Arguments

| Argument                                         | Description |
| ------------------------------------------------ | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)) |             |

### Return fields

#### caseNumber ([String](/graphql-api/api-reference/objects/string)!)

The collection case number

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the collection case record was first created.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

ID to identify the collection case with

#### invoices ([InvoiceConnection](/graphql-api/api-reference/objects/invoice-connection))

Invoices part of this collection case

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### ~~project (~~[~~Project~~](/graphql-api/api-reference/objects/project)~~!)~~

*`Deprecated: Will be removed.`*

#### status ([CollectionCaseStatus](/graphql-api/api-reference/objects/collection-case-status)!)

The status of the collection case

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the collection case record was last updated.


# getCurrentProject

Returns the project identified by current access token.

### Return fields

#### availableCountries (\[[String](/graphql-api/api-reference/objects/string)!]!)

The available countries for this project

#### availableCountryStates ([JSON](/graphql-api/api-reference/objects/json)!)

The available states per country for this project

#### currency ([String](/graphql-api/api-reference/objects/string)!)

The currency of the project

#### currentStock ([Int](/graphql-api/api-reference/objects/int))

The current stock of a project

#### discountCodes (\[[DiscountCode](/graphql-api/api-reference/objects/discount-code)!])

The available discount codes for this project

#### dynamicOrderStrategy ([String](/graphql-api/api-reference/objects/string)!)

The type of the dynamic order strategy for this project

#### extraFields (\[[ExtraField](/graphql-api/api-reference/objects/extra-field)!])

The extra fields for this project

#### freeShipmentFromCents ([Int](/graphql-api/api-reference/objects/int))

The threshold that will make shipment free in cents (works in combination with Firmhouse shipping methods)

#### id ([ID](/graphql-api/api-reference/objects/id)!)

ID to identify the project with

#### licence ([Licence](/graphql-api/api-reference/objects/licence))

Licence

#### name ([String](/graphql-api/api-reference/objects/string)!)

The name of the project

#### paymentProvider ([String](/graphql-api/api-reference/objects/string))

The payment provider of this project

#### plans (\[[Plan](/graphql-api/api-reference/objects/plan)!]!)

The available plans for this project

#### productImageUrl ([String](/graphql-api/api-reference/objects/string))

Image of the main product of the project

#### productName ([String](/graphql-api/api-reference/objects/string))

Name of the main product of the project

#### products (\[[Product](/graphql-api/api-reference/objects/product)!]!)

The available products for this project

#### projectType ([String](/graphql-api/api-reference/objects/string))

The type of the project

#### promotions (\[[Promotion](/graphql-api/api-reference/objects/promotion)!]!)

The available promotions for this project

#### ~~shippingCostsCents (~~[~~Int~~](/graphql-api/api-reference/objects/int)~~)~~

*`Deprecated: Will be removed.`*

#### ~~shippingCostsExclTaxCents (~~[~~Int~~](/graphql-api/api-reference/objects/int)~~)~~

*`Deprecated: Will be removed.`*

#### subscriptionLimitEnabled ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the amount of subscriptions is limited

#### taxRates (\[[TaxRate](/graphql-api/api-reference/objects/tax-rate)!]!)

The available tax rates for this project

#### token ([ID](/graphql-api/api-reference/objects/id)!)

Token to identify the project with

#### twoStepCancellationEnabled ([Boolean](/graphql-api/api-reference/objects/boolean))

Whether two-step cancellation is enabled for this project

#### twoStepSignupEnabled ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether two step signup is enabled for this project

#### updatedAt ([String](/graphql-api/api-reference/objects/string))

Project last updated since


# getDiscountCode

Get discount code details. Fetch by code is case-insensitive.

### Arguments

| Argument                                            | Description |
| --------------------------------------------------- | ----------- |
| code ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### activated ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the discount code is activated or deactivated.

#### autoSelectPlan ([Plan](/graphql-api/api-reference/objects/plan))

If set the discout code will auto select this plan

#### code ([String](/graphql-api/api-reference/objects/string)!)

The unique code that can be applied to a checkout

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the discound code was created.

#### expired ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the discount code has already expired.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

ID to identify the discount code with

#### maxTimesUsed ([Int](/graphql-api/api-reference/objects/int))

The max usage of this discount code

#### metadata ([JSON](/graphql-api/api-reference/objects/json))

Metadata makes it possible to store additional information on objects.

#### promotion ([Promotion](/graphql-api/api-reference/objects/promotion))

Promotion that is attached to the discount code

#### promotionId ([ID](/graphql-api/api-reference/objects/id)!)

ID of the promotion that is attached to the discount code

#### redeemable ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the discount code can be redeemed. Returns true only if related Discount is activated and Discount code has not expired.

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the discound code was updated last time.


# getInvoice

Fetch an invoice by token or id.

### Arguments

| Argument                                            | Description |
| --------------------------------------------------- | ----------- |
| token ([ID](/graphql-api/api-reference/objects/id)) |             |
| id ([ID](/graphql-api/api-reference/objects/id))    |             |

### Return fields

#### city ([String](/graphql-api/api-reference/objects/string))

The customer's city or town stored on the invoice.

#### collectionCase ([CollectionCase](/graphql-api/api-reference/objects/collection-case))

The collection case this invoice is part of.

#### companyName ([String](/graphql-api/api-reference/objects/string))

The customer's company name stored on the invoice.

#### country ([String](/graphql-api/api-reference/objects/string))

The billing country code (ISO 3116) stored on the invoice.

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the invoice record was first created.

#### currency ([String](/graphql-api/api-reference/objects/string))

Currency used for this invoice

#### description ([String](/graphql-api/api-reference/objects/string))

The description of the invoice.

#### detailsUrl ([String](/graphql-api/api-reference/objects/string)!)

URL to view invoice details, PDF download, and manual payment link.

#### externalUrl ([String](/graphql-api/api-reference/objects/string))

An external invoice URL that replaces the default invoice

#### fullAddress ([String](/graphql-api/api-reference/objects/string))

The customer's full address by combining address and house number stored on the invoice.

#### fullName ([String](/graphql-api/api-reference/objects/string))

The customer's full name stored on the invoice.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

The database ID of this invoice.

#### invoiceLineItems (\[[InvoiceLineItem](/graphql-api/api-reference/objects/invoice-line-item)!])

The line items of this invoice.

#### invoiceNumber ([String](/graphql-api/api-reference/objects/string)!)

The formatted (legal) invoice number.

#### invoiceReminders (\[[InvoiceReminder](/graphql-api/api-reference/objects/invoice-reminder)!])

The reminders for this invoice.

#### invoiceStatus ([InvoiceStatusEnum](/graphql-api/api-reference/objects/invoice-status-enum)!)

The payment status of the invoice.

#### invoicedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

When the invoice was formally invoiced.

#### nextInstalmentChargeDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))

The next instalment charge date for this invoice. Is empty if the last instalment of the invoice has already been charged or the invoice is being paid in 1 instalment.

#### originalInvoice ([Invoice](/graphql-api/api-reference/objects/invoice))

The associated original invoice for this invoice (only available for credit invoices)

#### paidAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the invoice was paid.

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The associated payment for this invoice. Can be null if this order didn't require payment.

#### payments ([PaymentConnection](/graphql-api/api-reference/objects/payment-connection))

The payment instalments for the invoice

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### pdfUrl ([String](/graphql-api/api-reference/objects/string))

URL to download the generated invoice PDF.

#### phoneNumber ([String](/graphql-api/api-reference/objects/string))

The customer's full international phone number stored on the invoice.

#### salutation ([String](/graphql-api/api-reference/objects/string))

The customer's salutation (mr,ms,mx) stored on the invoice.

#### state ([String](/graphql-api/api-reference/objects/string))

The customer's state stored on the invoice.

#### ~~status (~~[~~String~~](/graphql-api/api-reference/objects/string)~~!)~~

*`Deprecated: Use the 'invoice_status' field instead.`*

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The associated subscription. Can be null in case of an archived subscription.

#### subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)

ID of the associated subscription.

#### taxPercentage ([Float](/graphql-api/api-reference/objects/float))

The percentage of tax used for this invoice.

#### totalAmountCents ([Int](/graphql-api/api-reference/objects/int)!)

Total amount of invoice in cents.

#### totalTaxAmountCents ([Int](/graphql-api/api-reference/objects/int)!)

Total tax amount of invoice in cents.

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

The date and time when the invoice was last updated.

#### zipcode ([String](/graphql-api/api-reference/objects/string))

The customer's postal code or zipcode stored on the invoice.


# getOrder

Fetch an order

### Arguments

| Argument                                          | Description |
| ------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### acceptUrl ([String](/graphql-api/api-reference/objects/string))

The url to accept and pay for this order

#### amountCents ([Int](/graphql-api/api-reference/objects/int)!)

The amount in cents

#### cancelUrl ([String](/graphql-api/api-reference/objects/string))

The url to cancel this order

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

Order creation date

#### currency ([String](/graphql-api/api-reference/objects/string))

Currency used for this order

#### discountCents ([Int](/graphql-api/api-reference/objects/int))

The amount of discount for this order in cents including tax

#### discountExclTaxCents ([Int](/graphql-api/api-reference/objects/int))

The amount of discount for this order in cents excluding tax

#### extraFieldAnswersSummary ([JSON](/graphql-api/api-reference/objects/json))

Summary of extra field answers from the shipping section only (captured when the order was created). Each entry is an object with a single key-value pair: the field name as key and answer value as value.

#### fulfilledAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

Time at which the order was marked as fulfilled.

#### id ([ID](/graphql-api/api-reference/objects/id))

ID to identify the order with

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

The invoice for this order. Can be null if this order is a shipment-only order without directly being related to a payment or invoice.

#### metadata ([JSON](/graphql-api/api-reference/objects/json))

Metadata makes it possible to store additional information on objects.

#### orderLines (\[[OrderLine](/graphql-api/api-reference/objects/order-line)!])

The lines on the order.

#### paid ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Wether the order and its invoice is paid. Will always be true if the order total amount is zero and no invoice is attached.

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The associated payment for this order. Can be null if this order is a shipment-only order.

#### shipmentDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))

The date on which the order is initiated

#### shippingCostsCents ([Int](/graphql-api/api-reference/objects/int))

The amount of shipping cost for this order in cents including tax

#### shippingCostsExclTaxCents ([Int](/graphql-api/api-reference/objects/int))

The amount of shipping cost for this order in cents excluding tax

#### shopifyDraftId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify draft order ID.

#### shopifyFulfillmentOrderId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify fulfillment order ID.

#### shopifyId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify order ID.

#### snoozeUrl ([String](/graphql-api/api-reference/objects/string))

The url to snooze this order

#### status ([OrderStatus](/graphql-api/api-reference/objects/order-status)!)

Order status

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The subscription this order was made for.

#### totalTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

The total amount of tax for this order in cents

#### ~~trackAndTraceCode (~~[~~String~~](/graphql-api/api-reference/objects/string)~~)~~

*`Deprecated: Please use 'tracking_code' instead.`*

The track and trace code for this order.

#### trackingCode ([String](/graphql-api/api-reference/objects/string))

The tracking code for this order. Made available in email templates.

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the order was last updated.


# getOrderBy

Fetch an order

### Arguments

| Argument                                                                        | Description |
| ------------------------------------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id))                                |             |
| shopifyId ([String](/graphql-api/api-reference/objects/string))                 |             |
| shopifyFulfillmentOrderId ([String](/graphql-api/api-reference/objects/string)) |             |

### Return fields

#### acceptUrl ([String](/graphql-api/api-reference/objects/string))

The url to accept and pay for this order

#### amountCents ([Int](/graphql-api/api-reference/objects/int)!)

The amount in cents

#### cancelUrl ([String](/graphql-api/api-reference/objects/string))

The url to cancel this order

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

Order creation date

#### currency ([String](/graphql-api/api-reference/objects/string))

Currency used for this order

#### discountCents ([Int](/graphql-api/api-reference/objects/int))

The amount of discount for this order in cents including tax

#### discountExclTaxCents ([Int](/graphql-api/api-reference/objects/int))

The amount of discount for this order in cents excluding tax

#### extraFieldAnswersSummary ([JSON](/graphql-api/api-reference/objects/json))

Summary of extra field answers from the shipping section only (captured when the order was created). Each entry is an object with a single key-value pair: the field name as key and answer value as value.

#### fulfilledAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

Time at which the order was marked as fulfilled.

#### id ([ID](/graphql-api/api-reference/objects/id))

ID to identify the order with

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

The invoice for this order. Can be null if this order is a shipment-only order without directly being related to a payment or invoice.

#### metadata ([JSON](/graphql-api/api-reference/objects/json))

Metadata makes it possible to store additional information on objects.

#### orderLines (\[[OrderLine](/graphql-api/api-reference/objects/order-line)!])

The lines on the order.

#### paid ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Wether the order and its invoice is paid. Will always be true if the order total amount is zero and no invoice is attached.

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The associated payment for this order. Can be null if this order is a shipment-only order.

#### shipmentDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))

The date on which the order is initiated

#### shippingCostsCents ([Int](/graphql-api/api-reference/objects/int))

The amount of shipping cost for this order in cents including tax

#### shippingCostsExclTaxCents ([Int](/graphql-api/api-reference/objects/int))

The amount of shipping cost for this order in cents excluding tax

#### shopifyDraftId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify draft order ID.

#### shopifyFulfillmentOrderId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify fulfillment order ID.

#### shopifyId ([String](/graphql-api/api-reference/objects/string))

The associated Shopify order ID.

#### snoozeUrl ([String](/graphql-api/api-reference/objects/string))

The url to snooze this order

#### status ([OrderStatus](/graphql-api/api-reference/objects/order-status)!)

Order status

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The subscription this order was made for.

#### totalTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

The total amount of tax for this order in cents

#### ~~trackAndTraceCode (~~[~~String~~](/graphql-api/api-reference/objects/string)~~)~~

*`Deprecated: Please use 'tracking_code' instead.`*

The track and trace code for this order.

#### trackingCode ([String](/graphql-api/api-reference/objects/string))

The tracking code for this order. Made available in email templates.

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the order was last updated.


# getOrderCalculations

Deprecated: Will be removed. Calculate order prices

### Arguments

| Argument                                                                                              | Description                                     |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| orderedProducts (\[[OrderedProductInput](/graphql-api/api-reference/objects/ordered-product-input)!]) | The ordered products that are part of the order |
| discountCode ([String](/graphql-api/api-reference/objects/string))                                    |                                                 |

### Return fields

#### amountUntilFreeShippingCents ([Int](/graphql-api/api-reference/objects/int))

Amount in cents until shipping is free

#### amountUntilFreeShippingExclTaxCents ([Int](/graphql-api/api-reference/objects/int))

Amount in cents until shipping is free excluding tax

#### amountUntilFreeShippingInclTaxCents ([Int](/graphql-api/api-reference/objects/int))

Amount in cents until shipping is free including tax

#### currency ([String](/graphql-api/api-reference/objects/string)!)

The currency for this order

#### discountCents ([Int](/graphql-api/api-reference/objects/int)!)

Total discount in cents including tax

#### discountExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Total discount excluding tax in cents

#### discountInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Total discount including tax in cents

#### percentDiscount ([Int](/graphql-api/api-reference/objects/int))

Total percentage of discount

#### promotionDiscountExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Promotion discount excluding tax in cents

#### promotionDiscountInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Promotion discount including tax in cents

#### shippingCostsCents ([Int](/graphql-api/api-reference/objects/int)!)

ShippingCosts in cents for the (virtual) order including tax

#### shippingCostsExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

ShippingCosts in cents for the (virtual) order excluding tax

#### shippingCostsInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

ShippingCosts in cents for the (virtual) order including tax

#### subtotalBeforeShippingExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Subtotal in cents before shipping and discount excluding tax

#### subtotalBeforeShippingInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Subtotal in cents before shipping and discount including tax

#### subtotalCents ([Int](/graphql-api/api-reference/objects/int)!)

Subtotal in cents before shipping and discount

#### totalCents ([Int](/graphql-api/api-reference/objects/int)!)

Total in cents including tax

#### totalExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Total in cents excluding tax

#### totalInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Total in cents including tax

#### totalTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Total tax in cents for the (virtual) order

#### volumeDiscountExclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Volume discount excluding tax in cents

#### volumeDiscountInclTaxCents ([Int](/graphql-api/api-reference/objects/int)!)

Volume discount including tax in cents


# getOrders

Deprecated: Use \`orders\` connection instead. List of orders


# getPayment

Fetch a payment by id or token.

### Arguments

| Argument                                            | Description |
| --------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id))    |             |
| token ([ID](/graphql-api/api-reference/objects/id)) |             |

### Return fields

#### amountCents ([Int](/graphql-api/api-reference/objects/int)!)

Payment amount in cents.

#### amountWithSymbol ([String](/graphql-api/api-reference/objects/string)!)

Payment amount with currency symbol.

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the payment record was first created.

#### currency ([String](/graphql-api/api-reference/objects/string))

Payment currency

#### id ([ID](/graphql-api/api-reference/objects/id)!)

The database ID of the payment.

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

The invoice associated with this payment. The original payment and all its retry attempts are associated with one invoice.

#### paymentId ([ID](/graphql-api/api-reference/objects/id))

The external payment reference from the payment service provider.

#### paymentStatus ([PaymentStatusEnum](/graphql-api/api-reference/objects/payment-status-enum)!)

Status of the payment.

#### paymentType ([PaymentTypeEnum](/graphql-api/api-reference/objects/payment-type-enum)!)

The type of transaction that this payment represents

#### refunds (\[[Refund](/graphql-api/api-reference/objects/refund)!])

The refunds for this payment.

#### retryPaymentUrl ([String](/graphql-api/api-reference/objects/string))

Send your customer to this URL to allow them to retry the failed payment. Append ?return\_url=<https://your-url> to send the customer back after a successful payment.

#### ~~status (~~[~~String~~](/graphql-api/api-reference/objects/string)~~)~~

*`Deprecated: Use the 'payment_status' field instead.`*

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The subscription associated with this payment.

#### token ([ID](/graphql-api/api-reference/objects/id)!)

Token to identify the payment with

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the payment record was last updated.


# getRefund

Fetch a refund by id or payment id.

### Arguments

| Argument                                                | Description |
| ------------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id))        |             |
| paymentId ([ID](/graphql-api/api-reference/objects/id)) |             |

### Return fields

#### amountCents ([Int](/graphql-api/api-reference/objects/int)!)

Refund amount in cents.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

The database ID of the refund.

#### payment ([Payment](/graphql-api/api-reference/objects/payment)!)

The payment the refund was issued for.

#### paymentProviderObjectId ([String](/graphql-api/api-reference/objects/string))

The payment provider ID for this refund

#### reason ([String](/graphql-api/api-reference/objects/string))

Reason why the refund was issued.

#### refundedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The creation time of the refund.

#### status ([RefundStatus](/graphql-api/api-reference/objects/refund-status)!)

Status of the refund.


# getServiceChannelBy

Fetch a service channel by id or slug.

### Arguments

| Argument                                                   | Description                                              |
| ---------------------------------------------------------- | -------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id))           | Only list service channels that match the passed in ID   |
| slug ([String](/graphql-api/api-reference/objects/string)) | Only list service channels that match the passed in slug |

### Return fields

#### address ([String](/graphql-api/api-reference/objects/string))

The address of the service channel

#### bccEmail ([String](/graphql-api/api-reference/objects/string))

Every email sent to a customer assigned to this Service Channel will also be BCC'd to this email address.

#### ~~email (~~[~~String~~](/graphql-api/api-reference/objects/string)~~)~~

*`Deprecated: Will be renamed to new bcc_email field.`*

The email of the service channel

#### id ([ID](/graphql-api/api-reference/objects/id)!)

The database ID of the service channel.

#### name ([String](/graphql-api/api-reference/objects/string)!)

The name of the service channel

#### slug ([String](/graphql-api/api-reference/objects/string)!)

The slug of the service channel


# getSubscription

Get subscription details.

### Arguments

| Argument                                             | Description |
| ---------------------------------------------------- | ----------- |
| token ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### activatedAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription was activated and billing started.

#### activePlan ([Plan](/graphql-api/api-reference/objects/plan))

Returns the plan the subscription is currently subscribed to.

#### address ([String](/graphql-api/api-reference/objects/string))

The customer's full address line or just street. Can include houseNumber if not separately stored in houseNumber field.

#### address2 ([String](/graphql-api/api-reference/objects/string))

The customer's additional address information.

#### amountForStartingSubscriptionCents ([Int](/graphql-api/api-reference/objects/int))

The amount that is due on checkout (in cents).

#### appliedBillingCyclePromotions (\[[AppliedBillingCyclePromotion](/graphql-api/api-reference/objects/applied-billing-cycle-promotion)!])

List of billing cycle promotions applied for this customer.

#### appliedOrderDiscountPromotions (\[[AppliedOrderDiscountPromotion](/graphql-api/api-reference/objects/applied-order-discount-promotion)!])

List of order discount promotions applied for this customer.

#### appliedPromotions (\[[AppliedPromotion](/graphql-api/api-reference/objects/applied-promotion)!])

List of all applied promotions for this customer.

#### billToAddress ([String](/graphql-api/api-reference/objects/string))

The customer's billing address address line or street.

#### billToAddress2 ([String](/graphql-api/api-reference/objects/string))

The customer's billing address additional address information.

#### billToCity ([String](/graphql-api/api-reference/objects/string))

The customer's billing address city or town.

#### billToCompanyName ([String](/graphql-api/api-reference/objects/string))

The company name of the customer's billing address.

#### billToCountry ([String](/graphql-api/api-reference/objects/string))

The customer's billing address country code (ISO3661).

#### billToDistrict ([String](/graphql-api/api-reference/objects/string))

The customer's billing address district.

#### billToFullAddress ([String](/graphql-api/api-reference/objects/string))

The customer's billing address full address by combining address and house number.

#### billToFullName ([String](/graphql-api/api-reference/objects/string))

The customer's billing address full name.

#### billToHouseNumber ([String](/graphql-api/api-reference/objects/string))

The customer's billing address house, building, or appartment number.

#### billToHouseNumberAddition ([String](/graphql-api/api-reference/objects/string))

The customer's billing address house, building, or appartment number addition.

#### billToLastName ([String](/graphql-api/api-reference/objects/string))

The customer's billing address last name.

#### billToName ([String](/graphql-api/api-reference/objects/string))

The customer' billing address first name.

#### billToPhoneNumber ([String](/graphql-api/api-reference/objects/string))

The customer's billing address phone number (international format).

#### billToSalutation ([String](/graphql-api/api-reference/objects/string))

The customer's billing address salutation (mr,ms,mx).

#### billToState ([String](/graphql-api/api-reference/objects/string))

The customer's billing address state or province (ISO3661-2).

#### billToZipcode ([String](/graphql-api/api-reference/objects/string))

The customer's billing address zip code or postal code.

#### cancellationStartedAt ([String](/graphql-api/api-reference/objects/string))

The date and time when cancellation was initiated for the subscription (in case of two-step cancellation).

#### cancelledAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription was cancelled.

#### chargeDayOfTheMonth ([Int](/graphql-api/api-reference/objects/int))

The day of the month when the customer is charged.

#### checkoutUrl ([String](/graphql-api/api-reference/objects/string))

URL for the customers to complete their draft subscription.

#### churnRequests ([ChurnRequestConnection](/graphql-api/api-reference/objects/churn-request-connection))

List of churn requests for this customer.

| Argument                                                                                | Description                                                             |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| createdSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter churn requests to those created since the given datetime.        |
| createdUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter churn requests to those created until the given datetime.        |
| status ([ChurnRequestStatus](/graphql-api/api-reference/objects/churn-request-status))  | Filter churn requests by status. Lists all if none given.               |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                            | Filter churn requests to a specific subscription.                       |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                            |

#### city ([String](/graphql-api/api-reference/objects/string))

The customer's city or town.

#### collectionCases ([CollectionCaseConnection](/graphql-api/api-reference/objects/collection-case-connection))

List of collection cases for this customer.

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### companyName ([String](/graphql-api/api-reference/objects/string))

The customer's company name.

#### country ([String](/graphql-api/api-reference/objects/string))

The customer's country code (ISO 3116)

#### createdAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription record was first created.

#### currency ([String](/graphql-api/api-reference/objects/string))

The currency used for this subscription

#### customerFeedbacks (\[[CustomerFeedback](/graphql-api/api-reference/objects/customer-feedback)!])

List of customer feedback for this customer.

#### customerId ([String](/graphql-api/api-reference/objects/string))

The customer ID given by the selected payment provider

#### customerReference ([String](/graphql-api/api-reference/objects/string))

The field that can be used for your internal reference. For example, internal customer id.

#### dateOfBirth ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))

The customer's date of birth

#### deliveryMethod ([DeliveryMethod](/graphql-api/api-reference/objects/delivery-method)!)

The delivery method for this subscription.

#### differentBillingAddress ([Boolean](/graphql-api/api-reference/objects/boolean))

Whether billing and shipping addresses are the same. Set this flag to \`true\` to store a separate billing address.

#### discountCodes (\[[DiscountCode](/graphql-api/api-reference/objects/discount-code)!])

The assigned discount codes.

#### district ([String](/graphql-api/api-reference/objects/string))

The customer's district

#### email ([String](/graphql-api/api-reference/objects/string))

The customer's email address

#### exemptFromShippingCosts ([Boolean](/graphql-api/api-reference/objects/boolean))

Will never add any shipping costs to any order

#### extraFields (\[[ExtraFieldAnswer](/graphql-api/api-reference/objects/extra-field-answer)!]!)

List of extra fields and values.

#### fullAddress ([String](/graphql-api/api-reference/objects/string))

The customer's full address by combining address and house number.

#### fullName ([String](/graphql-api/api-reference/objects/string))

The customer's full name.

#### houseNumber ([String](/graphql-api/api-reference/objects/string))

The customer's house number.

#### houseNumberAddition ([String](/graphql-api/api-reference/objects/string))

The customer's house number addition.

#### id ([String](/graphql-api/api-reference/objects/string))

The id of the subscription.

#### identityVerificationUrl ([String](/graphql-api/api-reference/objects/string))

Identity verification URL that automatically uses the configured provider. Append ?return\_url=<https://your-url> to send the customer back after a successful identification.

#### inTrialPeriod ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether this subscription is currently in its trial period.

#### invoices (\[[Invoice](/graphql-api/api-reference/objects/invoice)!])

List of invoices of this customer.

#### lastName ([String](/graphql-api/api-reference/objects/string))

The customer's last name.

#### locale ([String](/graphql-api/api-reference/objects/string))

The customer's locale/language.

#### markedAsNonPayingAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription was last marked as non-paying.

#### marketingOptIn ([Boolean](/graphql-api/api-reference/objects/boolean))

Whether the customer accepted the optional marketing opt-in.

#### metadata ([JSON](/graphql-api/api-reference/objects/json))

Metadata makes it possible to store additional information on objects.

#### ~~monthlyAmount (~~[~~Float~~](/graphql-api/api-reference/objects/float)~~)~~

*`Deprecated: Use monthlyAmountCents instead.`*

The monthly amount that is charged.

#### monthlyAmountCents ([Int](/graphql-api/api-reference/objects/int))

The monthly amount that is charged (in cents)

#### name ([String](/graphql-api/api-reference/objects/string))

The customer's first name.

#### notes ([String](/graphql-api/api-reference/objects/string))

Notes about the customer that can be set in the portal

#### ~~orderCalculation (~~[~~OrderCalculation~~](/graphql-api/api-reference/objects/order-calculation)~~)~~

*`Deprecated: Will be removed.`*

Calculate order prices

| Argument                                                                                              | Description                                     |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| orderedProducts (\[[OrderedProductInput](/graphql-api/api-reference/objects/ordered-product-input)!]) | The ordered products that are part of the order |
| discountCode ([String](/graphql-api/api-reference/objects/string))                                    |                                                 |

#### orderedProducts (\[[OrderedProduct](/graphql-api/api-reference/objects/ordered-product)!])

List of products the subscription is on.

#### ~~orders (\[~~[~~Order~~](/graphql-api/api-reference/objects/order)~~!])~~

*`Deprecated: Use 'ordersV2' instead.`*

List of orders of this subscription

#### ordersV2 ([OrderConnection](/graphql-api/api-reference/objects/order-connection))

List of orders of this subscription

| Argument                                                                                | Description                                                             |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| createdSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where created since the given datetime.     |
| paid ([Boolean](/graphql-api/api-reference/objects/boolean))                            | Only list orders with given payment status on related invoice.          |
| hasShopifyId ([Boolean](/graphql-api/api-reference/objects/boolean))                    | Filter orders by whether they have an associated Shopify order ID.      |
| reverse ([Boolean](/graphql-api/api-reference/objects/boolean))                         | Reverse the sort order                                                  |
| status ([OrderStatus](/graphql-api/api-reference/objects/order-status))                 | Filter orders on given status. Lists all orders if none given.          |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where updated since the given datetime.     |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where updated until the given datetime.     |
| orderBy ([OrderSortEnum](/graphql-api/api-reference/objects/order-sort-enum))           | Specify the sort order for orders. Defaults to CREATED\_AT.             |
| shipmentDateFrom ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))      | Filter orders with a shipment date on or later than.                    |
| shipmentDateTo ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))        | Filter orders with a shipment date on or prior to.                      |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                            |

#### paidAmount ([Float](/graphql-api/api-reference/objects/float))

The amount that is succesfully paid so far.

#### pausedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The time the subscription was paused.

#### pausedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The time the subscription will be automatically resumed.

#### paymentMethod ([String](/graphql-api/api-reference/objects/string))

The payment method currently in use for billing

#### paymentMethodSummary ([String](/graphql-api/api-reference/objects/string))

The last 4 digits of the current payment method.

#### paymentMethodTranslated ([String](/graphql-api/api-reference/objects/string))

Localised string of the payment method currently in use for billing.

#### phoneNumber ([String](/graphql-api/api-reference/objects/string))

The customer's full international phone number

#### pickupPoint ([PickupPoint](/graphql-api/api-reference/objects/pickup-point))

The pickup point associated with this subscription, if delivery method is pickup\_point.

#### products (\[[Product](/graphql-api/api-reference/objects/product)!])

List of products the subscription is on (via orderedProducts).

#### ~~project (~~[~~Project~~](/graphql-api/api-reference/objects/project)~~!)~~

*`Deprecated: Will be removed.`*

#### ~~projectId (~~[~~ID~~](/graphql-api/api-reference/objects/id)~~!)~~

*`Deprecated: Will be removed.`*

#### pspPaymentMethodDetails ([JSON](/graphql-api/api-reference/objects/json))

The payment method details returned by PSP currently used for billing.

#### referrerCode ([DiscountCode](/graphql-api/api-reference/objects/discount-code))

The unique referral code this subscription can share with others.

#### rejectedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the subscription was rejected.

#### salutation ([String](/graphql-api/api-reference/objects/string))

The customer's salutation (mr,ms,mx).

#### serviceChannel ([ServiceChannel](/graphql-api/api-reference/objects/service-channel))

Returns the service channel this subscription has signed up to

#### shippingMethodId ([ID](/graphql-api/api-reference/objects/id))

The ID of the shipping method used for this subscription.

#### shippingNotes ([String](/graphql-api/api-reference/objects/string))

The customer's shipping notes (delivery instructions).

#### signupCompletedAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription completed their signup and made their initial payment (or no payment if free).

#### skipAutoActivationOnSignup ([Boolean](/graphql-api/api-reference/objects/boolean)!)

If true then the subscription won't be activated after signup and initial payment.

#### startDate ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

The date and time when this subscription was (or will be) charged for the first time.

#### state ([String](/graphql-api/api-reference/objects/string))

The customer's state

#### status ([SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status)!)

Status of this customer.

#### stoppedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

The date and time when the subscription was automatically stopped.

#### subscribedPlan ([SubscribedPlan](/graphql-api/api-reference/objects/subscribed-plan))

Returns the plan relationship and contract terms of the current plan

#### subscriptionAcceptanceChecks ([SubscriptionAcceptanceCheckConnection](/graphql-api/api-reference/objects/subscription-acceptance-check-connection))

List of acceptance checks of this subscription

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### subscriptionAccount ([SubscriptionAccount](/graphql-api/api-reference/objects/subscription-account))

The subscription account this subscription belongs to.

#### subscriptionAccountId ([ID](/graphql-api/api-reference/objects/id))

ID of the subscription account this subscription belongs to.

#### subscriptionFiles (\[[SubscriptionFile](/graphql-api/api-reference/objects/subscription-file)!]!)

Files attached to this subscription.

#### termsAccepted ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the customer accepted the terms and conditions.

#### termsAcceptedOn ([String](/graphql-api/api-reference/objects/string))

Whether the customer has accepted the terms\&conditions.

#### token ([String](/graphql-api/api-reference/objects/string))

Unique token of the subscription

#### trialPeriodMonths ([Int](/graphql-api/api-reference/objects/int))

The number of months before customer is charged for the first time.

#### updatePaymentMethodUrl ([String](/graphql-api/api-reference/objects/string))

Send your customer to this URL to allow them to update their active payment method.

#### updatedAt ([String](/graphql-api/api-reference/objects/string))

The date and time when the subscription was last updated.

#### vatNumber ([String](/graphql-api/api-reference/objects/string))

The company's VAT number.

#### verifiedIdentity ([SubscriptionIdentity](/graphql-api/api-reference/objects/subscription-identity))

Details of the verified identity if present.

#### versions ([VersionConnection](/graphql-api/api-reference/objects/version-connection))

Version history (audit log) of this subscription.

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### zipcode ([String](/graphql-api/api-reference/objects/string))

The customer's postal code or zipcode.


# getSubscriptionAccount

Fetch a subscription account by id.

### Arguments

| Argument                                          | Description |
| ------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

The date and time when the subscription account was created.

#### firstSubscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The first subscription created for this account.

#### id ([ID](/graphql-api/api-reference/objects/id)!)

The id of the subscription account.

#### status ([SubscriptionAccountStatus](/graphql-api/api-reference/objects/subscription-account-status)!)

The current status of the subscription account.

#### subscriptions ([SubscriptionConnection](/graphql-api/api-reference/objects/subscription-connection))

List of subscriptions associated with this account.

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)!)

The date and time when the subscription account was last updated.


# getSubscriptionBySelfServiceCenterLoginToken

Fetch subscription by self service center login token.

### Arguments

| Argument                                             | Description |
| ---------------------------------------------------- | ----------- |
| token ([ID](/graphql-api/api-reference/objects/id)!) |             |


# getSubscriptions

Deprecated: Use the \`subscriptions\` connection instead. Returns paginated list of all subscriptions

### Arguments

| Argument                                                     | Description |
| ------------------------------------------------------------ | ----------- |
| limit ([Int](/graphql-api/api-reference/objects/int))        |             |
| offset ([Int](/graphql-api/api-reference/objects/int))       |             |
| updatedSince ([Int](/graphql-api/api-reference/objects/int)) |             |


# invoices

List of invoices.

### Arguments

| Argument                                                                                                    | Description                                                                           |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| invoicedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                    | Filter invoices to those that where invoiced since the given datetime.                |
| invoicedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                    | Filter invoices to those that where invoiced until the given datetime.                |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                     | Filter invoices to those that where updated since the given datetime.                 |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                     | Filter invoices to those that where updated until the given datetime.                 |
| subscriptionSignupCompletedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter invoices to those whose subscription completed signup since a certain time.    |
| subscriptionSignupCompletedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter invoices to those whose subscription completed signup until a certain time.    |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                | Only list invoices that match the passed in subscription ID.                          |
| subscriptionStatuses (\[[SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status)!])     | Filter invoices on subscription status(es).                                           |
| paymentTypes (\[[PaymentTypeEnum](/graphql-api/api-reference/objects/payment-type-enum)!])                  | Only list invoices with selected payment type. Lists all payment types if none given. |
| statuses (\[[InvoiceStatusEnum](/graphql-api/api-reference/objects/invoice-status-enum)!])                  | Filter invoices on given status. Lists all invoices if none given.                    |
| after ([String](/graphql-api/api-reference/objects/string))                                                 | Returns the elements in the list that come after the specified cursor.                |
| before ([String](/graphql-api/api-reference/objects/string))                                                | Returns the elements in the list that come before the specified cursor.               |
| first ([Int](/graphql-api/api-reference/objects/int))                                                       | Returns the first *n* elements from the list.                                         |
| last ([Int](/graphql-api/api-reference/objects/int))                                                        | Returns the last *n* elements from the list.                                          |

### Return fields

#### edges (\[[InvoiceEdge](/graphql-api/api-reference/objects/invoice-edge)])

A list of edges.

#### nodes (\[[Invoice](/graphql-api/api-reference/objects/invoice)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### revenueExcludingTaxTotalCents ([Int](/graphql-api/api-reference/objects/int)!)

Total invoice revenue excluding tax in cents.

#### revenueIncludingTaxTotalCents ([Int](/graphql-api/api-reference/objects/int)!)

Total invoice revenue including tax in cents.

#### revenueTotalsPerCategory (\[[InvoiceCategoryRevenueSummary](/graphql-api/api-reference/objects/invoice-category-revenue-summary)!]!)

Invoice revenue totals grouped by invoice line item category.

#### revenueTotalsPerProduct (\[[InvoiceProductRevenueSummary](/graphql-api/api-reference/objects/invoice-product-revenue-summary)!]!)

Invoice revenue totals grouped by product.

| Argument                                                     | Description                                            |
| ------------------------------------------------------------ | ------------------------------------------------------ |
| productIds (\[[ID](/graphql-api/api-reference/objects/id)!]) | Only include invoice line items for these product IDs. |

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# orderedProducts

List of ordered products

### Arguments

| Argument                                                                                                       | Description                                                                              |
| -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| shipmentDateFrom ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                    | Filter ordered products with a shipment date on or later then.                           |
| shipmentDateTo ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                      | Filter ordered products with a shipment date on or prior too.                            |
| createdSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                        | Filter ordered products to those created since the given datetime.                       |
| createdUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                        | Filter ordered products to those created until the given datetime.                       |
| subscriptionSignupCompletedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))    | Filter ordered products to subscriptions that completed signup since the given datetime. |
| subscriptionSignupCompletedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))    | Filter ordered products to subscriptions that completed signup until the given datetime. |
| subscriptionStatuses (\[[SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status)!])        | Filter on subscriptions status(es).                                                      |
| orderedProductStatuses (\[[OrderedProductStatus](/graphql-api/api-reference/objects/ordered-product-status)!]) | Filter on ordered product status(es).                                                    |
| productIds (\[[ID](/graphql-api/api-reference/objects/id)!])                                                   | Filter on product id(s).                                                                 |
| productSkus (\[[String](/graphql-api/api-reference/objects/string)!])                                          | The product SKU(s) to filter on.                                                         |
| subscriptionCountries (\[[String](/graphql-api/api-reference/objects/string)!])                                | Filter on subscription country code(s) (ISO 3166-1 alpha-2).                             |
| after ([String](/graphql-api/api-reference/objects/string))                                                    | Returns the elements in the list that come after the specified cursor.                   |
| before ([String](/graphql-api/api-reference/objects/string))                                                   | Returns the elements in the list that come before the specified cursor.                  |
| first ([Int](/graphql-api/api-reference/objects/int))                                                          | Returns the first *n* elements from the list.                                            |
| last ([Int](/graphql-api/api-reference/objects/int))                                                           | Returns the last *n* elements from the list.                                             |

### Return fields

#### edges (\[[OrderedProductEdge](/graphql-api/api-reference/objects/ordered-product-edge)])

A list of edges.

#### nodes (\[[OrderedProduct](/graphql-api/api-reference/objects/ordered-product)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.

#### totalCountPerProductId ([JSON](/graphql-api/api-reference/objects/json)!)

Returns a key value pair of product ID and the value of its ordered product count

#### totalCountPerProductSku ([JSON](/graphql-api/api-reference/objects/json)!)

Returns a key value pair of product SKU and the value of its ordered product count

#### totalQuantityPerProductId ([JSON](/graphql-api/api-reference/objects/json)!)

Returns a key value pair of product ID and the value of its ordered product total quantity

#### totalQuantityPerProductSku ([JSON](/graphql-api/api-reference/objects/json)!)

Returns a key value pair of product SKU and the value of its ordered product total quantity

#### totalUniqueSubscriptionAccountCount ([Int](/graphql-api/api-reference/objects/int))

Returns the distinct subscription account count for the filtered ordered products. Subscriptions without a subscription account are excluded.

#### totalUniqueSubscriptionCount ([Int](/graphql-api/api-reference/objects/int))

Returns the distinct subscription count for the filtered ordered products


# orders

List of orders

### Arguments

| Argument                                                                                | Description                                                             |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| createdSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where created since the given datetime.     |
| paid ([Boolean](/graphql-api/api-reference/objects/boolean))                            | Only list orders with given payment status on related invoice.          |
| hasShopifyId ([Boolean](/graphql-api/api-reference/objects/boolean))                    | Filter orders by whether they have an associated Shopify order ID.      |
| reverse ([Boolean](/graphql-api/api-reference/objects/boolean))                         | Reverse the sort order                                                  |
| status ([OrderStatus](/graphql-api/api-reference/objects/order-status))                 | Filter orders on given status. Lists all orders if none given.          |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where updated since the given datetime.     |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter orders to those that where updated until the given datetime.     |
| orderBy ([OrderSortEnum](/graphql-api/api-reference/objects/order-sort-enum))           | Specify the sort order for orders. Defaults to CREATED\_AT.             |
| shipmentDateFrom ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))      | Filter orders with a shipment date on or later than.                    |
| shipmentDateTo ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))        | Filter orders with a shipment date on or prior to.                      |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[OrderEdge](/graphql-api/api-reference/objects/order-edge)])

A list of edges.

#### nodes (\[[Order](/graphql-api/api-reference/objects/order)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# outstandingInvoices

List of outstanding invoices. An invoice is outstanding when payment has not (yet) come in and when the invoice has not been credited.

### Arguments

| Argument                                                                                                    | Description                                                                                                  |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| invoicedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                    | Filter invoices to those that where invoiced since the given datetime.                                       |
| invoicedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                    | Filter invoices to those that where invoiced until the given datetime.                                       |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                     | Filter invoices to those that where updated since the given datetime.                                        |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                     | Filter invoices to those that where updated until the given datetime.                                        |
| subscriptionSignupCompletedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter invoices to those whose subscription completed signup since a certain time.                           |
| subscriptionSignupCompletedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter invoices to those whose subscription completed signup until a certain time.                           |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                | Only list invoices that match the passed in subscription ID.                                                 |
| subscriptionStatuses (\[[SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status)!])     | Filter invoices on subscription status(es).                                                                  |
| paymentTypes (\[[PaymentTypeEnum](/graphql-api/api-reference/objects/payment-type-enum)!])                  | Only list invoices with selected payment type. Lists all payment types if none given.                        |
| statuses (\[[InvoiceStatusEnum](/graphql-api/api-reference/objects/invoice-status-enum)!])                  | Filter invoices on given status. Lists all invoices if none given.                                           |
| excludePending ([Boolean](/graphql-api/api-reference/objects/boolean))                                      | Exclude invoices that have payment status PENDING. Useful for treating payments underway as not-outstanding. |
| excludeDebtCollectionCases ([Boolean](/graphql-api/api-reference/objects/boolean))                          | Exclude invoices that have a debt collection case                                                            |
| excludeUncollectible ([Boolean](/graphql-api/api-reference/objects/boolean))                                | Exclude invoices that have status UNCOLLECTIBLE                                                              |
| after ([String](/graphql-api/api-reference/objects/string))                                                 | Returns the elements in the list that come after the specified cursor.                                       |
| before ([String](/graphql-api/api-reference/objects/string))                                                | Returns the elements in the list that come before the specified cursor.                                      |
| first ([Int](/graphql-api/api-reference/objects/int))                                                       | Returns the first *n* elements from the list.                                                                |
| last ([Int](/graphql-api/api-reference/objects/int))                                                        | Returns the last *n* elements from the list.                                                                 |

### Return fields

#### edges (\[[InvoiceEdge](/graphql-api/api-reference/objects/invoice-edge)])

A list of edges.

#### nodes (\[[Invoice](/graphql-api/api-reference/objects/invoice)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### revenueExcludingTaxTotalCents ([Int](/graphql-api/api-reference/objects/int)!)

Total invoice revenue excluding tax in cents.

#### revenueIncludingTaxTotalCents ([Int](/graphql-api/api-reference/objects/int)!)

Total invoice revenue including tax in cents.

#### revenueTotalsPerCategory (\[[InvoiceCategoryRevenueSummary](/graphql-api/api-reference/objects/invoice-category-revenue-summary)!]!)

Invoice revenue totals grouped by invoice line item category.

#### revenueTotalsPerProduct (\[[InvoiceProductRevenueSummary](/graphql-api/api-reference/objects/invoice-product-revenue-summary)!]!)

Invoice revenue totals grouped by product.

| Argument                                                     | Description                                            |
| ------------------------------------------------------------ | ------------------------------------------------------ |
| productIds (\[[ID](/graphql-api/api-reference/objects/id)!]) | Only include invoice line items for these product IDs. |

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# payments

List of payments.

### Arguments

| Argument                                                                                   | Description                                                             |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| statuses (\[[PaymentStatusEnum](/graphql-api/api-reference/objects/payment-status-enum)!]) | Filter payments on given status. Lists all payments if none given.      |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                               | Only list payments that match the passed in subscription ID.            |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))    | Filter payments to those that where updated since the given datetime.   |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))    | Filter payments to those that where updated until the given datetime.   |
| after ([String](/graphql-api/api-reference/objects/string))                                | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                               | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                      | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                       | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[PaymentEdge](/graphql-api/api-reference/objects/payment-edge)])

A list of edges.

#### nodes (\[[Payment](/graphql-api/api-reference/objects/payment)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# plans

List of plans.

### Arguments

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[PlanEdge](/graphql-api/api-reference/objects/plan-edge)])

A list of edges.

#### nodes (\[[Plan](/graphql-api/api-reference/objects/plan)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# products

List of products.

### Arguments

| Argument                                                                                | Description                                                             |
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id))                                        | Only list products that match the passed in ID                          |
| sku ([String](/graphql-api/api-reference/objects/string))                               | Only list products that match the passed in SKU                         |
| shopifyVariantId ([String](/graphql-api/api-reference/objects/string))                  | Only list products that match the passed in Shopify variant ID          |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter products to those that where updated since the given datetime.   |
| after ([String](/graphql-api/api-reference/objects/string))                             | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string))                            | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))                                   | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                    | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[ProductEdge](/graphql-api/api-reference/objects/product-edge)])

A list of edges.

#### nodes (\[[Product](/graphql-api/api-reference/objects/product)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# returnOrders

List of return orders.

### Arguments

| Argument                                                                                   | Description                                                                                |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| statuses (\[[ReturnOrderStatus](/graphql-api/api-reference/objects/return-order-status)!]) | Filter return orders to those of specific statuses. Lists all return orders if none given. |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                               | Only list return orders that match the passed in subscription ID.                          |
| after ([String](/graphql-api/api-reference/objects/string))                                | Returns the elements in the list that come after the specified cursor.                     |
| before ([String](/graphql-api/api-reference/objects/string))                               | Returns the elements in the list that come before the specified cursor.                    |
| first ([Int](/graphql-api/api-reference/objects/int))                                      | Returns the first *n* elements from the list.                                              |
| last ([Int](/graphql-api/api-reference/objects/int))                                       | Returns the last *n* elements from the list.                                               |

### Return fields

#### edges (\[[ReturnOrderEdge](/graphql-api/api-reference/objects/return-order-edge)])

A list of edges.

#### nodes (\[[ReturnOrder](/graphql-api/api-reference/objects/return-order)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# selfServiceCenterTemplate

Fetch a Self Service Center V2 template by template file name.

### Arguments

| Argument                                                                                                                    | Description                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| source ([SelfServiceCenterTemplateSourceEnum](/graphql-api/api-reference/objects/self-service-center-template-source-enum)) | Which source of template to return. When omitted, returns both default and customized templates. |
| templateFileName ([String](/graphql-api/api-reference/objects/string)!)                                                     | The file name of the template (e.g. dashboard.liquid).                                           |

### Return fields

#### body ([String](/graphql-api/api-reference/objects/string)!)

The Liquid template body content.

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

When the template was created.

#### customized ([Boolean](/graphql-api/api-reference/objects/boolean)!)

Whether the template has been customized from the default template body.

#### id ([ID](/graphql-api/api-reference/objects/id))

The database ID of the template.

#### latestVersion ([SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version))

The latest saved version for this template.

#### publishedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

When the current version was published.

#### publishedVersion ([SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version))

The saved version currently published for customer-facing rendering.

#### templateFileName ([String](/graphql-api/api-reference/objects/string)!)

The file name identifier of the template (e.g. dashboard.liquid).

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))

When the template was last updated.

#### versions (\[[SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version)!]!)

Saved versions for this template, newest first.


# selfServiceCenterTemplates

List of Self Service Center V2 templates for the current project.

### Arguments

| Argument                                                                                                                    | Description                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| source ([SelfServiceCenterTemplateSourceEnum](/graphql-api/api-reference/objects/self-service-center-template-source-enum)) | Which source of template to return. When omitted, returns both default and customized templates. |


# subscriptionAccounts

List of subscription accounts.

### Arguments

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |

### Return fields

#### edges (\[[SubscriptionAccountEdge](/graphql-api/api-reference/objects/subscription-account-edge)])

A list of edges.

#### nodes (\[[SubscriptionAccount](/graphql-api/api-reference/objects/subscription-account)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# subscriptions

List of subscriptions

### Arguments

| Argument                                                                                        | Description                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| signupCompletedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter subscriptions to those who completed their signup since a certain time.                          |
| signupCompletedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Filter subscriptions to those who completed their signup until a certain time.                          |
| updatedSince ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))         | Filter subscriptions to those who were updated since the given datetime.                                |
| updatedUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))         | Filter subscriptions to those that where updated until the given datetime.                              |
| ids (\[[ID](/graphql-api/api-reference/objects/id)!])                                           | Filter subscriptions to those of specific IDs.                                                          |
| customerReferences (\[[String](/graphql-api/api-reference/objects/string)!])                    | Filter subscriptions to those of specific customer references.                                          |
| planIds (\[[ID](/graphql-api/api-reference/objects/id)!])                                       | Filter subscriptions to those subscribed to specific plan IDs.                                          |
| nextBillingDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))               | Filter subscriptions to those with a specific next billing date.                                        |
| statuses (\[[SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status)!])     | Filter subscriptions to those of specific statuses. Lists all subscriptions except DRAFT if none given. |
| email ([String](/graphql-api/api-reference/objects/string))                                     | Filter subscriptions to those with a specific email address (case-insensitive).                         |
| query ([String](/graphql-api/api-reference/objects/string))                                     | Search subscriptions by customer name, email, token, ID, customer reference, or company name.           |
| after ([String](/graphql-api/api-reference/objects/string))                                     | Returns the elements in the list that come after the specified cursor.                                  |
| before ([String](/graphql-api/api-reference/objects/string))                                    | Returns the elements in the list that come before the specified cursor.                                 |
| first ([Int](/graphql-api/api-reference/objects/int))                                           | Returns the first *n* elements from the list.                                                           |
| last ([Int](/graphql-api/api-reference/objects/int))                                            | Returns the last *n* elements from the list.                                                            |

### Return fields

#### edges (\[[SubscriptionEdge](/graphql-api/api-reference/objects/subscription-edge)])

A list of edges.

#### nodes (\[[Subscription](/graphql-api/api-reference/objects/subscription)])

A list of nodes.

#### pageInfo ([PageInfo](/graphql-api/api-reference/objects/page-info)!)

Information to aid in pagination.

#### totalCount ([Int](/graphql-api/api-reference/objects/int))

The total number of items available.


# Mutations


# activateSubscription

Activates an inactive subscription.

### Arguments

| Argument                                                                                             | Description                         |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------- |
| input ([ActivateSubscriptionInput](/graphql-api/api-reference/objects/activate-subscription-input)!) | Parameters for ActivateSubscription |

### ActivateSubscriptionInput Arguments

| Argument                                                                           | Description                                                                                                                                                         |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                                  | ID of the inactive subscription to activate.                                                                                                                        |
| recalculateNextBillingDate ([Boolean](/graphql-api/api-reference/objects/boolean)) | Recalculate the subscribed plan next billing date from the activation date (instead of previously provided date or calculated from the subscription's signup date). |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# addNextOrderOnlyProduct

Adds a free gift or free one-off add-on to a subscription's next generated order

The product is added with quantity 1, which cannot be changed, and a zero customer price, then automatically removed from the subscription after that order is created.

### Arguments

| Argument                                                                                                      | Description                            |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| input ([AddNextOrderOnlyProductInput](/graphql-api/api-reference/objects/add-next-order-only-product-input)!) | Parameters for AddNextOrderOnlyProduct |

### AddNextOrderOnlyProductInput Arguments

| Argument                                                      | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!) | ID of the subscription whose next order should include the product. |
| productId ([ID](/graphql-api/api-reference/objects/id)!)      | ID of the product to add as a gift or free one-off add-on.          |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

Validation errors that prevented the next-order-only product from being added.

#### orderedProduct ([OrderedProduct](/graphql-api/api-reference/objects/ordered-product))

The free ordered product that will be removed after the next order is generated.

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

The subscription receiving the next-order-only product.


# applyPromotionToSubscription

Applies a promotion to a subscription.

### Arguments

| Argument                                                                                                               | Description                                 |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| input ([ApplyPromotionToSubscriptionInput](/graphql-api/api-reference/objects/apply-promotion-to-subscription-input)!) | Parameters for ApplyPromotionToSubscription |

### ApplyPromotionToSubscriptionInput Arguments

| Argument                                                                  | Description                                           |
| ------------------------------------------------------------------------- | ----------------------------------------------------- |
| promotionId ([ID](/graphql-api/api-reference/objects/id)!)                | ID of the promotion to apply.                         |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)             | ID of the subscription to apply the promotion to.     |
| validatePromotion ([Boolean](/graphql-api/api-reference/objects/boolean)) | Whether to validate the promotion before applying it. |

### Return fields

#### appliedPromotion ([AppliedPromotion](/graphql-api/api-reference/objects/applied-promotion))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# assignAsset

Assign asset to a subscription.

### Arguments

| Argument                                                                           | Description                |
| ---------------------------------------------------------------------------------- | -------------------------- |
| input ([AssignAssetInput](/graphql-api/api-reference/objects/assign-asset-input)!) | Parameters for AssignAsset |

### AssignAssetInput Arguments

| Argument                                                       | Description                                                                                    |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)              | The ID of the asset to assign                                                                  |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)  | The subscription ID to assign the asset to                                                     |
| orderedProductId ([ID](/graphql-api/api-reference/objects/id)) | An optional ordered product ID to assign the asset to (has to belong to the same subscription) |

### Return fields

#### asset ([Asset](/graphql-api/api-reference/objects/asset))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# bulkOperationRunQuery

Creates and runs a GraphQL bulk operation query asynchronously.

### Arguments

| Argument                                                                                                 | Description                          |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| input ([BulkOperationRunQueryInput](/graphql-api/api-reference/objects/bulk-operation-run-query-input)!) | Parameters for BulkOperationRunQuery |

### BulkOperationRunQueryInput Arguments

| Argument                                                     | Description |
| ------------------------------------------------------------ | ----------- |
| query ([String](/graphql-api/api-reference/objects/string)!) |             |

### Return fields

#### bulkOperation ([GraphqlBulkOperation](/graphql-api/api-reference/objects/graphql-bulk-operation))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# bulkUpdateOrderLines

Updates multiple order lines at once. Allows changing the quantity and product for all specified order lines.

### Arguments

| Argument                                                                                               | Description                         |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------- |
| input ([BulkUpdateOrderLinesInput](/graphql-api/api-reference/objects/bulk-update-order-lines-input)!) | Parameters for BulkUpdateOrderLines |

### BulkUpdateOrderLinesInput Arguments

| Argument                                                                                             | Description                                  |
| ---------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| orderLines (\[[OrderLineUpdateInput](/graphql-api/api-reference/objects/order-line-update-input)!]!) | Order lines to update with their new values. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### orderLines (\[[OrderLine](/graphql-api/api-reference/objects/order-line)!])


# cancelReturnOrder

Cancels an 'in progress' return order.

### Arguments

| Argument                                                                                        | Description                      |
| ----------------------------------------------------------------------------------------------- | -------------------------------- |
| input ([CancelReturnOrderInput](/graphql-api/api-reference/objects/cancel-return-order-input)!) | Parameters for CancelReturnOrder |

### CancelReturnOrderInput Arguments

| Argument                                                             | Description |
| -------------------------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                    |             |
| externalStatus ([String](/graphql-api/api-reference/objects/string)) |             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### returnOrder ([ReturnOrder](/graphql-api/api-reference/objects/return-order))


# cancelScheduledOrder

Cancels a scheduled order by setting its status to cancelled and clearing the shipment date.

### Arguments

| Argument                                                                                              | Description                         |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------- |
| input ([CancelScheduledOrderInput](/graphql-api/api-reference/objects/cancel-scheduled-order-input)!) | Parameters for CancelScheduledOrder |

### CancelScheduledOrderInput Arguments

| Argument                                          | Description                          |
| ------------------------------------------------- | ------------------------------------ |
| id ([ID](/graphql-api/api-reference/objects/id)!) | ID of the scheduled order to cancel. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### order ([Order](/graphql-api/api-reference/objects/order))


# cancelSubscription

Cancels a subscription or initiates cancellation when two-step cancellation is enabled on your project.

### Arguments

| Argument                                                                                         | Description                       |
| ------------------------------------------------------------------------------------------------ | --------------------------------- |
| input ([CancelSubscriptionInput](/graphql-api/api-reference/objects/cancel-subscription-input)!) | Parameters for CancelSubscription |

### CancelSubscriptionInput Arguments

| Argument                                                                                  | Description                                                                               |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| token ([ID](/graphql-api/api-reference/objects/id))                                       | The token of the subscription to cancel, only needed if a project access token is used.   |
| id ([ID](/graphql-api/api-reference/objects/id))                                          | The ID of the subscription to cancel, only needed if a project access token is used.      |
| skipTwoStepCancellation ([Boolean](/graphql-api/api-reference/objects/boolean))           | If two-step cancellation is enabled it can be skipped                                     |
| skipCancellationConfirmationEmail ([Boolean](/graphql-api/api-reference/objects/boolean)) | Skip sending the standard cancellation confirmation email to the customer.                |
| cancellationNotes ([String](/graphql-api/api-reference/objects/string))                   | Why did this customer decide to cancel?                                                   |
| skipContractTermsEnforcement ([Boolean](/graphql-api/api-reference/objects/boolean))      | If a customer cannot be cancelled due to active commitments, this process can be skipped. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# chargeShopifyOrderOutstandingAmount

Charges the outstanding amount on a Shopify order using the totalOutstandingSet value from the Shopify API.

### Arguments

| Argument                                                                                                                              | Description                                        |
| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| input ([ChargeShopifyOrderOutstandingAmountInput](/graphql-api/api-reference/objects/charge-shopify-order-outstanding-amount-input)!) | Parameters for ChargeShopifyOrderOutstandingAmount |

### ChargeShopifyOrderOutstandingAmountInput Arguments

| Argument                                                              | Description                                            |
| --------------------------------------------------------------------- | ------------------------------------------------------ |
| shopifyOrderId ([String](/graphql-api/api-reference/objects/string)!) | Shopify Order ID to charge the outstanding amount for. |

### Return fields

#### errors (\[[String](/graphql-api/api-reference/objects/string)!]!)

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# completeReturnOrder

Completes an 'in progress' return order.

### Arguments

| Argument                                                                                            | Description                        |
| --------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([CompleteReturnOrderInput](/graphql-api/api-reference/objects/complete-return-order-input)!) | Parameters for CompleteReturnOrder |

### CompleteReturnOrderInput Arguments

| Argument                                                                      | Description |
| ----------------------------------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                             |             |
| returnedOn ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date)!) |             |
| cancelSubscription ([Boolean](/graphql-api/api-reference/objects/boolean))    |             |
| externalStatus ([String](/graphql-api/api-reference/objects/string))          |             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### returnOrder ([ReturnOrder](/graphql-api/api-reference/objects/return-order))


# completeSubscriptionCancellation

Completes the subscription cancellation process (only available when two-step cancellation is enabled on your project).

### Arguments

| Argument                                                                                                                      | Description                                     |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| input ([CompleteSubscriptionCancellationInput](/graphql-api/api-reference/objects/complete-subscription-cancellation-input)!) | Parameters for CompleteSubscriptionCancellation |

### CompleteSubscriptionCancellationInput Arguments

| Argument                                            | Description                                                                                                                           |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| token ([ID](/graphql-api/api-reference/objects/id)) | The token of the cancellation\_in\_progress subscription to complete cancellation for, only needed if a project access token is used. |
| id ([ID](/graphql-api/api-reference/objects/id))    | The ID of the cancellation\_in\_progress subscription to complete cancellation for, only needed if a project access token is used.    |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# confirmOrder

Confirms an order.

### Arguments

| Argument                                                                             | Description                 |
| ------------------------------------------------------------------------------------ | --------------------------- |
| input ([ConfirmOrderInput](/graphql-api/api-reference/objects/confirm-order-input)!) | Parameters for ConfirmOrder |

### ConfirmOrderInput Arguments

| Argument                                          | Description                 |
| ------------------------------------------------- | --------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | ID of the order to confirm. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### order ([Order](/graphql-api/api-reference/objects/order))


# createAsset

Creates an asset for a product, optionally assigns it to a subscription.

### Arguments

| Argument                                                                           | Description                |
| ---------------------------------------------------------------------------------- | -------------------------- |
| input ([CreateAssetInput](/graphql-api/api-reference/objects/create-asset-input)!) | Parameters for CreateAsset |

### CreateAssetInput Arguments

| Argument                                                                                                     | Description                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                 | The ID of the subscription to assign this asset to                                                                               |
| productId ([ID](/graphql-api/api-reference/objects/id)!)                                                     | The ID of the product for this asset                                                                                             |
| internalNumber ([String](/graphql-api/api-reference/objects/string)!)                                        | Mandatory number used to identify the asset                                                                                      |
| externalNumber ([String](/graphql-api/api-reference/objects/string))                                         | Optional additional number used to identify the asset                                                                            |
| notes ([String](/graphql-api/api-reference/objects/string))                                                  | Additional information about the specific asset                                                                                  |
| status ([AssetStatus](/graphql-api/api-reference/objects/asset-status))                                      | Status of this asset (available, at\_customer, purchased, in\_refurbishment, scrapped, lost, back\_to\_supplier or unavailable). |
| expectedAvailabilityOn ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                     | Date on which the asset is expected to be available.                                                                             |
| purchasedAt ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                | Date on which the asset is purchased.                                                                                            |
| depreciatedOn ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                              | Date on which the asset is depreciated.                                                                                          |
| scrappedOn ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                 | Date on which the asset is scrapped.                                                                                             |
| assetCustomFields (\[[AssetCustomFieldInput](/graphql-api/api-reference/objects/asset-custom-field-input)!]) | Associated custom field values for this asset.                                                                                   |

### Return fields

#### asset ([Asset](/graphql-api/api-reference/objects/asset))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# createCart

Creates an empty draft/cart subscription.

### Arguments

| Argument                                                                         | Description               |
| -------------------------------------------------------------------------------- | ------------------------- |
| input ([CreateCartInput](/graphql-api/api-reference/objects/create-cart-input)!) | Parameters for CreateCart |

### Return fields

#### cart ([Cart](/graphql-api/api-reference/objects/cart)!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription)!)


# createCreditInvoice

Immediately creates a credit invoice for the full remaining invoice amount, or for selected line item amounts when creditLineItems are provided. Does not issue a refund.

### Arguments

| Argument                                                                                            | Description                        |
| --------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([CreateCreditInvoiceInput](/graphql-api/api-reference/objects/create-credit-invoice-input)!) | Parameters for CreateCreditInvoice |

### CreateCreditInvoiceInput Arguments

| Argument                                                                                                              | Description                                                                         |
| --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| invoiceId ([ID](/graphql-api/api-reference/objects/id)!)                                                              | ID of the invoice to create a credit invoice for.                                   |
| note ([String](/graphql-api/api-reference/objects/string))                                                            | Description to put as credit invoice note.                                          |
| creditLineItems (\[[CreditInvoiceLineItemInput](/graphql-api/api-reference/objects/credit-invoice-line-item-input)!]) | Line item amounts to partially credit. Omit to credit the remaining invoice amount. |

### Return fields

#### creditInvoice ([Invoice](/graphql-api/api-reference/objects/invoice))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))


# createDiscountCode

Creates a discount code

### Arguments

| Argument                                                                                          | Description                       |
| ------------------------------------------------------------------------------------------------- | --------------------------------- |
| input ([CreateDiscountCodeInput](/graphql-api/api-reference/objects/create-discount-code-input)!) | Parameters for CreateDiscountCode |

### CreateDiscountCodeInput Arguments

| Argument                                                       | Description                                                                         |
| -------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))     | Metadata that can be used by developers to store additional information on objects. |
| promotionId ([ID](/graphql-api/api-reference/objects/id)!)     | The promotion to attach to this discount code                                       |
| code ([String](/graphql-api/api-reference/objects/string)!)    | The code that can be applied when creating a subscription                           |
| maxTimesUsed ([Int](/graphql-api/api-reference/objects/int)!)  | The max times this discount code can be used                                        |
| autoSelectPlanId ([ID](/graphql-api/api-reference/objects/id)) | The discount code can only be applied to this plan                                  |

### Return fields

#### discountCode ([DiscountCode](/graphql-api/api-reference/objects/discount-code))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# createFreeOrderLine

Adds a free order line to an existing order. Only scheduled orders can be updated; other statuses will cause the mutation

### Arguments

| Argument                                                                                             | Description                        |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([CreateFreeOrderLineInput](/graphql-api/api-reference/objects/create-free-order-line-input)!) | Parameters for CreateFreeOrderLine |

### CreateFreeOrderLineInput Arguments

| Argument                                                               | Description                                                                                                 |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| orderId ([ID](/graphql-api/api-reference/objects/id)!)                 | ID of the order to add a line to.                                                                           |
| productId ([ID](/graphql-api/api-reference/objects/id))                | The ID of the product for this order line.                                                                  |
| shopifyVariantId ([String](/graphql-api/api-reference/objects/string)) | The Shopify variant ID to look up the product. Either product\_id or shopify\_variant\_id must be provided. |
| quantity ([Int](/graphql-api/api-reference/objects/int)!)              | The quantity of products for this order line.                                                               |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### orderLine ([OrderLine](/graphql-api/api-reference/objects/order-line))


# createInvoiceLineItem

Creates an invoice line item for an invoice.

### Arguments

| Argument                                                                                                 | Description                          |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| input ([CreateInvoiceLineItemInput](/graphql-api/api-reference/objects/create-invoice-line-item-input)!) | Parameters for CreateInvoiceLineItem |

### CreateInvoiceLineItemInput Arguments

| Argument                                                                                  | Description                                        |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------- |
| invoiceId ([ID](/graphql-api/api-reference/objects/id)!)                                  | The ID of the invoice for this item                |
| productId ([ID](/graphql-api/api-reference/objects/id))                                   | The associated product in case of a product charge |
| lineItemType ([LineItemTypeEnum](/graphql-api/api-reference/objects/line-item-type-enum)) | Indicates what this line item is charging for      |
| quantity ([Int](/graphql-api/api-reference/objects/int)!)                                 | Quantity for this line item                        |
| description ([String](/graphql-api/api-reference/objects/string))                         | The description of this invoice line item.         |
| unitPriceCents ([Int](/graphql-api/api-reference/objects/int))                            | Unit price in cents                                |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### invoiceLineItem ([InvoiceLineItem](/graphql-api/api-reference/objects/invoice-line-item))


# createInvoicedOneTimeCharge

Immediately charges and invoices the given amount

If initiating the charge succeeds, an invoice is also created. When initiating the charge fails, no invoice is created. It's possible that the payment and invoice status are open or pending until a final succesful payment status is received from your Payment Service Provider. This could take a couple of business days for certain payment methods, like SEPA direct debit.

### Arguments

| Argument                                                                                                              | Description                                |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| input ([CreateInvoicedOneTimeChargeInput](/graphql-api/api-reference/objects/create-invoiced-one-time-charge-input)!) | Parameters for CreateInvoicedOneTimeCharge |

### CreateInvoicedOneTimeChargeInput Arguments

| Argument                                                           | Description                                     |
| ------------------------------------------------------------------ | ----------------------------------------------- |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)      | ID of the subscription to charge and invoice.   |
| description ([String](/graphql-api/api-reference/objects/string)!) | Description to put as single invoice line item. |
| amountCents ([Int](/graphql-api/api-reference/objects/int)!)       | Amount in cents to charge and invoice.          |

### Return fields

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

#### paymentErrors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# createOrder

Deprecated: The behavior of this mutation will be changed significantly soon.

### Arguments

| Argument                                                                           | Description                |
| ---------------------------------------------------------------------------------- | -------------------------- |
| input ([CreateOrderInput](/graphql-api/api-reference/objects/create-order-input)!) | Parameters for CreateOrder |

### CreateOrderInput Arguments

| Argument                                                        | Description |
| --------------------------------------------------------------- | ----------- |
| returnUrl ([String](/graphql-api/api-reference/objects/string)) |             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### order ([Order](/graphql-api/api-reference/objects/order))

#### paymentUrl ([String](/graphql-api/api-reference/objects/string))


# createOrderedProduct

Deprecated: Use CreateOrderedProductV2 instead.

### Arguments

| Argument                                                                                              | Description                         |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------- |
| input ([CreateOrderedProductInput](/graphql-api/api-reference/objects/create-ordered-product-input)!) | Parameters for CreateOrderedProduct |

### CreateOrderedProductInput Arguments

| Argument                                                                                                                                       | Description                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))                                                                                     | Metadata that can be used by developers to store additional information on objects.                                                                             |
| id ([ID](/graphql-api/api-reference/objects/id))                                                                                               | ID of this ordered product. This will be ignored on create action.                                                                                              |
| productId ([ID](/graphql-api/api-reference/objects/id))                                                                                        | ID for the related product. When replacing a product, this is the replacement product.                                                                          |
| quantity ([Int](/graphql-api/api-reference/objects/int))                                                                                       | The quantity for this ordered product.                                                                                                                          |
| customPriceCents ([Int](/graphql-api/api-reference/objects/int))                                                                               | A custom price in cents for this ordered product. If left blank, the default product price will be used, with the plan discount applied when a plan is present. |
| shipmentDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                                 | The next date on which a new order should get initiated                                                                                                         |
| interval ([Int](/graphql-api/api-reference/objects/int))                                                                                       | The amount of time in units between shipments of this order                                                                                                     |
| intervalUnitOfMeasureType ([OrderedProductIntervalUnitOfMeasure](/graphql-api/api-reference/objects/ordered-product-interval-unit-of-measure)) | The time measure for interval units                                                                                                                             |
| status ([OrderedProductStatus](/graphql-api/api-reference/objects/ordered-product-status))                                                     | The status of the ordered product                                                                                                                               |
| minimumCommitmentEndsAt ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                      | The date at which the minimum commitment ends for this product                                                                                                  |
| maximumCommitmentEndsAt ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                      | The date at which the maximum commitment ends for this product                                                                                                  |
| ensureNewRecord ([Boolean](/graphql-api/api-reference/objects/boolean))                                                                        |                                                                                                                                                                 |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                                                   | ID of the subscription to create this OrderedProduct for. Required if authenticated via a project access token                                                  |
| sku ([String](/graphql-api/api-reference/objects/string))                                                                                      | Use this field to look up the associated product based on SKU.                                                                                                  |
| slug ([String](/graphql-api/api-reference/objects/string))                                                                                     | Use this field to look up the associated product based on slug.                                                                                                 |
| shopifyVariantId ([ID](/graphql-api/api-reference/objects/id))                                                                                 | Use this field to look up the associated product based on Shopify Variant ID.                                                                                   |
| orderedProduct ([OrderedProductInput](/graphql-api/api-reference/objects/ordered-product-input))                                               | This argument is deprecated. Use direct arguments on this mutation instead. If you pass this field, direct arguments will be ignored.                           |

### Return fields

#### errors (\[[String](/graphql-api/api-reference/objects/string)!]!)

#### orderedProduct ([OrderedProduct](/graphql-api/api-reference/objects/ordered-product))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# createOrderedProductV2

Creates an ordered product on a subscription.

### Arguments

| Argument                                                                                                    | Description                           |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| input ([CreateOrderedProductV2Input](/graphql-api/api-reference/objects/create-ordered-product-v-2-input)!) | Parameters for CreateOrderedProductV2 |

### CreateOrderedProductV2Input Arguments

| Argument                                                                                                                                       | Description                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))                                                                                     | Metadata that can be used by developers to store additional information on objects.                                                                             |
| id ([ID](/graphql-api/api-reference/objects/id))                                                                                               | ID of this ordered product. This will be ignored on create action.                                                                                              |
| productId ([ID](/graphql-api/api-reference/objects/id))                                                                                        | ID for the related product. When replacing a product, this is the replacement product.                                                                          |
| quantity ([Int](/graphql-api/api-reference/objects/int))                                                                                       | The quantity for this ordered product.                                                                                                                          |
| customPriceCents ([Int](/graphql-api/api-reference/objects/int))                                                                               | A custom price in cents for this ordered product. If left blank, the default product price will be used, with the plan discount applied when a plan is present. |
| shipmentDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                                 | The next date on which a new order should get initiated                                                                                                         |
| interval ([Int](/graphql-api/api-reference/objects/int))                                                                                       | The amount of time in units between shipments of this order                                                                                                     |
| intervalUnitOfMeasureType ([OrderedProductIntervalUnitOfMeasure](/graphql-api/api-reference/objects/ordered-product-interval-unit-of-measure)) | The time measure for interval units                                                                                                                             |
| status ([OrderedProductStatus](/graphql-api/api-reference/objects/ordered-product-status))                                                     | The status of the ordered product                                                                                                                               |
| minimumCommitmentEndsAt ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                      | The date at which the minimum commitment ends for this product                                                                                                  |
| maximumCommitmentEndsAt ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                                      | The date at which the maximum commitment ends for this product                                                                                                  |
| ensureNewRecord ([Boolean](/graphql-api/api-reference/objects/boolean))                                                                        |                                                                                                                                                                 |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                                                   | ID of the subscription to create this OrderedProduct for. Required if authenticated via a project access token                                                  |
| sku ([String](/graphql-api/api-reference/objects/string))                                                                                      | Use this field to look up the associated product based on SKU.                                                                                                  |
| slug ([String](/graphql-api/api-reference/objects/string))                                                                                     | Use this field to look up the associated product based on slug.                                                                                                 |
| shopifyVariantId ([ID](/graphql-api/api-reference/objects/id))                                                                                 | Use this field to look up the associated product based on Shopify Variant ID.                                                                                   |
| skipPlanGroupCheck ([Boolean](/graphql-api/api-reference/objects/boolean))                                                                     | When true, allows adding a product that is outside the subscription's current plan group.                                                                       |
| orderedProductType ([OrderedProductTypes](/graphql-api/api-reference/objects/ordered-product-types))                                           | Type of ordered product.                                                                                                                                        |

### Return fields

#### errors (\[[String](/graphql-api/api-reference/objects/string)!]!)

#### orderedProduct ([OrderedProduct](/graphql-api/api-reference/objects/ordered-product))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# createProduct

Creates a product.

### Arguments

| Argument                                                                               | Description                  |
| -------------------------------------------------------------------------------------- | ---------------------------- |
| input ([CreateProductInput](/graphql-api/api-reference/objects/create-product-input)!) | Parameters for CreateProduct |

### CreateProductInput Arguments

| Argument                                                                                                                | Description                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))                                                              | Metadata that can be used by developers to store additional information on objects.                                                                                                                                                                                                                           |
| slug ([String](/graphql-api/api-reference/objects/string))                                                              | In case of an update the slug can also be used to identify the product instead of the ID, if ID is provided it will take precedence over the slug                                                                                                                                                             |
| sku ([String](/graphql-api/api-reference/objects/string))                                                               |                                                                                                                                                                                                                                                                                                               |
| supplier ([String](/graphql-api/api-reference/objects/string))                                                          |                                                                                                                                                                                                                                                                                                               |
| shopifyProductType ([String](/graphql-api/api-reference/objects/string))                                                | The product category from Shopify                                                                                                                                                                                                                                                                             |
| eligibleForDiscount ([Boolean](/graphql-api/api-reference/objects/boolean))                                             |                                                                                                                                                                                                                                                                                                               |
| interval ([Int](/graphql-api/api-reference/objects/int))                                                                |                                                                                                                                                                                                                                                                                                               |
| intervalUnitOfMeasure ([String](/graphql-api/api-reference/objects/string))                                             |                                                                                                                                                                                                                                                                                                               |
| initialShipmentDelay ([Int](/graphql-api/api-reference/objects/int))                                                    |                                                                                                                                                                                                                                                                                                               |
| initialShipmentDelayUnitOfMeasure ([String](/graphql-api/api-reference/objects/string))                                 |                                                                                                                                                                                                                                                                                                               |
| minimumCommitmentEnabled ([Boolean](/graphql-api/api-reference/objects/boolean))                                        |                                                                                                                                                                                                                                                                                                               |
| minimumCommitmentUnit ([String](/graphql-api/api-reference/objects/string))                                             |                                                                                                                                                                                                                                                                                                               |
| minimumCommitmentPeriod ([Int](/graphql-api/api-reference/objects/int))                                                 |                                                                                                                                                                                                                                                                                                               |
| maximumCommitmentEnabled ([Boolean](/graphql-api/api-reference/objects/boolean))                                        |                                                                                                                                                                                                                                                                                                               |
| maximumCommitmentPeriod ([Int](/graphql-api/api-reference/objects/int))                                                 |                                                                                                                                                                                                                                                                                                               |
| maximumCommitmentUnit ([String](/graphql-api/api-reference/objects/string))                                             |                                                                                                                                                                                                                                                                                                               |
| graceCancellationEnabled ([Boolean](/graphql-api/api-reference/objects/boolean))                                        |                                                                                                                                                                                                                                                                                                               |
| graceCancellationPeriod ([Int](/graphql-api/api-reference/objects/int))                                                 |                                                                                                                                                                                                                                                                                                               |
| graceCancellationUnit ([String](/graphql-api/api-reference/objects/string))                                             |                                                                                                                                                                                                                                                                                                               |
| productType ([String](/graphql-api/api-reference/objects/string))                                                       |                                                                                                                                                                                                                                                                                                               |
| availableViaSsc ([Boolean](/graphql-api/api-reference/objects/boolean))                                                 | If enabled the product can be added by existing customer via the self service center                                                                                                                                                                                                                          |
| available ([Boolean](/graphql-api/api-reference/objects/boolean))                                                       | If enabled the product can be added to the checkout by new customers                                                                                                                                                                                                                                          |
| assetPurchasable ([Boolean](/graphql-api/api-reference/objects/boolean))                                                | If enabled, customers can purchase the assets assigned to this product via the self service center                                                                                                                                                                                                            |
| retailPriceCents ([Int](/graphql-api/api-reference/objects/int))                                                        | The original retail price shown on the asset purchase flow                                                                                                                                                                                                                                                    |
| externalImageUrl ([String](/graphql-api/api-reference/objects/string))                                                  | Allows you to set the image for the product                                                                                                                                                                                                                                                                   |
| productGroupId ([ID](/graphql-api/api-reference/objects/id))                                                            | The ID of the product group this product belongs to                                                                                                                                                                                                                                                           |
| titleTranslations (\[[TranslationInput](/graphql-api/api-reference/objects/translation-input)!])                        | Translations for the product title in different locales                                                                                                                                                                                                                                                       |
| publicNameTranslations (\[[TranslationInput](/graphql-api/api-reference/objects/translation-input)!])                   | Translations for the product public name in different locales                                                                                                                                                                                                                                                 |
| imageTranslations (\[[ImageTranslationInput](/graphql-api/api-reference/objects/image-translation-input)!])             | Translations for the product image in different locales                                                                                                                                                                                                                                                       |
| countryOverrides (\[[ProductCountryOverrideInput](/graphql-api/api-reference/objects/product-country-override-input)!]) | Country specific setting overrides for this product. These will override default product settings for specified countries. Add new or update override for existing name/countryCode combination. This feature is currently in beta and can be enabled on , request reach out to support for more information. |
| title ([String](/graphql-api/api-reference/objects/string)!)                                                            |                                                                                                                                                                                                                                                                                                               |
| priceCents ([Int](/graphql-api/api-reference/objects/int)!)                                                             |                                                                                                                                                                                                                                                                                                               |
| taxRateId ([ID](/graphql-api/api-reference/objects/id)!)                                                                |                                                                                                                                                                                                                                                                                                               |
| prices (\[[PriceInput](/graphql-api/api-reference/objects/price-input)!])                                               | Country specific prices set for this product. These price will override default product price for specified countries.                                                                                                                                                                                        |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### product ([Product](/graphql-api/api-reference/objects/product))


# createProductGroup

Creates a product group.

### Arguments

| Argument                                                                                          | Description                       |
| ------------------------------------------------------------------------------------------------- | --------------------------------- |
| input ([CreateProductGroupInput](/graphql-api/api-reference/objects/create-product-group-input)!) | Parameters for CreateProductGroup |

### CreateProductGroupInput Arguments

| Argument                                                     | Description                                                                                 |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| title ([String](/graphql-api/api-reference/objects/string)!) | The name of the product group. Represents the parent product and groups all its variants.   |
| productIds (\[[ID](/graphql-api/api-reference/objects/id)!]) | The IDs of product variants that belong to this group. Must be variants of the same parent. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### productGroup ([ProductGroup](/graphql-api/api-reference/objects/product-group))


# createPromotion

Creates a promotion.

### Arguments

| Argument                                                                                   | Description                    |
| ------------------------------------------------------------------------------------------ | ------------------------------ |
| input ([CreatePromotionInput](/graphql-api/api-reference/objects/create-promotion-input)!) | Parameters for CreatePromotion |

### CreatePromotionInput Arguments

| Argument                                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| publicName ([String](/graphql-api/api-reference/objects/string))                                                                          | Alternative name to be displayed on invoices and checkout.                                                                                                                                                                                                                                                                         |
| autoApply ([Boolean](/graphql-api/api-reference/objects/boolean))                                                                         | Whether or not this promotion will automatically be applied on checkout                                                                                                                                                                                                                                                            |
| deactivationStrategy ([AppliedPromotionDeactivationStrategy](/graphql-api/api-reference/objects/applied-promotion-deactivation-strategy)) | Which mechanism will be used to deactivate the promotion                                                                                                                                                                                                                                                                           |
| deactivateAfterAmountIncludingTaxCents ([Int](/graphql-api/api-reference/objects/int))                                                    | The amount (in cents) after which the promotion should get deactivated on a customer                                                                                                                                                                                                                                               |
| deactivateAfterTimes ([Int](/graphql-api/api-reference/objects/int))                                                                      | After how many times this promotion is "used up" for a customer                                                                                                                                                                                                                                                                    |
| discountType ([PromotionDiscountTypeEnum](/graphql-api/api-reference/objects/promotion-discount-type-enum))                               | Which type of the discount will be used.                                                                                                                                                                                                                                                                                           |
| amountCents ([Int](/graphql-api/api-reference/objects/int))                                                                               | The amount of discount that this promotion gives.                                                                                                                                                                                                                                                                                  |
| activated ([Boolean](/graphql-api/api-reference/objects/boolean))                                                                         | Whether or not this promotion should be active                                                                                                                                                                                                                                                                                     |
| countryOverrides (\[[PromotionCountryOverrideInput](/graphql-api/api-reference/objects/promotion-country-override-input)!])               | Country specific setting overrides for this promotion. These will override default promotion settings for specified countries. Add new or update override for existing name/countryCode combination. Note: This feature is currently in beta testing - overrides will only take effect once enabled for your account by Firmhouse. |
| title ([String](/graphql-api/api-reference/objects/string)!)                                                                              | The title of the promotion as it will appear on invoices and in the portal.                                                                                                                                                                                                                                                        |
| percentDiscount ([Int](/graphql-api/api-reference/objects/int))                                                                           | The percentage of discount that this promotion gives.                                                                                                                                                                                                                                                                              |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### promotion ([Promotion](/graphql-api/api-reference/objects/promotion))


# createReturnOrder

Creates a return order for the subscription.

### Arguments

| Argument                                                                                        | Description                      |
| ----------------------------------------------------------------------------------------------- | -------------------------------- |
| input ([CreateReturnOrderInput](/graphql-api/api-reference/objects/create-return-order-input)!) | Parameters for CreateReturnOrder |

### CreateReturnOrderInput Arguments

| Argument                                                                                                           | Description                                          |
| ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| returnOrderProducts (\[[ReturnOrderProductInput](/graphql-api/api-reference/objects/return-order-product-input)!]) |                                                      |
| reason ([String](/graphql-api/api-reference/objects/string))                                                       |                                                      |
| returnDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                       |                                                      |
| trackingCode ([String](/graphql-api/api-reference/objects/string))                                                 |                                                      |
| trackingUrl ([String](/graphql-api/api-reference/objects/string))                                                  |                                                      |
| externalReference ([String](/graphql-api/api-reference/objects/string))                                            |                                                      |
| externalStatus ([String](/graphql-api/api-reference/objects/string))                                               |                                                      |
| externalUrl ([String](/graphql-api/api-reference/objects/string))                                                  |                                                      |
| intervalUnitOfMeasure ([String](/graphql-api/api-reference/objects/string))                                        |                                                      |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)                                                      | ID of the subscription to create a return order for. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### returnOrder ([ReturnOrder](/graphql-api/api-reference/objects/return-order))


# createSelfServiceCenterLoginToken

Deprecated: This mutation is deprecated. If you would like to send an email with a link to the self service center, please use the \`sendSelfServiceCenterLoginTokenEmail\` mutation. If you need to creat

### Arguments

| Argument                                                                                                                           | Description                                      |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| input ([CreateSelfServiceCenterLoginTokenInput](/graphql-api/api-reference/objects/create-self-service-center-login-token-input)!) | Parameters for CreateSelfServiceCenterLoginToken |

### CreateSelfServiceCenterLoginTokenInput Arguments

| Argument                                                         | Description |
| ---------------------------------------------------------------- | ----------- |
| email ([String](/graphql-api/api-reference/objects/string)!)     |             |
| returnUrl ([String](/graphql-api/api-reference/objects/string)!) |             |

### Return fields

#### error ([String](/graphql-api/api-reference/objects/string))

#### status ([String](/graphql-api/api-reference/objects/string))


# createSelfServiceCenterLoginTokenV2

Creates and returns a SelfServiceCenterLoginToken.

### Arguments

| Argument                                                                                                                                 | Description                                        |
| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| input ([CreateSelfServiceCenterLoginTokenV2Input](/graphql-api/api-reference/objects/create-self-service-center-login-token-v-2-input)!) | Parameters for CreateSelfServiceCenterLoginTokenV2 |

### CreateSelfServiceCenterLoginTokenV2Input Arguments

| Argument                                                     | Description                                                 |
| ------------------------------------------------------------ | ----------------------------------------------------------- |
| email ([String](/graphql-api/api-reference/objects/string)!) | The email address of the user to generate a login token for |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### selfServiceCenterLoginToken ([SelfServiceCenterLoginToken](/graphql-api/api-reference/objects/self-service-center-login-token))


# createSepaMandate

Creates a SEPA Direct Debit mandate from IBAN details and sets it as the subscription payment method.

### Arguments

| Argument                                                                                        | Description                      |
| ----------------------------------------------------------------------------------------------- | -------------------------------- |
| input ([CreateSepaMandateInput](/graphql-api/api-reference/objects/create-sepa-mandate-input)!) | Parameters for CreateSepaMandate |

### CreateSepaMandateInput Arguments

| Argument                                                               | Description                                                           |
| ---------------------------------------------------------------------- | --------------------------------------------------------------------- |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)          | The ID of the subscription to create a SEPA Direct Debit mandate for. |
| accountName ([String](/graphql-api/api-reference/objects/string)!)     | The account holder name for the SEPA Direct Debit mandate.            |
| accountIban ([String](/graphql-api/api-reference/objects/string)!)     | The IBAN for the SEPA Direct Debit mandate.                           |
| mandateReference ([String](/graphql-api/api-reference/objects/string)) | Optional reference for the SEPA mandate.                              |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# createServiceChannel

Creates a service channel.

### Arguments

| Argument                                                                                              | Description                         |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------- |
| input ([CreateServiceChannelInput](/graphql-api/api-reference/objects/create-service-channel-input)!) | Parameters for CreateServiceChannel |

### CreateServiceChannelInput Arguments

| Argument                                                       | Description                                                                                                                                                      |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name ([String](/graphql-api/api-reference/objects/string)!)    | The name of the service channel                                                                                                                                  |
| slug ([String](/graphql-api/api-reference/objects/string))     | The slug that is used for connecting this service channel to a checkout. Leave this field empty to automatically generate the slug from the service channel name |
| address ([String](/graphql-api/api-reference/objects/string))  | Physical address and/or contact details for this service channel                                                                                                 |
| bccEmail ([String](/graphql-api/api-reference/objects/string)) | Every email sent to a customer assigned to this Service Channel will also be BCC'd to this email address.                                                        |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### serviceChannel ([ServiceChannel](/graphql-api/api-reference/objects/service-channel))


# createSubscription

Creates a new subscription and returns payment redirection URLs.

### Arguments

| Argument                                                                                         | Description                       |
| ------------------------------------------------------------------------------------------------ | --------------------------------- |
| input ([CreateSubscriptionInput](/graphql-api/api-reference/objects/create-subscription-input)!) | Parameters for CreateSubscription |

### CreateSubscriptionInput Arguments

| Argument                                                                                                                 | Description                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))                                                               | Metadata that can be used by developers to store additional information on objects.                                                                           |
| token ([ID](/graphql-api/api-reference/objects/id))                                                                      | The token of the subscription to update, or creates a new one if one doesn't exist.                                                                           |
| companyName ([String](/graphql-api/api-reference/objects/string))                                                        | The company name of the customer.                                                                                                                             |
| vatNumber ([String](/graphql-api/api-reference/objects/string))                                                          | The company VAT number.                                                                                                                                       |
| salutation ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's salutation (mr,ms,mx).                                                                                                                         |
| name ([String](/graphql-api/api-reference/objects/string))                                                               | The customer's first name.                                                                                                                                    |
| lastName ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's last name.                                                                                                                                     |
| address ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's address line or street.                                                                                                                        |
| address2 ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's second address line for additional information.                                                                                                |
| zipcode ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's zip code or postal code.                                                                                                                       |
| houseNumber ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's house, building, or appartment number.                                                                                                         |
| city ([String](/graphql-api/api-reference/objects/string))                                                               | The customer's city or town.                                                                                                                                  |
| country ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's country code (ISO3661).                                                                                                                        |
| state ([String](/graphql-api/api-reference/objects/string))                                                              | The customer's state or province (ISO3661-2).                                                                                                                 |
| district ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's district.                                                                                                                                      |
| phoneNumber ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's phone number (international format).                                                                                                           |
| dateOfBirth ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                            | The customer's date of birth (yyyy-mm-dd).                                                                                                                    |
| shippingNotes ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's shipping notes (delivery instructions).                                                                                                        |
| differentBillingAddress ([Boolean](/graphql-api/api-reference/objects/boolean))                                          | Whether billing and shipping addresses are the same. Set this flag to \`true\` to store a separate billing address.                                           |
| billToCompanyName ([String](/graphql-api/api-reference/objects/string))                                                  | The company name of the customer's billing address.                                                                                                           |
| billToSalutation ([String](/graphql-api/api-reference/objects/string))                                                   | The customer's billing address salutation (mr,ms,mx).                                                                                                         |
| billToName ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's billing address first name.                                                                                                                    |
| billToLastName ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address last name.                                                                                                                     |
| billToAddress ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address address line or street.                                                                                                        |
| billToAddress2 ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address second address line for additional information.                                                                                |
| billToZipcode ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address zip code or postal code.                                                                                                       |
| billToHouseNumber ([String](/graphql-api/api-reference/objects/string))                                                  | The customer's billing address house, building, or appartment number.                                                                                         |
| billToCity ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's billing address city or town.                                                                                                                  |
| billToCountry ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address country code (ISO3661).                                                                                                        |
| billToState ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's billing address state or province (ISO3661-2).                                                                                                 |
| billToDistrict ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address district.                                                                                                                      |
| billToPhoneNumber ([String](/graphql-api/api-reference/objects/string))                                                  | The customer's billing address phone number (international format).                                                                                           |
| email ([String](/graphql-api/api-reference/objects/string))                                                              | The customer's email address.                                                                                                                                 |
| termsAccepted ([Boolean](/graphql-api/api-reference/objects/boolean))                                                    | Whether the customer accepted the terms and conditions.                                                                                                       |
| marketingOptIn ([Boolean](/graphql-api/api-reference/objects/boolean))                                                   | Whether the customer accepted optional marketing communication opt-in.                                                                                        |
| extraFields (\[[ExtraFieldInput](/graphql-api/api-reference/objects/extra-field-input)!])                                | Extra field values for the subscription.                                                                                                                      |
| locale ([String](/graphql-api/api-reference/objects/string))                                                             | The customer's language/locale. Must be enabled on the project.                                                                                               |
| skipAutoActivationOnSignup ([Boolean](/graphql-api/api-reference/objects/boolean))                                       | Don't automatically activate the subscription on signup.                                                                                                      |
| chargeDayOfTheMonth ([Int](/graphql-api/api-reference/objects/int))                                                      | The day of the month when the customer is charged.                                                                                                            |
| trialPeriodMonths ([Int](/graphql-api/api-reference/objects/int))                                                        | The number of months before the customer is charged for the first time.                                                                                       |
| customerReference ([String](/graphql-api/api-reference/objects/string))                                                  | The field that can be used for your internal reference. For example, internal customer id.                                                                    |
| status ([SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status))                                    | The current status of the subscription. (default: inactive)                                                                                                   |
| signupCompletedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                             | The time when the signup was completed.                                                                                                                       |
| activatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                   | The time the subscription was activated.                                                                                                                      |
| cancelledAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                   | The time the subscription was (fully) cancelled.                                                                                                              |
| stoppedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                     | The time the subscription was stopped.                                                                                                                        |
| cancellationStartedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                         | The time the subscription started the cancellation process (with two-step cancellation)                                                                       |
| markedAsNonPayingAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                           | Time time the subscription was marked as non-paying.                                                                                                          |
| mollieCustomerId ([String](/graphql-api/api-reference/objects/string))                                                   | The Mollie Customer ID (cst\_XXX)                                                                                                                             |
| stripeCustomerId ([String](/graphql-api/api-reference/objects/string))                                                   | The Stripe Customer ID (cus\_XXX)                                                                                                                             |
| stripePaymentMethodId ([String](/graphql-api/api-reference/objects/string))                                              | The Stripe Payment Method ID of the active payment method to charge. (pm\_XXX)                                                                                |
| adyenShopperReference ([String](/graphql-api/api-reference/objects/string))                                              | The Adyen shopper reference being used for charges.                                                                                                           |
| adyenRecurringDetailReference ([String](/graphql-api/api-reference/objects/string))                                      | Specify a specific recurring payment reference, also requires the adyen payment method variant to be set. If either of them is not this field will be ignored |
| adyenPaymentMethodVariant ([AdyenPaymentMethodVariant](/graphql-api/api-reference/objects/adyen-payment-method-variant)) | Specify a specific recurring payment method, also requires the adyen payment reference to be set. If either of them is not this field will be ignored         |
| importedSubscriptionId ([String](/graphql-api/api-reference/objects/string))                                             | Unique ID for an imported subscription.                                                                                                                       |
| notes ([String](/graphql-api/api-reference/objects/string))                                                              | Notes specific for this subscription                                                                                                                          |
| pspPaymentProperties ([JSON](/graphql-api/api-reference/objects/json))                                                   | Additional payment service provider specific properties used for payment creation.                                                                            |
| serviceChannelId ([ID](/graphql-api/api-reference/objects/id))                                                           | The ID of the service channel to use for this subscription.                                                                                                   |
| projectToken ([ID](/graphql-api/api-reference/objects/id))                                                               |                                                                                                                                                               |
| orderedProducts (\[[OrderedProductInput](/graphql-api/api-reference/objects/ordered-product-input)!])                    | The products to subscribe to                                                                                                                                  |
| weChatOpenId ([String](/graphql-api/api-reference/objects/string))                                                       |                                                                                                                                                               |
| nextBillingDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                        | Moment when the next billing cycle will be run, only available for plan based subscription that use the flexible biling cycle                                 |
| returnUrl ([String](/graphql-api/api-reference/objects/string))                                                          | The URL the customer gets redirected to when signup or initial payment was succesful. can be left blank to use the Firmhouse order confirmation page.         |
| paymentPageUrl ([String](/graphql-api/api-reference/objects/string)!)                                                    | The URL of the page where your customer can re-initiate the checkout flow if something fails.                                                                 |
| planId ([ID](/graphql-api/api-reference/objects/id))                                                                     | The plan the customer will subscribe to.                                                                                                                      |
| discountCode ([String](/graphql-api/api-reference/objects/string))                                                       | Discount code to apply when signing up                                                                                                                        |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The initial payment object associated with signing up this subscription.

#### ~~paymentToken (~~[~~ID~~](/graphql-api/api-reference/objects/id)~~)~~

*`Deprecated: Will be removed.`*

#### paymentUrl ([String](/graphql-api/api-reference/objects/string))

The URL to redirect your customer to to complete the signup payment

#### returnUrl ([String](/graphql-api/api-reference/objects/string))

The passed value or a URL to the Firmhouse order confirmation page.

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))

#### ~~subscriptionToken (~~[~~ID~~](/graphql-api/api-reference/objects/id)~~)~~

*`Deprecated: Will be removed. Use the 'subscription' field instead.`*


# createSubscriptionFile

Attaches a file to a subscription.

### Arguments

| Argument                                                                                                  | Description                           |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| input ([CreateSubscriptionFileInput](/graphql-api/api-reference/objects/create-subscription-file-input)!) | Parameters for CreateSubscriptionFile |

### CreateSubscriptionFileInput Arguments

| Argument                                                                                                            | Description                   |
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| blob ([String](/graphql-api/api-reference/objects/string)!)                                                         | Base64 encoded file contents. |
| filename ([String](/graphql-api/api-reference/objects/string)!)                                                     | The file name.                |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)                                                       | The subscription id.          |
| visibility ([SubscriptionFileVisibilityEnum](/graphql-api/api-reference/objects/subscription-file-visibility-enum)) | Where the file is visible.    |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscriptionFile ([SubscriptionFile](/graphql-api/api-reference/objects/subscription-file))


# createSubscriptionFromCart

Finalises a subscription and returns payment details based on a cart/draft subscription identified by \`X-Subscription-Token\`.

### Arguments

| Argument                                                                                                           | Description                               |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| input ([CreateSubscriptionFromCartInput](/graphql-api/api-reference/objects/create-subscription-from-cart-input)!) | Parameters for CreateSubscriptionFromCart |

### CreateSubscriptionFromCartInput Arguments

| Argument                                                              | Description                                                                                                                   |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| returnUrl ([String](/graphql-api/api-reference/objects/string))       | The URL the user gets redirected to after completing payment, can be left blank to use the Firmhouse order confirmation page. |
| paymentPageUrl ([String](/graphql-api/api-reference/objects/string)!) | The URL where the user can sign up for a new subscription                                                                     |

### Return fields

#### cart ([Cart](/graphql-api/api-reference/objects/cart)!)

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

#### paymentUrl ([String](/graphql-api/api-reference/objects/string))

#### returnUrl ([String](/graphql-api/api-reference/objects/string))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription)!)


# creditAndRefundInvoice

Immediately creates a credit invoice and a tries to create a refund for the full amount of the original invoice

If initiating the refund fails, a refundError will be returned but the credit invoice would be created nevertheless. It's possible that the refund status are open or pending until a final succesful payment status is received from your Payment Service Provider. This could take a couple of business days for certain payment methods, like SEPA direct debit.

### Arguments

| Argument                                                                                                   | Description                           |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| input ([CreditAndRefundInvoiceInput](/graphql-api/api-reference/objects/credit-and-refund-invoice-input)!) | Parameters for CreditAndRefundInvoice |

### CreditAndRefundInvoiceInput Arguments

| Argument                                                            | Description                                                  |
| ------------------------------------------------------------------- | ------------------------------------------------------------ |
| invoiceId ([ID](/graphql-api/api-reference/objects/id)!)            | ID of the invoice to create credit invoice and refund for.   |
| refundReason ([String](/graphql-api/api-reference/objects/string)!) | Description to put as credit invoice note and refund reason. |

### Return fields

#### creditInvoice ([Invoice](/graphql-api/api-reference/objects/invoice))

#### invoice ([Invoice](/graphql-api/api-reference/objects/invoice))

#### refund ([Refund](/graphql-api/api-reference/objects/refund))

#### refundErrors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

Errors while issuing the refund. Can also contain error messages from the payment service provider.


# deactivateAppliedPromotion

Deactivates an applied promotion.

### Arguments

| Argument                                                                                                          | Description                               |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| input ([DeactivateAppliedPromotionInput](/graphql-api/api-reference/objects/deactivate-applied-promotion-input)!) | Parameters for DeactivateAppliedPromotion |

### DeactivateAppliedPromotionInput Arguments

| Argument                                          | Description                                               |
| ------------------------------------------------- | --------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | Id of the applied promotion that needs to be deactivated. |

### Return fields

#### appliedPromotion ([AppliedPromotion](/graphql-api/api-reference/objects/applied-promotion))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# destroyDiscountCode

Destroys a discount code (validation prevents removal if already applied)

### Arguments

| Argument                                                                                            | Description                        |
| --------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([DestroyDiscountCodeInput](/graphql-api/api-reference/objects/destroy-discount-code-input)!) | Parameters for DestroyDiscountCode |

### DestroyDiscountCodeInput Arguments

| Argument                                          | Description                            |
| ------------------------------------------------- | -------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | The ID of the discount code to destroy |

### Return fields

#### discountCode ([DiscountCode](/graphql-api/api-reference/objects/discount-code))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)


# destroyInvoiceLineItem

Destroys an invoice line item.

### Arguments

| Argument                                                                                                   | Description                           |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| input ([DestroyInvoiceLineItemInput](/graphql-api/api-reference/objects/destroy-invoice-line-item-input)!) | Parameters for DestroyInvoiceLineItem |

### DestroyInvoiceLineItemInput Arguments

| Argument                                          | Description |
| ------------------------------------------------- | ----------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### invoiceLineItem ([InvoiceLineItem](/graphql-api/api-reference/objects/invoice-line-item))


# destroyOrderedProduct

Deletes an ordered product

Deleting the last ordered product can leave the subscription without an active product and may break downstream subscription behavior. For replacement flows, prefer updateOrderedProduct for an in-place product swap; if delete-and-create is required, create or verify the replacement first, then destroy the old line.

### Arguments

| Argument                                                                                                | Description                          |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| input ([DestroyOrderedProductInput](/graphql-api/api-reference/objects/destroy-ordered-product-input)!) | Parameters for DestroyOrderedProduct |

### DestroyOrderedProductInput Arguments

| Argument                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id ([ID](/graphql-api/api-reference/objects/id))               | ID of the ordered product to delete. Be careful when this is the subscription's last ordered product: deleting it can leave the subscription without an active product and may break downstream subscription behavior. For replacement flows, prefer updateOrderedProduct for an in-place product swap; if delete-and-create is required, create or verify the replacement first, then destroy the old line. |
| shopifyVariantId ([ID](/graphql-api/api-reference/objects/id)) | The Shopify variant ID to find the ordered product by                                                                                                                                                                                                                                                                                                                                                        |
| shopifyProductId ([ID](/graphql-api/api-reference/objects/id)) | The Shopify product ID to find the ordered product by                                                                                                                                                                                                                                                                                                                                                        |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id))   | Required when using shopify\_variant\_id or shopify\_product\_id                                                                                                                                                                                                                                                                                                                                             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### orderedProduct ([OrderedProduct](/graphql-api/api-reference/objects/ordered-product))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# destroyProductGroup

Destroys a product group.

### Arguments

| Argument                                                                                            | Description                        |
| --------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([DestroyProductGroupInput](/graphql-api/api-reference/objects/destroy-product-group-input)!) | Parameters for DestroyProductGroup |

### DestroyProductGroupInput Arguments

| Argument                                          | Description                            |
| ------------------------------------------------- | -------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | The ID of the product group to destroy |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### productGroup ([ProductGroup](/graphql-api/api-reference/objects/product-group))


# destroySubscriptionFile

Deletes a subscription file.

### Arguments

| Argument                                                                                                    | Description                            |
| ----------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| input ([DestroySubscriptionFileInput](/graphql-api/api-reference/objects/destroy-subscription-file-input)!) | Parameters for DestroySubscriptionFile |

### DestroySubscriptionFileInput Arguments

| Argument                                          | Description               |
| ------------------------------------------------- | ------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | The subscription file id. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscriptionFile ([SubscriptionFile](/graphql-api/api-reference/objects/subscription-file))


# editPlan

Edits a plan.

### Arguments

| Argument                                                                     | Description             |
| ---------------------------------------------------------------------------- | ----------------------- |
| input ([EditPlanInput](/graphql-api/api-reference/objects/edit-plan-input)!) | Parameters for EditPlan |

### EditPlanInput Arguments

| Argument                                                   | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json)) | Metadata that can be used by developers to store additional information on objects. |
| id ([ID](/graphql-api/api-reference/objects/id)!)          |                                                                                     |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### plan ([Plan](/graphql-api/api-reference/objects/plan))


# fulfillOrder

Marks an order as fulfilled. If Track\&Trace code is given in will also trigger Track\&Trace email.

### Arguments

| Argument                                                                             | Description                 |
| ------------------------------------------------------------------------------------ | --------------------------- |
| input ([FulfillOrderInput](/graphql-api/api-reference/objects/fulfill-order-input)!) | Parameters for FulfillOrder |

### FulfillOrderInput Arguments

| Argument                                                                               | Description                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                                      | ID of the confirmed or fulfilled order to (re-)fulfill.                                                                                                                                                                                           |
| fulfilledAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | The timestamp of when the order was fulfilled. Will use the current time if the argument is missing.                                                                                                                                              |
| trackingCode ([String](/graphql-api/api-reference/objects/string))                     | An optional tracking code for the order that can be included in an email. If a tracking code is provided then the order track and trace email will be sent. Please note: The the same tracking code will not be stored or emailed more than once. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### order ([Order](/graphql-api/api-reference/objects/order))


# fulfillOrders

Option to mark multiple orders as fulfilled at once, up to a maximum of 100 orders each time.

### Arguments

| Argument                                                                               | Description                  |
| -------------------------------------------------------------------------------------- | ---------------------------- |
| input ([FulfillOrdersInput](/graphql-api/api-reference/objects/fulfill-orders-input)!) | Parameters for FulfillOrders |

### FulfillOrdersInput Arguments

| Argument                                               | Description                             |
| ------------------------------------------------------ | --------------------------------------- |
| ids (\[[ID](/graphql-api/api-reference/objects/id)!]!) | ID's of the confirmed order to fulfill. |

### Return fields

#### errors (\[[String](/graphql-api/api-reference/objects/string)!])

#### fulfilledOrders (\[[Order](/graphql-api/api-reference/objects/order)!])


# generateOfferForAssetOwnership

Generates an asset purchase offer for the specified asset ownership.

### Arguments

| Argument                                                                                                                    | Description                                   |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| input ([GenerateOfferForAssetOwnershipInput](/graphql-api/api-reference/objects/generate-offer-for-asset-ownership-input)!) | Parameters for GenerateOfferForAssetOwnership |

### GenerateOfferForAssetOwnershipInput Arguments

| Argument                                                         | Description                                                                                    |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| assetOwnershipId ([ID](/graphql-api/api-reference/objects/id)!)  | The ID of the asset ownership to generate an offer for                                         |
| successUrl ([String](/graphql-api/api-reference/objects/string)) | An optional URL to redirect the customer to after successful payment                           |
| failureUrl ([String](/graphql-api/api-reference/objects/string)) | An optional URL to redirect the customer to if the offer is accessed after its expiration time |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!])

#### offer ([Offer](/graphql-api/api-reference/objects/offer))


# importSubscription

Creates a subscription directly into the database without the need for a customer to signup, only use this when you're migrating from another platform.

### Arguments

| Argument                                                                                         | Description                       |
| ------------------------------------------------------------------------------------------------ | --------------------------------- |
| input ([ImportSubscriptionInput](/graphql-api/api-reference/objects/import-subscription-input)!) | Parameters for ImportSubscription |

### ImportSubscriptionInput Arguments

| Argument                                                                                                                 | Description                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json))                                                               | Metadata that can be used by developers to store additional information on objects.                                                                                                           |
| token ([ID](/graphql-api/api-reference/objects/id))                                                                      | The token of the subscription to update, or creates a new one if one doesn't exist.                                                                                                           |
| companyName ([String](/graphql-api/api-reference/objects/string))                                                        | The company name of the customer.                                                                                                                                                             |
| vatNumber ([String](/graphql-api/api-reference/objects/string))                                                          | The company VAT number.                                                                                                                                                                       |
| salutation ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's salutation (mr,ms,mx).                                                                                                                                                         |
| name ([String](/graphql-api/api-reference/objects/string))                                                               | The customer's first name.                                                                                                                                                                    |
| lastName ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's last name.                                                                                                                                                                     |
| address ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's address line or street.                                                                                                                                                        |
| address2 ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's second address line for additional information.                                                                                                                                |
| zipcode ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's zip code or postal code.                                                                                                                                                       |
| houseNumber ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's house, building, or appartment number.                                                                                                                                         |
| city ([String](/graphql-api/api-reference/objects/string))                                                               | The customer's city or town.                                                                                                                                                                  |
| country ([String](/graphql-api/api-reference/objects/string))                                                            | The customer's country code (ISO3661).                                                                                                                                                        |
| state ([String](/graphql-api/api-reference/objects/string))                                                              | The customer's state or province (ISO3661-2).                                                                                                                                                 |
| district ([String](/graphql-api/api-reference/objects/string))                                                           | The customer's district.                                                                                                                                                                      |
| phoneNumber ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's phone number (international format).                                                                                                                                           |
| dateOfBirth ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                            | The customer's date of birth (yyyy-mm-dd).                                                                                                                                                    |
| shippingNotes ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's shipping notes (delivery instructions).                                                                                                                                        |
| differentBillingAddress ([Boolean](/graphql-api/api-reference/objects/boolean))                                          | Whether billing and shipping addresses are the same. Set this flag to \`true\` to store a separate billing address.                                                                           |
| billToCompanyName ([String](/graphql-api/api-reference/objects/string))                                                  | The company name of the customer's billing address.                                                                                                                                           |
| billToSalutation ([String](/graphql-api/api-reference/objects/string))                                                   | The customer's billing address salutation (mr,ms,mx).                                                                                                                                         |
| billToName ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's billing address first name.                                                                                                                                                    |
| billToLastName ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address last name.                                                                                                                                                     |
| billToAddress ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address address line or street.                                                                                                                                        |
| billToAddress2 ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address second address line for additional information.                                                                                                                |
| billToZipcode ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address zip code or postal code.                                                                                                                                       |
| billToHouseNumber ([String](/graphql-api/api-reference/objects/string))                                                  | The customer's billing address house, building, or appartment number.                                                                                                                         |
| billToCity ([String](/graphql-api/api-reference/objects/string))                                                         | The customer's billing address city or town.                                                                                                                                                  |
| billToCountry ([String](/graphql-api/api-reference/objects/string))                                                      | The customer's billing address country code (ISO3661).                                                                                                                                        |
| billToState ([String](/graphql-api/api-reference/objects/string))                                                        | The customer's billing address state or province (ISO3661-2).                                                                                                                                 |
| billToDistrict ([String](/graphql-api/api-reference/objects/string))                                                     | The customer's billing address district.                                                                                                                                                      |
| billToPhoneNumber ([String](/graphql-api/api-reference/objects/string))                                                  | The customer's billing address phone number (international format).                                                                                                                           |
| email ([String](/graphql-api/api-reference/objects/string))                                                              | The customer's email address.                                                                                                                                                                 |
| termsAccepted ([Boolean](/graphql-api/api-reference/objects/boolean))                                                    | Whether the customer accepted the terms and conditions.                                                                                                                                       |
| marketingOptIn ([Boolean](/graphql-api/api-reference/objects/boolean))                                                   | Whether the customer accepted optional marketing communication opt-in.                                                                                                                        |
| extraFields (\[[ExtraFieldInput](/graphql-api/api-reference/objects/extra-field-input)!])                                | Extra field values for the subscription.                                                                                                                                                      |
| locale ([String](/graphql-api/api-reference/objects/string))                                                             | The customer's language/locale. Must be enabled on the project.                                                                                                                               |
| skipAutoActivationOnSignup ([Boolean](/graphql-api/api-reference/objects/boolean))                                       | Don't automatically activate the subscription on signup.                                                                                                                                      |
| chargeDayOfTheMonth ([Int](/graphql-api/api-reference/objects/int))                                                      | The day of the month when the customer is charged.                                                                                                                                            |
| trialPeriodMonths ([Int](/graphql-api/api-reference/objects/int))                                                        | The number of months before the customer is charged for the first time.                                                                                                                       |
| customerReference ([String](/graphql-api/api-reference/objects/string))                                                  | The field that can be used for your internal reference. For example, internal customer id.                                                                                                    |
| status ([SubscriptionStatus](/graphql-api/api-reference/objects/subscription-status))                                    | The current status of the subscription. (default: inactive)                                                                                                                                   |
| signupCompletedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                             | The time when the signup was completed.                                                                                                                                                       |
| activatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                   | The time the subscription was activated.                                                                                                                                                      |
| cancelledAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                   | The time the subscription was (fully) cancelled.                                                                                                                                              |
| stoppedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                                     | The time the subscription was stopped.                                                                                                                                                        |
| cancellationStartedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                         | The time the subscription started the cancellation process (with two-step cancellation)                                                                                                       |
| markedAsNonPayingAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time))                           | Time time the subscription was marked as non-paying.                                                                                                                                          |
| mollieCustomerId ([String](/graphql-api/api-reference/objects/string))                                                   | The Mollie Customer ID (cst\_XXX)                                                                                                                                                             |
| stripeCustomerId ([String](/graphql-api/api-reference/objects/string))                                                   | The Stripe Customer ID (cus\_XXX)                                                                                                                                                             |
| stripePaymentMethodId ([String](/graphql-api/api-reference/objects/string))                                              | The Stripe Payment Method ID of the active payment method to charge. (pm\_XXX)                                                                                                                |
| adyenShopperReference ([String](/graphql-api/api-reference/objects/string))                                              | The Adyen shopper reference being used for charges.                                                                                                                                           |
| adyenRecurringDetailReference ([String](/graphql-api/api-reference/objects/string))                                      | Specify a specific recurring payment reference, also requires the adyen payment method variant to be set. If either of them is not this field will be ignored                                 |
| adyenPaymentMethodVariant ([AdyenPaymentMethodVariant](/graphql-api/api-reference/objects/adyen-payment-method-variant)) | Specify a specific recurring payment method, also requires the adyen payment reference to be set. If either of them is not this field will be ignored                                         |
| importedSubscriptionId ([String](/graphql-api/api-reference/objects/string))                                             | Unique ID for an imported subscription.                                                                                                                                                       |
| notes ([String](/graphql-api/api-reference/objects/string))                                                              | Notes specific for this subscription                                                                                                                                                          |
| pspPaymentProperties ([JSON](/graphql-api/api-reference/objects/json))                                                   | Additional payment service provider specific properties used for payment creation.                                                                                                            |
| serviceChannelId ([ID](/graphql-api/api-reference/objects/id))                                                           | The ID of the service channel to use for this subscription.                                                                                                                                   |
| activePlanId ([ID](/graphql-api/api-reference/objects/id))                                                               | ID of the plan the subscription will be signed up to.                                                                                                                                         |
| discountCode ([String](/graphql-api/api-reference/objects/string))                                                       | Discount code to apply to subscription                                                                                                                                                        |
| nextBillingDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date))                                        | Moment when the next billing cycle will be run, only available for plan based subscription that use the flexible biling cycle, or subscriptions with one shipment frequency for all products. |
| cloneFromSubscriptionId ([ID](/graphql-api/api-reference/objects/id))                                                    | The ID of the subscription to clone from. Copies name, address and billing from the subscription to clone from unless overridden by input values.                                             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# patchSelfServiceCenterTemplateVersion

Applies a unified diff and saves an unpublished Self Service Center V2 template version.

### Arguments

| Argument                                                                                                                                   | Description                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| input ([PatchSelfServiceCenterTemplateVersionInput](/graphql-api/api-reference/objects/patch-self-service-center-template-version-input)!) | Parameters for PatchSelfServiceCenterTemplateVersion |

### PatchSelfServiceCenterTemplateVersionInput Arguments

| Argument                                                                | Description                                                                                                  |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| templateFileName ([String](/graphql-api/api-reference/objects/string)!) | The file name of the template to patch (e.g. dashboard.liquid).                                              |
| patch ([String](/graphql-api/api-reference/objects/string)!)            | A unified diff patch to apply to the current template body.                                                  |
| title ([String](/graphql-api/api-reference/objects/string))             | An optional human-readable title for the saved template version.                                             |
| expectedBaseVersion ([Int](/graphql-api/api-reference/objects/int)!)    | The latest saved template version number the patch was generated from. Use 0 when there is no saved version. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### selfServiceCenterTemplate ([SelfServiceCenterTemplate](/graphql-api/api-reference/objects/self-service-center-template))

#### selfServiceCenterTemplateVersion ([SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version))


# pauseSubscription

Pauses a subscription

You can optionally pass in a time at which the subscription will be resumed. All automatic charging and invoice generation and order generation is put on hold for a paused subscription. Maximum contract terms automatically shift forward on each billing cycle.

### Arguments

| Argument                                                                                       | Description                      |
| ---------------------------------------------------------------------------------------------- | -------------------------------- |
| input ([PauseSubscriptionInput](/graphql-api/api-reference/objects/pause-subscription-input)!) | Parameters for PauseSubscription |

### PauseSubscriptionInput Arguments

| Argument                                                                              | Description                                                  |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| id ([ID](/graphql-api/api-reference/objects/id)!)                                     | ID of the subscription to pause.                             |
| pauseUntil ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Time from which the subscription automaticaly resumes again. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# publishSelfServiceCenterTemplateVersion

Publishes a saved Self Service Center V2 template version.

### Arguments

| Argument                                                                                                                                       | Description                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| input ([PublishSelfServiceCenterTemplateVersionInput](/graphql-api/api-reference/objects/publish-self-service-center-template-version-input)!) | Parameters for PublishSelfServiceCenterTemplateVersion |

### PublishSelfServiceCenterTemplateVersionInput Arguments

| Argument                                                                | Description                                                       |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| templateFileName ([String](/graphql-api/api-reference/objects/string)!) | The file name of the template to publish (e.g. dashboard.liquid). |
| versionNumber ([Int](/graphql-api/api-reference/objects/int)!)          | The saved version number to publish.                              |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### selfServiceCenterTemplate ([SelfServiceCenterTemplate](/graphql-api/api-reference/objects/self-service-center-template))

#### selfServiceCenterTemplateVersion ([SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version))


# pushOrdersToShopify

Pushes orders to Shopify, this happens asynchronously.

### Arguments

| Argument                                                                                             | Description                        |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([PushOrdersToShopifyInput](/graphql-api/api-reference/objects/push-orders-to-shopify-input)!) | Parameters for PushOrdersToShopify |

### PushOrdersToShopifyInput Arguments

| Argument                                                                                | Description                                                                                                            |
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| ids (\[[ID](/graphql-api/api-reference/objects/id)!]!)                                  |                                                                                                                        |
| skipVirtualBillingProductOrders ([Boolean](/graphql-api/api-reference/objects/boolean)) | Skip orders where the active plan uses 'when needed' Shopify order creation with a configured Shopify billing product. |

### Return fields

#### orders ([OrderConnection](/graphql-api/api-reference/objects/order-connection))

List of orders

| Argument                                                     | Description                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- |
| after ([String](/graphql-api/api-reference/objects/string))  | Returns the elements in the list that come after the specified cursor.  |
| before ([String](/graphql-api/api-reference/objects/string)) | Returns the elements in the list that come before the specified cursor. |
| first ([Int](/graphql-api/api-reference/objects/int))        | Returns the first *n* elements from the list.                           |
| last ([Int](/graphql-api/api-reference/objects/int))         | Returns the last *n* elements from the list.                            |


# reactivateSubscription

Reactivates a cancelled subscription.

### Arguments

| Argument                                                                                                 | Description                           |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| input ([ReactivateSubscriptionInput](/graphql-api/api-reference/objects/reactivate-subscription-input)!) | Parameters for ReactivateSubscription |

### ReactivateSubscriptionInput Arguments

| Argument                                                                          | Description                                                                                                                                       |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                                 | ID of the cancelled, stopped, or customer-unsubscribed subscription to reactivate.                                                                |
| nextBillingDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date)) | Next billing date to use after reactivation. When omitted, the existing date is kept if it is still valid or recalculated to the next valid date. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# refundPayment

Issues a refund for a payment. Some payment service providers may limit the maximum amount for or timeframe in which you can refund a payment.

### Arguments

| Argument                                                                               | Description                  |
| -------------------------------------------------------------------------------------- | ---------------------------- |
| input ([RefundPaymentInput](/graphql-api/api-reference/objects/refund-payment-input)!) | Parameters for RefundPayment |

### RefundPaymentInput Arguments

| Argument                                                      | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id))              | ID of the payment to issue the refund for. When provided, invoice\_id is ignored.      |
| invoiceId ([ID](/graphql-api/api-reference/objects/id))       | ID of the invoice to find a paid payment for refunding when no payment ID is provided. |
| amount ([Float](/graphql-api/api-reference/objects/float)!)   | Amount to refund.                                                                      |
| reason ([String](/graphql-api/api-reference/objects/string)!) | Reason for issuing the refund.                                                         |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

Errors while issuing the refund. Can also contain error messages from the payment service provider.

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The payment the refund is issued for.

#### refund ([Refund](/graphql-api/api-reference/objects/refund))

The refund when succesfully issued.


# rescheduleScheduledOrder

Reschedules a scheduled order to a new shipment date. If the order has a Shopify fulfillment order, a fulfillment reschedule job is enqueued.

### Arguments

| Argument                                                                                                      | Description                             |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| input ([RescheduleScheduledOrderInput](/graphql-api/api-reference/objects/reschedule-scheduled-order-input)!) | Parameters for RescheduleScheduledOrder |

### RescheduleScheduledOrderInput Arguments

| Argument                                                                        | Description                                    |
| ------------------------------------------------------------------------------- | ---------------------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!)                               | ID of the scheduled order to reschedule.       |
| shipmentDate ([ISO8601Date](/graphql-api/api-reference/objects/iso-8601-date)!) | The new shipment date for the scheduled order. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### order ([Order](/graphql-api/api-reference/objects/order))


# resetSelfServiceCenterTemplateToDefault

Resets the published Self Service Center V2 template to the built-in default.

### Arguments

| Argument                                                                                                                                        | Description                                            |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| input ([ResetSelfServiceCenterTemplateToDefaultInput](/graphql-api/api-reference/objects/reset-self-service-center-template-to-default-input)!) | Parameters for ResetSelfServiceCenterTemplateToDefault |

### ResetSelfServiceCenterTemplateToDefaultInput Arguments

| Argument                                                                | Description                                                     |
| ----------------------------------------------------------------------- | --------------------------------------------------------------- |
| templateFileName ([String](/graphql-api/api-reference/objects/string)!) | The file name of the template to reset (e.g. dashboard.liquid). |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### selfServiceCenterTemplate ([SelfServiceCenterTemplate](/graphql-api/api-reference/objects/self-service-center-template))


# resumeSubscription

Resumes the subscription

If you do not pass a date or time the resumeFrom argument, then the subscription will be immediately resumed. Resuming a subscription will always change its status to **activated**.

### Arguments

| Argument                                                                                         | Description                       |
| ------------------------------------------------------------------------------------------------ | --------------------------------- |
| input ([ResumeSubscriptionInput](/graphql-api/api-reference/objects/resume-subscription-input)!) | Parameters for ResumeSubscription |

### ResumeSubscriptionInput Arguments

| Argument                                                                              | Description                                                                                      |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| id ([ID](/graphql-api/api-reference/objects/id)!)                                     | ID of the subscription to resume.                                                                |
| resumeFrom ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time)) | Time to resume the subscription from. If not given the subscription will be immediately resumed. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# retryFailedPayment

Retries a failed payment and creates a new retry payment attempt.

### Arguments

| Argument                                                                                          | Description                       |
| ------------------------------------------------------------------------------------------------- | --------------------------------- |
| input ([RetryFailedPaymentInput](/graphql-api/api-reference/objects/retry-failed-payment-input)!) | Parameters for RetryFailedPayment |

### RetryFailedPaymentInput Arguments

| Argument                                          | Description                        |
| ------------------------------------------------- | ---------------------------------- |
| id ([ID](/graphql-api/api-reference/objects/id)!) | ID of the failed payment to retry. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

Errors while retrying the payment.

#### payment ([Payment](/graphql-api/api-reference/objects/payment))

The original payment.

#### retryPayment ([Payment](/graphql-api/api-reference/objects/payment))

The newly created retry payment.


# saveSelfServiceCenterTemplateVersion

Saves an unpublished Self Service Center V2 template version.

### Arguments

| Argument                                                                                                                                 | Description                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| input ([SaveSelfServiceCenterTemplateVersionInput](/graphql-api/api-reference/objects/save-self-service-center-template-version-input)!) | Parameters for SaveSelfServiceCenterTemplateVersion |

### SaveSelfServiceCenterTemplateVersionInput Arguments

| Argument                                                                | Description                                                    |
| ----------------------------------------------------------------------- | -------------------------------------------------------------- |
| templateFileName ([String](/graphql-api/api-reference/objects/string)!) | The file name of the template to save (e.g. dashboard.liquid). |
| body ([String](/graphql-api/api-reference/objects/string)!)             | The Liquid template body content.                              |
| title ([String](/graphql-api/api-reference/objects/string))             | An optional human-readable title for this version.             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### selfServiceCenterTemplate ([SelfServiceCenterTemplate](/graphql-api/api-reference/objects/self-service-center-template))

#### selfServiceCenterTemplateVersion ([SelfServiceCenterTemplateVersion](/graphql-api/api-reference/objects/self-service-center-template-version))


# sendSelfServiceCenterLoginTokenEmail

Creates a SelfServiceCenterLoginToken and sends an email to the customer's email address on file so they can log into their self service center.

### Arguments

| Argument                                                                                                                                  | Description                                         |
| ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| input ([SendSelfServiceCenterLoginTokenEmailInput](/graphql-api/api-reference/objects/send-self-service-center-login-token-email-input)!) | Parameters for SendSelfServiceCenterLoginTokenEmail |

### SendSelfServiceCenterLoginTokenEmailInput Arguments

| Argument                                                         | Description |
| ---------------------------------------------------------------- | ----------- |
| email ([String](/graphql-api/api-reference/objects/string)!)     |             |
| returnUrl ([String](/graphql-api/api-reference/objects/string)!) |             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# sendSubscriptionNotification

Sends a custom Liquid notification to a subscription through the project's configured customer communication channel

Email projects receive a rendered email; Klaviyo projects receive an event with a rendered JSON payload.

### Arguments

| Argument                                                                                                              | Description                                 |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| input ([SendSubscriptionNotificationInput](/graphql-api/api-reference/objects/send-subscription-notification-input)!) | Parameters for SendSubscriptionNotification |

### SendSubscriptionNotificationInput Arguments

| Argument                                                        | Description                                                                                                   |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!)   |                                                                                                               |
| subject ([String](/graphql-api/api-reference/objects/string)!)  | Email subject or Klaviyo event name.                                                                          |
| template ([String](/graphql-api/api-reference/objects/string)!) | Liquid template rendered as email content for the email channel or as a JSON payload for the Klaviyo channel. |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error)!]!)

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))


# shipOrderedProducts

Immediately creates an order for the passed ordered products of the subscription. Any other ordered products of this subscription scheduled for today will also be shipped in the same order.

### Arguments

| Argument                                                                                            | Description                        |
| --------------------------------------------------------------------------------------------------- | ---------------------------------- |
| input ([ShipOrderedProductsInput](/graphql-api/api-reference/objects/ship-ordered-products-input)!) | Parameters for ShipOrderedProducts |

### ShipOrderedProductsInput Arguments

| Argument                                                      | Description                                              |
| ------------------------------------------------------------- | -------------------------------------------------------- |
| ids (\[[ID](/graphql-api/api-reference/objects/id)!]!)        | IDs of the ordered products to ship.                     |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id)!) | ID of the subscription attached to the ordered products. |

### Return fields

#### shippedOrderedProducts (\[[OrderedProduct](/graphql-api/api-reference/objects/ordered-product)!])

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription))




---

[Next Page](/llms-full.txt/1)

