Menu
paymentTermsCreate
Create payment terms on an order. To create payment terms on a draft order, use a draft order mutation and include the request with the DraftOrderInput.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the paymentTermsCreate action (under Payment).
- Fill in the fields below, then reference the result from later steps as
{{paymenttermscreate.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 PaymentTermsCreate($referenceId: ID!, $paymentTermsAttributes: PaymentTermsCreateInput!) {
paymentTermsCreate(
referenceId: $referenceId
paymentTermsAttributes: $paymentTermsAttributes
) {
paymentTerms {
draftOrder {
acceptAutomaticDiscounts
allVariantPricesOverridden
allowDiscountCodesInCheckout
amountDueLaterSet
amountDueNowSet
anyVariantPricesOverridden
appliedDiscount
billingAddress
billingAddressMatchesShippingAddress
completedAt
createdAt
currencyCode
customAttributes
customer
defaultCursor
deposit
discountCodes
email
hasTimelineComment
id
invoiceEmailTemplateSubject
invoiceSentAt
invoiceUrl
legacyResourceId
lineItemsSubtotalPrice
marketName
marketRegionCountryCode
name
note2
order
paymentTerms
phone
platformDiscounts
poNumber
presentmentCurrencyCode
purchasingEntity
ready
reserveInventoryUntil
shippingAddress
shippingLine
status
subtotalPrice
subtotalPriceSet
tags
taxExempt
taxLines
taxesIncluded
totalDiscountsSet
totalLineItemsPriceSet
totalPrice
totalPriceSet
totalQuantityOfLineItems
totalShippingPrice
totalShippingPriceSet
totalTax
totalTaxSet
totalWeight
transformerFingerprint
updatedAt
visibleToCustomer
warnings
}
due
dueInDays
id
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
}
overdue
paymentTermsName
paymentTermsType
translatedName
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"referenceId": "string",
"paymentTermsAttributes": {
"paymentTermsTemplateId": "string",
"paymentSchedules": [
{
"issuedAt": "string",
"dueAt": "string"
}
]
}
}
Response
Read the result with {{paymenttermscreate.response.data.data.paymentTermsCreate}}. If the API returns errors, the step fails and they are at {{paymenttermscreate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?