Skip to main content
Anchor to BillingAttemptUserError

BillingAttemptUserError

object

Requires read_own_subscription_contracts access scope.

Represents an error that happens during the execution of a billing attempt mutation.

•BillingAttemptUserErrorCode

The error code.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Creates a billing attempt to charge for a SubscriptionContract. The mutation processes either the payment for the current billing cycle or for a specific cycle, if selected.

The mutation creates an Order when successful. Failed billing attempts include a processingError field with error details.


Tip

Use the idempotencyKey to ensure the billing attempt executes only once, preventing duplicate charges if the request is retried.


You can target a specific billing cycle using the billingCycleSelector to bill past or future cycles. The originTime parameter adjusts fulfillment scheduling for attempts completed after the expected billing date.

Learn more about creating billing attempts.

Arguments

Anchor to subscriptionContractIdsubscriptionContractId
•ID!
required

The ID of the subscription contract.

Anchor to subscriptionBillingAttemptInputsubscriptionBillingAttemptInput
•SubscriptionBillingAttemptInput!
required

The information to apply as a billing attempt.


•mutation

Creates a new subscription billing attempt for a specified billing cycle. This is the alternative mutation for subscriptionBillingAttemptCreate. For more information, refer to Create a subscription contract.

Arguments

Anchor to subscriptionContractIdsubscriptionContractId
•ID!
required

The ID of the subscription contract.

Anchor to billingCycleSelectorbillingCycleSelector
•SubscriptionBillingCycleSelector!
required

Select the specific billing cycle to be billed. If the selected billing cycle's billingAttemptExpectedDate is in the past, the originTime of the billing attempt will be set to this date. However, if the billingAttemptExpectedDate is in the future, the originTime will be the current time.

•SubscriptionBillingAttemptInventoryPolicy
Default:PRODUCT_VARIANT_INVENTORY_POLICY

The behaviour to use when updating inventory.



Was this section helpful?


Was this section helpful?