Shopify Refund/Generate Gift Card for Line Items (v3)

Refunds chosen line items on a Shopify order, or issues a gift card instead, with built-in fraud and rate-limit safety checks. Use it to automate refunds while keeping abuse under control.

What it does

  • Refunds specific line items, or all of them, on a Shopify order.
  • Can issue a gift card instead of a monetary refund, and refund shipping in full or in part.
  • Can calculate a refund without processing it, and block refunds that breach configured safety limits.

Inputs

NameTypeDescription
Shopify TokenCredentialsShopify access token
Shopify DomainCredentialsShopify sub-domain
Order IDStringShopify order ID
Refund ReasonStringRefund reason that will be added to the order notes
Refund Only Shipping?Optional BooleanWhether to refund only the shipping fee. Linked to: Shipping Refund Type. Default: false
Generate Gift Card?Optional BooleanWhether to generate a gift card instead of issuing a refund. Default: false
Line ItemsOptional ListShopify line items to be refunded. Default: All line items
Only Calculate Refund?Optional BooleanWhether to only calculate the refund and not actually perform it. Default: false
Restock TypeOptional StringRestock type for the line items. Default: no_restock Possible values: no_restock, cancel, return.
Shipping Refund TypeOptional StringType of refund for the shipping fee. Default: Depending on the line items Possible values: full, partial, none.
Partial Shipping Refund CriteriaOptional StringCriteria on which to calculate the partial shipping fee refund. Default: quantity Possible values: quantity, weight.
Update Order Note?Optional BooleanWhether to update the order note with the refund reason. Default: true
Max Refund AmountOptional NumberMax refund amount for one transaction
Check for Previous Refunds?Optional BooleanWhether to check for previous refunds for the order customer. Default: true
Check Universal Limits?Optional BooleanWhether to check for domain wide number of refunds during last hour, 12 hours and 24 hours. Default: true
Check Universal Amount Limits?Optional BooleanWhether to check amount refunded in the last 24 hours. Default: false
Check for Fraud Limits?Optional BooleanWhether to check for shipping/billing addresses and card details limits. Default: false
Send Notifications to DG Slack channel?Optional BooleanWhether to send notifications to the DG Slack channel if the universal limits were exceeded
Fraud Records LimitOptional NumberLimit for refunds created for address/card number/card name. Linked to: Check for Fraud Limits. Default: 1
Fraud Addresses LimitOptional NumberLimit for refunds created from different addresses for a specific zip code. Linked to: Check for Fraud Limits. Default: 5
Hour LimitOptional NumberHour limit for refunds created. Linked to: Check Universal Limits. Default: 10
Twelve Hour LimitOptional NumberTwelve hour limit for refunds created. Linked to: Check Universal Limits. Default: 30
Twenty Four Hour LimitOptional NumberTwenty four hour limit for refunds created. Linked to: Check Universal Limits. Default: 50
Twenty Four Hour Amount LimitOptional NumberTwenty four hour amount limit for refunds created. Linked to: Check Universal Amount Limits. Default: 2000

Outputs

NameTypeDescription
Operation Successful?BooleanWhether the refund/gift card was created/calculated successfully
Calculate Refund Only?BooleanWhether to only calculate the refund and not actually process the refund
Blocked by Safety Checks?BooleanWhether the refund was blocked by safety/fraud checks
Order Meta Fields Created?BooleanWhether the refund order meta fields were created
Fraud Prevention Meta Objects Created?BooleanWhether the fraud prevention addresses/card details meta objects were created
Refund Meta Object Created?BooleanWhether the refund meta object was created
Refund Meta Object Updated?BooleanWhether the refund meta object was updated after the refund
Refund DetailsObjectRefund details
AmountNumberAmount
Amount StringStringAmount and currency
Gift Card CodeStringGift card code. Dependant on: Generate Gift Card

Notes

  • Use Only Calculate Refund to preview the amounts without actually refunding.
  • The universal, amount and fraud limit checks guard against abuse and can block a refund even when everything else is valid.

API reference