Shopify

Shopify

Use Cheqpoint to gate high-stakes Shopify actions — processing refunds, canceling orders, and editing customer records — behind human approval before they execute.

Use case

E-commerce AI agents can handle customer support, including complex tasks like issuing refunds. Because these actions involve financial transfers, they carry high risk. Cheqpoint sits between your AI agent and the Shopify Admin API, ensuring every refund is verified by a human team member.

Common actions to gate

  • Processing full or partial refunds
  • Canceling or archiving orders
  • Issuing gift cards or discount codes
  • Updating customer shipping addresses or contact info
  • Modifying inventory levels

Prerequisites

  • @shopify/shopify-api or the Shopify GraphQL Admin API configured.
  • Cheqpoint Connection Key.

Sample request payload — refund processing

json
{
  "action": "shopify_refund",
  "summary": "AI requesting £145 refund for order #1092 - Item defective",
  "details": {
    "orderId": "gid://shopify/Order/1092",
    "amountPence": 14500,
    "currency": "GBP",
    "reason": "Customer reported defect in item #881"
  }
}

Sample Cheqpoint response

json
{
  "status": "approved",
  "modifiedDetails": null,
  "decisionNote": "Photos of defect verified. Refund approved."
}
import Cheqpoint from "cheqpoint";

const cheq = new Cheqpoint({ apiKey: process.env.CQ_API_KEY });

async function processRefund(orderId, amountPence, reason) {
  // Gate behind Cheqpoint
  const approval = await cheq.request({
    action: "shopify_refund",
    summary: `AI requesting refund of ${amountPence/100} for order ${orderId}`,
    details: { orderId, amountPence, reason },
    timeoutMs: 30_000,
  });

  if (approval.status !== "approved") {
    console.warn("Refund rejected:", approval.decisionNote);
    return { success: false, reason: approval.decisionNote };
  }

  // Proceed with Shopify API call
  const finalPayload = approval.modifiedDetails ?? { orderId, amountPence, reason };
  return await callShopifyAdminAPI("refund", finalPayload);
}

Get your Connection Key at cheqpoint.co/signup.