--- title: SubscriptionBillingAttemptError - GraphQL Admin description: Possible error types for a subscription billing attempt. api_version: unstable api_name: admin source_url: html: >- https://shopify.dev/docs/api/admin-graphql/unstable/unions/SubscriptionBillingAttemptError md: >- https://shopify.dev/docs/api/admin-graphql/unstable/unions/SubscriptionBillingAttemptError.md --- # Subscription​Billing​Attempt​Error union Requires `read_own_subscription_contracts` access scope. Possible error types for a subscription billing attempt. ## Possible types * [Subscription​Billing​Attempt​General​Error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionBillingAttemptGeneralError) OBJECT An error that occurred during a subscription billing attempt that doesn't fit other categories. * code [Subscription​Billing​Attempt​General​Error​Code!](https://shopify.dev/docs/api/admin-graphql/unstable/enums/SubscriptionBillingAttemptGeneralErrorCode) non-null The error code for the failure. * [Subscription​Billing​Attempt​Inventory​Error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionBillingAttemptInventoryError) OBJECT An inventory-related error that occurred during a subscription billing attempt. * code [Subscription​Billing​Attempt​Inventory​Error​Code!](https://shopify.dev/docs/api/admin-graphql/unstable/enums/SubscriptionBillingAttemptInventoryErrorCode) non-null The error code for the inventory-related failure. * insufficient​Stock​Product​Variants [Product​Variant​Connection](https://shopify.dev/docs/api/admin-graphql/unstable/connections/ProductVariantConnection) A list of product variants that caused the insufficient inventory error. * first [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * [Subscription​Billing​Attempt​Payment​Error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionBillingAttemptPaymentError) OBJECT A payment-related error that occurred during a subscription billing attempt. * code [Subscription​Billing​Attempt​Payment​Error​Code!](https://shopify.dev/docs/api/admin-graphql/unstable/enums/SubscriptionBillingAttemptPaymentErrorCode) non-null The error code for the payment failure. * [Subscription​Billing​Attempt​Unexpected​Error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionBillingAttemptUnexpectedError) OBJECT An unexpected error that occurred during a subscription billing attempt. * message [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) non-null A message describing the unexpected error. *** ## Fields with this union * [Subscription​Billing​Attempt​Failed​State.error](https://shopify.dev/docs/api/admin-graphql/unstable/objects/SubscriptionBillingAttemptFailedState#field-SubscriptionBillingAttemptFailedState.fields.error) OBJECT The billing attempt failed due to an error. *** ```graphql union SubscriptionBillingAttemptError = SubscriptionBillingAttemptGeneralError | SubscriptionBillingAttemptInventoryError | SubscriptionBillingAttemptPaymentError | SubscriptionBillingAttemptUnexpectedError ```