Menu
subscriptionBillingCycleCharge
Creates a new subscription billing attempt for a specified billing cycle. This is the alternative mutation for subscriptionBillingAttemptCreate.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the subscriptionBillingCycleCharge action (under Subscription).
- Fill in the fields below, then reference the result from later steps as
{{subscriptionbillingcyclecharge.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation SubscriptionBillingCycleCharge($actor: SubscriptionActor, $subscriptionContractId: ID!, $billingCycleSelector: SubscriptionBillingCycleSelector!, $inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy, $paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy) {
subscriptionBillingCycleCharge(
actor: $actor
subscriptionContractId: $subscriptionContractId
billingCycleSelector: $billingCycleSelector
inventoryPolicy: $inventoryPolicy
paymentProcessingPolicy: $paymentProcessingPolicy
) {
subscriptionBillingAttempt {
completedAt
createdAt
errorCode
errorMessage
id
idempotencyKey
nextActionUrl
order {
additionalFees
alerts
app
attribution
billingAddress
billingAddressMatchesShippingAddress
canMarkAsPaid
canNotifyCustomer
cancelReason
cancellation
cancelledAt
capturable
cartDiscountAmount
cartDiscountAmountSet
cartToken
channel
channelInformation
checkoutToken
clientIp
closed
closedAt
confirmationNumber
confirmed
createdAt
currencyCode
currentCartDiscountAmountSet
currentShippingPriceSet
currentSubtotalLineItemsQuantity
currentSubtotalPriceSet
currentTaxLines
currentTotalAdditionalFeesSet
currentTotalDiscountsSet
currentTotalDutiesSet
currentTotalPriceSet
currentTotalTaxSet
currentTotalWeight
customAttributes
customer
customerAcceptsMarketing
customerJourney
customerJourneySummary
customerLocale
discountCode
discountCodes
displayAddress
displayFinancialStatus
displayFulfillmentStatus
disputes
dutiesIncluded
edited
email
estimatedTaxes
fulfillable
fulfillmentsCount
fullyPaid
hasTimelineComment
id
landingPageDisplayText
landingPageUrl
legacyResourceId
merchantBusinessEntity
merchantEditable
merchantEditableErrors
merchantOfRecordApp
name
netPayment
netPaymentSet
note
number
originalTotalAdditionalFeesSet
originalTotalDutiesSet
originalTotalPriceSet
paymentCollectionDetails
paymentGatewayNames
paymentTerms
phone
physicalLocation
poNumber
presentmentCurrencyCode
processedAt
productNetwork
publication
purchasingEntity
referralCode
referrerDisplayText
referrerUrl
refundDiscrepancySet
refundable
registeredSourceUrl
requiresShipping
restockable
retailLocation
returnStatus
risk
riskLevel
shippingAddress
shippingLine
shopifyProtect
sourceIdentifier
sourceName
staffMember
subtotalLineItemsQuantity
subtotalPrice
subtotalPriceSet
tags
taxExempt
taxLines
taxesIncluded
test
totalCapturable
totalCapturableSet
totalCashRoundingAdjustment
totalDiscounts
totalDiscountsSet
totalOutstandingSet
totalPrice
totalPriceSet
totalReceived
totalReceivedSet
totalRefunded
totalRefundedSet
totalRefundedShippingSet
totalShippingPrice
totalShippingPriceSet
totalTax
totalTaxSet
totalTipReceived
totalTipReceivedSet
totalWeight
transactionsCount
unpaid
updatedAt
}
originTime
paymentGroupId
paymentSessionId
processingError {
code
message
}
ready
respectInventoryPolicy
state
subscriptionContract {
app
appAdminUrl
billingPolicy
createdAt
currencyCode
customAttributes
customer
deliveryMethod
deliveryPolicy
deliveryPrice
id
lastBillingAttemptErrorType
lastPaymentStatus
lineCount
linesCount
nextBillingDate
note
originOrder
revisionId
status
updatedAt
}
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"subscriptionContractId": "string",
"billingCycleSelector": {
"index": 0,
"date": "string"
},
"actor": "CUSTOMER",
"inventoryPolicy": "PRODUCT_VARIANT_INVENTORY_POLICY",
"paymentProcessingPolicy": "FAIL_UNLESS_VALID_PAYMENT_METHOD"
}
Response
Read the result with {{subscriptionbillingcyclecharge.response.data.data.subscriptionBillingCycleCharge}}. If the API returns errors, the step fails and they are at {{subscriptionbillingcyclecharge.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?