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 { CheqpointClient, RejectedError } from "@cheqpoint/sdk";

const cheq = new CheqpointClient({ connectionKey: process.env.CHEQPOINT_CONNECTION_KEY! });

async function processRefund(orderId, amountPence, reason) {
  try {
    // checkpoint() blocks until approved; throws RejectedError if declined
    const approval = await cheq.checkpoint({
      action: "shopify_refund",
      summary: `AI requesting refund of ${amountPence/100} for order ${orderId}`,
      details: { orderId, amountPence, reason },
    });

    // Proceed with Shopify API call
    const finalPayload = approval.modifiedDetails ?? { orderId, amountPence, reason };
    return await callShopifyAdminAPI("refund", finalPayload);
  } catch (e) {
    if (e instanceof RejectedError) {
      console.warn("Refund rejected:", e.message);
      return { success: false, reason: e.message };
    }
    throw e;
  }
}

Get your Connection Key at cheqpoint.co/signup.