Skip to main content
Anchor to subscriptionContractCalculation

subscriptionContractCalculation

query

Requires read_own_subscription_contracts access scope. Also: The user must have manage_orders_information permission.

Returns a subscription contract calculation by ID. Use this query to poll a calculation started by subscriptionContractCreateCalculate, subscriptionContractUpdateCalculate, or subscriptionBillingCycleContractEditCalculate until it succeeds or fails.

The result resolves to a pending, succeeded, or failure type. Commit a succeeded calculation with the subscriptionContractCalculationCommit mutation.

Learn how to build a subscription contract.

•ID!
required

The ID of the Subscription Contract Calculation to return.


Was this section helpful?

Anchor to SubscriptionContractCalculationSubscriptionContractCalculation
•SubscriptionContractCalculation

The result of a subscription contract calculation, returned by the subscriptionContractCalculation query. Because calculations run asynchronously, the concrete type reflects the calculation's current state: SubscriptionContractCalculationPending while it's still processing, SubscriptionContractCalculationSuccess once it's ready to commit, or SubscriptionContractCalculationFailure if it failed, whose errors field describes what went wrong. Poll the query until the type is no longer pending.

•OBJECT

A subscription contract calculation that has failed.

•OBJECT

A subscription contract calculation that is still processing asynchronously.

•OBJECT

A subscription contract calculation that has completed successfully.


Was this section helpful?