---
title: SalesAgreement - Customer API
description: >-
  A contract between a merchant and a customer to do business. Shopify creates a

  sales agreement whenever an order is placed, edited, or refunded. A sales

  agreement has one or more sales records, which provide itemized details about

  the initial agreement or subsequent changes made to the order. For example,
  when

  a customer places an order, Shopify creates the order, generates a sales

  agreement, and records a sale for each line item purchased in the order. A
  sale

  record is specific to a type of order line. Order lines can represent
  different

  things such as a purchased product, a tip added by a customer, shipping costs

  collected at checkout, and more.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/customer/latest/interfaces/SalesAgreement'
  md: 'https://shopify.dev/docs/api/customer/latest/interfaces/SalesAgreement.md'
api_name: customer
api_type: graphql
type: interface
---

# Sales​Agreement

interface

Requires `customer_read_orders` access scope.

A contract between a merchant and a customer to do business. Shopify creates a sales agreement whenever an order is placed, edited, or refunded. A sales agreement has one or more sales records, which provide itemized details about the initial agreement or subsequent changes made to the order. For example, when a customer places an order, Shopify creates the order, generates a sales agreement, and records a sale for each line item purchased in the order. A sale record is specific to a type of order line. Order lines can represent different things such as a purchased product, a tip added by a customer, shipping costs collected at checkout, and more.

## Fields

* happened​At

  [Date​Time!](https://shopify.dev/docs/api/customer/latest/scalars/DateTime)

  non-null

  The date and time when the agreement occurred.

* id

  [ID!](https://shopify.dev/docs/api/customer/latest/scalars/ID)

  non-null

  The unique ID for the agreement.

* reason

  [Order​Action​Type!](https://shopify.dev/docs/api/customer/latest/enums/OrderActionType)

  non-null

  The reason the agreement was created.

* sales

  [Sale​Connection!](https://shopify.dev/docs/api/customer/latest/connections/SaleConnection)

  non-null

  The sales associated with the agreement.

  * after

    [String](https://shopify.dev/docs/api/customer/latest/scalars/String)

    ### Arguments

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/customer/latest/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * first

    [Int](https://shopify.dev/docs/api/customer/latest/scalars/Int)

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/customer/latest/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/customer/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

***

##### Variables

```json
{
	"happenedAt": "",
	"id": "",
	"reason": "",
	"sales": {
		"after": "",
		"before": "",
		"first": "",
		"last": "",
		"reverse": ""
	}
}
```

##### Schema

```graphql
interface SalesAgreement {
  happenedAt: DateTime!
  id: ID!
  reason: OrderActionType!
  sales: SaleConnection!
}
```
