Improved

Loyalty: refund retries, order status and Spotlight headers

Correction: Refunds are safe to retry. Send your own id with Create Refund: refunds are deduplicated by id for each order. Without an id, every request records a new refund. Our earlier note in "Loyalty orders: safe to resend" said to never retry refunds; that applies only to refunds sent without an id.

Also clarified:

  • Create Order: status is matched against the order statuses set in your Loyalty admin, and a processed order ignores resends, so a resend doesn't change its status. customer_id, ip_address and user_agent are optional (ip_address and user_agent are used to credit referrals). When you send customer, always include tags.
  • Create Redemption: with delay_points_deduction, points aren't held until the code is used, so the balance can go negative.
  • Retrieve the Spotlight view: X-Customer-Store-Account-Id is optional. Leave it out for shoppers who don't have one.

Updated recipes: Record an order and award points, Refund an order and Custom platform: sync orders to Reviews and Loyalty.