Skip to main content

Refund

Requires one of the read_orders, read_marketplace_orders, or read_buyer_membership_orders access scopes.

Subscribe to field-level changes on the Refund GraphQL Admin API object. You can subscribe to create and update events, as well as changes to specific fields.

Each topic corresponds to a commerce resource that can exist independently within its domain. Child entities that depend on a parent within the same domain don't have their own topic. Instead, changes to child entities trigger a delivery on the parent topic. Calculated fields, derived fields, auto-updated timestamps, and cross-domain fields aren't available as triggers.

shopify.app.toml

[events]
api_version = "unstable"

[[events.subscription]]
handle = "my_refund_event"

topic = "Refund"
actions = ["update"]
triggers = ["refund.orderAdjustments"]

uri = "https://your-app.com/events"

query = """
query refund_event_payload($refundId: ID!) {
refund(id: $refundId) {
id
orderAdjustments(first: 10) {
nodes {
id
}
}
}
}
"""

Field-level triggers for Refund subscriptions.

All triggers require one of the read_orders, read_marketplace_orders, or read_buyer_membership_orders access scopes. Those triggers that require additional scopes are documented where relevant. Deprecated triggers are listed last.

Subscriptions can include multiple triggers. Use the shopify-webhook-id header for deduplication when handling duplicate deliveries.

Custom queries aren't limited to Refund. They can query the full GraphQL Admin API.

Anchor to list-of-topics-refund.*
refund.*

Fires when events involve the Refund object, which represents a financial record of money returned to a customer from an order.

The "create" and "delete" actions are only relevant within the context of this parent topic. Use fields_changed to follow or replicate impacted data after a delete event. Define a custom query to retrieve specific fields from create events.

refund.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under refund, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Variables: refundId

Anchor to list-of-topics-refund.orderAdjustments
refund.orderAdjustments

Fires when the orderAdjustments field on the Refund object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The orderAdjustments field represents the order adjustments that are attached with the refund.

Variables: orderAdjustmentId, refundId

Anchor to list-of-topics-refund.refundLineItems.*
refund.refundLineItems.*

Fires when the refundLineItems field on the Refund object changes.

refund.refundLineItems.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under refund.refundLineItems, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The refundLineItems field represents the RefundLineItem resources attached to the refund.

Variables: refundId, refundLineItemId

Anchor to list-of-topics-refund.refundLineItems.subtotalSet.*
refund.refundLineItems.subtotalSet.*

Fires when the subtotalSet field on the RefundLineItem object changes.

refund.refundLineItems.subtotalSet.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under refund.refundLineItems.subtotalSet, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The subtotalSet field represents the subtotal price of a refunded line item in shop and presentment currencies.

Variables: refundId, refundLineItemId

Anchor to list-of-topics-refund.refundLineItems.subtotalSet.presentmentMoney
refund.refundLineItems.subtotalSet.presentmentMoney

Fires when the presentmentMoney field on the MoneyBag object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

Amount in presentment currency.

Variables: refundId, refundLineItemId

Anchor to list-of-topics-refund.refundLineItems.subtotalSet.shopMoney
refund.refundLineItems.subtotalSet.shopMoney

Fires when the shopMoney field on the MoneyBag object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

Amount in shop currency.

Variables: refundId, refundLineItemId

Anchor to list-of-topics-refund.transactions.*
refund.transactions.*

Fires when the transactions field on the Refund object changes.

refund.transactions.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under refund.transactions, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The transactions field represents the transactions associated with the refund.

Variables: orderTransactionId, refundId

Anchor to list-of-topics-refund.transactions.fees
refund.transactions.fees

Fires when the fees field on the OrderTransaction object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The fees field represents the transaction fees charged on the order transaction.

Variables: orderTransactionId, refundId, transactionFeeId

Anchor to list-of-topics-refund.transactions.status
refund.transactions.status

Fires when the status field on the OrderTransaction object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The status field represents the status of this transaction.

Variables: orderTransactionId, refundId


Was this page helpful?