Documentation

Connect Shopify webhooks, configure your BYOK provider keys, and evaluate refund claims through the Pallasite API.

/

Overview

Send a refund claim to Pallasite via Shopify webhooks or the REST API to receive a structured verdict. Claims that deterministic rules cannot clear automatically escalate to your connected AI models or land in your review queue.

Sub-5ms webhook ingestion

Performance

Inbound webhook requests are verified via HMAC SHA-256 and queued asynchronously in milliseconds, with no impact on Shopify checkout speed.

Multi-model consensus

Accuracy

Higher-risk claims are evaluated by two separate models to reduce single-model errors. Pairing independent DeepSeek lineage requires an OpenRouter key.

Store policy guardrails

Rules

Return windows, category limits, and carrier weight thresholds run as deterministic rules before any AI model call is triggered.

Direct BYOK billing

0% markup

Connect your own API keys from supported model providers and pay wholesale token rates directly, typically around $0.002 per evaluated claim.

Quickstart

Connect your Shopify store, add at least one BYOK provider key, and begin screening refund webhooks in a few minutes.

1

Create your workspace

Request beta access on the waitlist. Once approved, your dashboard is provisioned automatically. Store records live in a shared database with every query scoped strictly to your tenant ID.

2

Generate API keys and add BYOK credentials

Open Settings → API & Webhooks to copy your live key (pal_live_...). Then add one or more provider keys for Google Gemini, OpenAI, Anthropic, xAI, or OpenRouter (GLM-5.3 Flash and DeepSeek-V4.1-Flash-1017).

3

Connect Shopify webhooks

Use 1-Click Shopify OAuth to register refunds/create and orders/updated with SHA-256 HMAC verification automatically, or configure the endpoint below manually for custom Shopify apps.

Shopify webhook endpoint (JSON)
https://pallasite.online/api/webhooks/shopify

Decision engine

Claims move through deterministic rules first, then escalate to AI review only when needed. One provider key is enough to start screening; high-value or split claims route to your team until keys from two providers are connected.

Gate 0 $0.00 / scan

Deterministic rules

Runs on every claim and blocks clear policy violations with zero token spend. Clean routine returns clear locally; claims up to $100 use single-model review at direct wholesale rates.

Tier 1 $100 to $500

Fast screening

Evaluates claims with Gemini 3.8 Flash ($0.75/$3.75 per 1M tokens, 100+ tok/s) and GLM-5.3 Flash ($0.15/1M input, 70% agreement threshold), alongside acting Gemini 4 Carbon for return windows, item condition, and carrier timestamps.

Tier 2 Over $500 or split

Deep multi-model review

Pairs OpenAI GPT-6 Astra (or acting Gemini 4 Carbon) with DeepSeek-V4.1-Flash-1017 via OpenRouter, plus Grok 4.7, Claude Sonnet 5.5, or optional Claude Opus 5.5, under a unanimous agreement rule.

Tier 3 Manual review

Merchant triage queue

When models disagree or high-risk signals trigger, the claim is held in your private triage queue with a structured reasoning summary for one-click approval or denial.

Canonical Consensus & Fallback Roster

Single source of truth across Edge Ingestion, Tier 1 Screening, and Tier 2 Deep Review

SYNCHRONIZED BYOK ROSTER
Tier / Stage Primary Model(s) Alternates & Fallbacks Threshold & Latency Wholesale Rate
Gate 0 Gate 0 Deterministic Gate 0 Deterministic Gate 0 checks every claim and blocks clear violations; routine clean orders fast-pass at $0.00 with zero token spend. Claims up to $100: one-model review. Provider costs are billed to you directly at wholesale rates, typically well under one cent per claim. Estimate only; actual cost depends on the models you connect and how much each model reasons. Checks every claim and blocks clear violations Claims up to $100: one-model review Sub-15ms 100% Deterministic $0.00
Tier 1 Standard Court Gemini 3.8 Flash + GLM-5.3 Flash High-speed AI screening (sub-500ms) for $100 to $500 claims — two-model Standard Court with Gemini 3.8 Flash plus a second model chosen by key (GLM-5.3 Flash via OpenRouter by default) triage claims and policy anomalies. Provider costs are billed to you directly at wholesale rates, typically well under one cent per claim. Estimate only; actual cost depends on the models you connect and how much each model reasons.
GPT-6.1 Terra (1.05M) • xAI Grok 4.7 • Claude Sonnet 5.5 • DeepSeek-V4.1-Flash-1017
Sub-500ms 70% Agreement Tier typically <1¢ / claim (est.)
Tier 2 Supreme Court Consensus OpenAI GPT-6 Astra + DeepSeek-V4.1-Flash-1017 Chief Justice (or Gemini 4 Carbon) + Supreme Panelist Acting / Alternate: Google Gemini 4 Carbon
Alternates: Gemini 4 Carbon (1M) • xAI Grok 4.7 • Claude Sonnet 5.5 • Claude Opus 5.5 (Optional) • Claude Fable 5.2
Sub-1000ms 100% Unanimous Mandate typically <1¢ / claim (est.)
Tier 3 Merchant Manual Triage Console Merchant Decision — Tier 3 (Merchant Manual Triage Console) Safe fallback to private merchant triage console with structured reasoning dossiers for sovereign one-click human attestation. Flagged for review in your Pallasite dashboard + human attestation Instant Triage Queue 100% Sovereign Human Control $0.00

BYOK setup

Connect API keys from Google Gemini, OpenAI, Anthropic, xAI, or OpenRouter so you keep direct control over model billing, privacy settings, and provider access.

Wholesale model rates

Pay providers directly with 0% platform markup, typically ~$0.0001 to ~$0.002 per scan (about $1 to $20 per 10,000 scans).

AES-256-GCM vault

Keys are encrypted at rest with a unique random salt per value and decrypted only in memory while a scan runs.

Rotate or revoke anytime

Disconnect, replace, or delete any stored provider key in one click from your workspace settings.

How to get your provider API keys
01
Google Gemini (3.8 Flash: $0.75/$3.75, 4 Carbon: $2/$10 per 1M). Create an API key in Google AI Studio. One key enables both Tier 1 screening and Tier 2 reasoning.
02
xAI Grok (Grok 4.7: $2/$6 per 1M). Generate a key in the xAI Developer Console for prompt-injection defense and fake receipt detection.
03
OpenAI (GPT-6 Astra: $10/$50, GPT-6.1 Terra: $0.50/$1.50 per 1M). Create a key in the OpenAI Platform Console for Tier 2 lead arbitration and Tier 1 fallback.
04
OpenRouter (GLM-5.3 Flash: $0.15/$0.60, DeepSeek-V4.1-Flash-1017: $0.14/$0.28 per 1M). Sign up at OpenRouter.ai for fast Tier 1 screening and independent Tier 2 second opinions.
05
Anthropic Claude (Sonnet 5.5: $2/$10, optional Opus 5.5: $4/$20 per 1M). Create a key in the Anthropic Console for policy interpretation and contract disputes.
06
Save keys in Pallasite. Open Settings → BYOK Vault in your dashboard, paste one or more keys, and select Save BYOK Credentials.

Security and governance

Tenant-scoped queries, TOTP multi-factor authentication, plan-based rate limiting, and signed webhook delivery.

Multi-tenant database scoping

Workspace records are stored in a shared database, and every query is strictly scoped to your tenant ID to prevent cross-tenant access.

TOTP MFA and backup codes

Supports RFC 6238 TOTP apps including Google Authenticator, 1Password, and Authy. Enrollment issues 10 bcrypt-hashed single-use 8-character recovery codes that invalidate on use.

Plan-aware rate limiting

Auth routes (/login, /mfa/challenge) apply IP sliding-window limits. Scan throughput scales across Basic, Pro, Max, Agency, and Enterprise tiers, returning HTTP 429 when limits are reached.

HMAC signatures and dead-letter queue

Inbound Shopify and Lemon Squeezy webhooks verify SHA-256 HMAC signatures in under 5ms. Outbound webhooks retry with exponential backoff, and failed deliveries remain available in Settings → Webhooks → Failed Deliveries for 30 days.

API reference

Submit refund claims programmatically from your backend using your merchant API key in the X-API-KEY header.

POST /api/check
Headers: X-API-KEY, Content-Type: application/json
Request body (JSON)
{
  "order_id": "shopify-order-9842",
  "text": "Customer claims item arrived damaged with torn outer packaging.",
  "amount": 149.00,
  "currency": "USD",
  "priority": 5
}
Async ticket response (202)
{
  "status": "ACCEPTED",
  "job_id": 142,
  "check_status_url": "/api/job-status/142",
  "timestamp": "2026-09-11T01:50:00.000Z"
}
Field Type Description
order_id string Unique order identifier from Shopify or your store system.
text string Customer claim message or return reason submitted for review.
amount number Refund amount requested, used to route Gate 0, Tier 1, or Tier 2 checks.
currency string Three-letter ISO currency code such as USD.
priority integer Queue priority level for asynchronous processing.
POST /api/refund/evaluate
Direct policy evaluation with carrier status
cURL example
curl -X POST https://pallasite.online/api/refund/evaluate \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: pal_live_your_api_key_here" \
  -d '{
    "order_id": "1001",
    "amount": 149.99,
    "customer_message": "Item arrived damaged in transit",
    "carrier_status": "DELIVERED"
  }'
Async polling: When using /api/check, poll the returned check_status_url (for example /api/job-status/142) with your X-API-KEY header to retrieve the completed verdict and audit record.

Ready to connect your store?

Request beta access to get your workspace and 90 days free during Open Beta.