younifyd
Menu

orderPaymentStatus

Retrieves the status of a deferred payment by its payment reference ID. Use this query to monitor the processing status of payments that are initiated through payment mutations.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the orderPaymentStatus action (under Order).
  3. Fill in the fields below, then reference the result from later steps as {{orderpaymentstatus.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query OrderPaymentStatus($paymentReferenceId: String!, $orderId: ID!) {
  orderPaymentStatus(paymentReferenceId: $paymentReferenceId, orderId: $orderId) {
    errorMessage
    paymentReferenceId
    status
    transactions {
      accountNumber
      amount
      amountRoundingSet {
        presentmentMoney
        shopMoney
      }
      amountSet {
        presentmentMoney
        shopMoney
      }
      amountV2 {
        amount
        currencyCode
      }
      authorizationCode
      authorizationExpiresAt
      createdAt
      currencyExchangeAdjustment {
        adjustment
        finalAmountSet
        id
        originalAmountSet
      }
      device {
        activePaymentSession
        cashDrawer
        id
      }
      errorCode
      fees {
        amount
        flatFee
        flatFeeName
        id
        rate
        rateName
        taxAmount
        type
      }
      formattedGateway
      gateway
      id
      kind
      location {
        activatable
        address
        addressVerified
        createdAt
        deactivatable
        deactivatedAt
        deletable
        fulfillmentService
        fulfillsOnlineOrders
        hasActiveInventory
        hasUnfulfilledOrders
        id
        isActive
        isFulfillmentService
        isPrimary
        legacyResourceId
        localPickupSettingsV2
        name
        shipsInventory
        suggestedAddresses
        updatedAt
      }
      manualPaymentGateway
      manuallyCapturable
      maximumRefundable
      maximumRefundableV2 {
        amount
        currencyCode
      }
      multiCapturable
      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
      }
      parentTransaction
      paymentDetails
      paymentId
      paymentMethod
      processedAt
      receiptJson
      settlementCurrency
      settlementCurrencyRate
      shopifyPaymentsSet {
        extendedAuthorizationSet
        refundSet
      }
      status
      test
      totalUnsettled
      totalUnsettledSet {
        presentmentMoney
        shopMoney
      }
      totalUnsettledV2 {
        amount
        currencyCode
      }
      user {
        accountType
        active
        email
        exists
        firstName
        id
        initials
        isShopOwner
        lastName
        locale
        name
        phone
        privateData
      }
    }
    translatedErrorMessage
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

paymentReferenceIdstringrequired

Unique identifier returned by orderCreatePayment.

orderIdstringrequired

ID of the order for which the payment was initiated.

json
{
  "paymentReferenceId": "string",
  "orderId": "string"
}

Response

Read the result with {{orderpaymentstatus.response.data.data.orderPaymentStatus}}. If the API returns errors, the step fails and they are at {{orderpaymentstatus.response.data.errors}}.

errorMessagestring
paymentReferenceIdstring
statusstring

One ofSUCCESSAUTHORIZEDVOIDEDREFUNDEDCAPTUREDPURCHASEDERRORPROCESSINGREDIRECT_REQUIREDRETRYABLEUNKNOWNINITIATEDPENDING

transactionsarray<object>
accountNumberobject
amountobject
amountRoundingSetobject
amountSetobject
amountV2object
authorizationCodeobject
authorizationExpiresAtobject
createdAtobject
currencyExchangeAdjustmentobject
deviceobject
errorCodeobject
feesobject
formattedGatewayobject
gatewayobject
idobject
kindobject
locationobject
manualPaymentGatewayobject
manuallyCapturableobject
maximumRefundableobject
maximumRefundableV2object
multiCapturableobject
orderobject
parentTransactionobject
paymentDetailsobject
paymentIdobject
paymentMethodobject
processedAtobject
receiptJsonobject
settlementCurrencyobject
settlementCurrencyRateobject
shopifyPaymentsSetobject
statusobject
testobject
totalUnsettledobject
totalUnsettledSetobject
totalUnsettledV2object
userobject
translatedErrorMessagestring

Need more? See the Shopify guide for connection setup and behaviour shared by every action.