Subscription Billing Attempt
Requires access scope.
A record of an execution of the subscription billing process. Billing attempts use idempotency keys to avoid duplicate order creation.
When a billing attempt completes successfully, it creates an Order. The attempt includes associated payment transactions and any errors that occur during billing. If 3D Secure authentication is required, the field provides the redirect URL for customer verification.
Anchor to FieldsFields
- Anchor to completedAtcompleted•Date
At Time The date and time when the billing attempt was completed.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the billing attempt was created.
- •ID!non-null
A globally-unique ID.
- Anchor to idempotencyKeyidempotency•String!
Key non-null A unique key generated by the client to avoid duplicate payments.
- Anchor to nextActionUrlnext•URL
Action Url The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow.
- Anchor to orderorder•Order
The result of this billing attempt if completed successfully.
- Anchor to originTimeorigin•Date
Time Time The date and time used to calculate fulfillment intervals for a billing attempt that successfully completed after the current anchor date. To prevent fulfillment from being pushed to the next anchor date, this field can override the billing attempt date.
- Anchor to paymentGroupIdpayment•String
Group Id The reference shared between retried payment attempts.
- Anchor to paymentSessionIdpayment•String
Session Id The reference shared between payment attempts with similar payment details.
- Anchor to processingErrorprocessing•Subscription
Error Billing Attempt Processing Error Error information from processing the billing attempt.
- Anchor to readyready•Boolean!non-null
Whether the billing attempt is still processing.
- Anchor to respectInventoryPolicyrespect•Boolean!
Inventory Policy non-null Whether the billing attempt respects the merchant's inventory policy.
- Anchor to subscriptionContractsubscription•Subscription
Contract Contract! non-null The subscription contract.
- Anchor to transactionstransactions•Order
Transaction Connection! non-null The transactions created by the billing attempt.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
Deprecated fields
- Anchor to errorCodeerror•Subscription
Code Billing Attempt Error Code Deprecated - Anchor to errorMessageerror•String
Message Deprecated
Anchor to QueriesQueries
- •query
Returns a
resource by ID.- •ID!required
The ID of the
to return.
Arguments
- •ID!
- •query
Returns subscription billing attempts on a store.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Subscription
Key Billing Attempts Sort Keys Default:CREATED_AT Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Arguments
Anchor to MutationsMutations
- •mutation
Creates a billing attempt to charge for a
. The mutation processes either the payment for the current billing cycle or for a specific cycle, if selected.The mutation creates an
Orderwhen successful. Failed billing attempts include afield with error details.TipYou can target a specific billing cycle using the
to bill past or future cycles. Theparameter adjusts fulfillment scheduling for attempts completed after the expected billing date.Learn more about creating billing attempts.
- Anchor to subscriptionContractIdsubscription•ID!
Contract Id required The ID of the subscription contract.
- Anchor to subscriptionBillingAttemptInputsubscription•Subscription
Billing Attempt Input Billing Attempt Input! required The information to apply as a billing attempt.
Arguments
- •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.
- Anchor to subscriptionContractIdsubscription•ID!
Contract Id required The ID of the subscription contract.
- Anchor to billingCycleSelectorbilling•Subscription
Cycle Selector Billing Cycle Selector! 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.
- Anchor to inventoryPolicyinventory•Subscription
Policy Billing Attempt Inventory Policy Default:PRODUCT_VARIANT_INVENTORY_POLICY The behaviour to use when updating inventory.
Arguments