Skip to main content
Anchor to SubscriptionContractCalculationContractCreateInput

SubscriptionContractCalculationContractCreateInput

input_object

The input fields for calculating a new subscription contract. Provide the complete desired state of the contract. The contract isn't created until you commit the calculation with the subscriptionContractCalculationCommit mutation.

Learn how to build a subscription contract.

•SubscriptionActor

The actor who initiated a subscription action.

Anchor to appManagedBillingConfigappManagedBillingConfig
•SubscriptionContractCalculationAppManagedBillingConfigInput

App-managed billing configuration for the contract.

•SubscriptionContractCalculationBillingPolicyInput!
required

The billing policy for the new contract.

•CurrencyCode!
non-null

The currency code for the new subscription contract.

•[AttributeInput!]!
requiredDefault:[]

The custom attributes for the new contract.

•ID!
non-null

The ID of the customer to associate with the new subscription contract.

•SubscriptionContractCalculationDeliveryMethodInput!
required

The delivery method for the new contract. Provide none for digital-only subscriptions. Provide fetchAvailableDeliveryOptions instead of a method to discover options for an address without committing a delivery method.

•SubscriptionContractCalculationDeliveryPolicyInput!
required

The delivery policy for the new contract.

•[SubscriptionContractCalculationDiscountCodeInput!]!
requiredDefault:[]

The discount codes to apply during this calculation. Applied codes are resolved into manual discounts on the resulting contract. Defaults to an empty array (apply no discount codes).

•DateTime

The date the contract first bills, overriding the end date of its first billing cycle. For example, a monthly contract created on May 14th bills first on June 14th by default; setting firstBillingDate to May 30th bills first on May 30th instead. This value also becomes the contract's next billing date. Later cycles follow the contract's billing policy anchors. It must be in the future.

•[SubscriptionContractCalculationLineInput!]!
required

The subscription lines for the new contract.

•[SubscriptionContractCalculationManualDiscountInput!]!
required

The manual order and delivery discounts for the new contract. Provide an empty array for no manual discounts.

•String

The note for the new contract.

•SubscriptionContractCalculationPaymentMethodInput!
required

The payment method for the new contract. Provide none if no payment method is specified.

Anchor to withMerchandiseCustomizationswithMerchandiseCustomizations
•Boolean!
non-null

Specifies whether to use merchandise customizations in the calculation.


Was this section helpful?