Sumup Debug

作者 sumupcb72003b417cApache-2.0收錄於 2026年10月8日更新於 2026年10月8日

Troubleshoot common SumUp integration failures. Use when SumUp HMAC signature checks fail, checkout sessions expire, scopes aren't activated, widget mount is blocked, affiliate keys don't match, or `checkout_reference` collides.

AI 產生的概覽

診斷並修復常見的 SumUp 支付整合問題,例如簽章、結帳、權限範圍與元件錯誤。

功能
提供一套針對 SumUp 整合失敗的疑難排解手冊,包含快速分類矩陣,以及常見問題的症狀、可能原因、修正方式與驗證步驟。涵蓋 HMAC webhook 簽章不符、結帳工作階段過期、權限範圍缺少或驗證方式不符、幣別與商家不符、聯盟金鑰不符、checkout_reference 重複,以及卡片元件無法掛載等情況。每次回答需依信心程度排序根本原因,提出最小重現檢查、具體修正步驟、修正後驗證清單與監控改善建議。
適用情境
當 SumUp 整合發生問題而需要診斷與修復指引時使用,例如 HMAC 簽章驗證失敗、結帳工作階段過期、權限範圍未啟用、元件無法掛載、聯盟金鑰不符,或 checkout_reference 發生衝突。
執行需求
不需要指令碼或特殊工具,僅為說明性文件。依指引操作時需要可存取 SumUp 整合及其憑證與密鑰,並具備用於重現的沙箱環境。

SumUp Troubleshooting Playbook

Use this skill for diagnosis and remediation of failing SumUp integrations.

Fast Triage Matrix

  1. Classify symptom:
    • Auth/signature error
    • Checkout creation/processing error
    • Widget/client-side mount or flow error
    • Async mismatch (success in UI, failure in backend state)
  2. Capture evidence:
    • request/response payloads (sanitized), HTTP status, error code/message
    • checkout id, merchant code, checkout_reference
    • webhook delivery id and signature verdict
  3. Reproduce in sandbox before changing production behavior.

Common Failures and Fixes

HMAC signature mismatch (x-payload-signature)

Symptoms:

  • Webhook verification fails for all events or intermittently.

Likely causes:

  • Body parser mutates payload before verification.
  • Wrong webhook secret/environment pair.
  • Digest computed with non-raw body bytes.

Fix:

  • Verify against raw request body bytes.
  • Ensure HMAC SHA-256 with exact configured secret.
  • Confirm secret belongs to the same merchant/environment.

Verify:

  • Signature validation passes for replayed payload and for live sandbox webhook.

Expired checkout/session window

Symptoms:

  • Payment attempt fails after delay, stale checkout status, or timeout flow.

Likely causes:

  • Checkout left pending beyond validity window.
  • Frontend retries with expired checkout id.

Fix:

  • Create a new checkout for each retry attempt.
  • Add frontend timeout handling that requests a fresh checkout.

Verify:

  • Retried flow always uses new checkout id/reference and succeeds in sandbox.

Missing scope activation or auth mismatch

Symptoms:

  • 401/403 responses despite valid credentials.

Likely causes:

  • Missing payments or other required scope.
  • API key used where OAuth is required, or vice versa.

Fix:

  • Confirm auth model for integration type.
  • Request/enable required scopes and re-issue token/key as needed.

Verify:

  • Previously failing endpoint succeeds with least-privilege valid credentials.

Currency and merchant mismatch

Symptoms:

  • Checkout rejected for currency or merchant constraints.

Likely causes:

  • Checkout currency not enabled for merchant.
  • Wrong merchant selected in multi-merchant context.

Fix:

  • Validate merchant and currency before checkout creation.
  • Enforce mapping rules in backend validation layer.

Verify:

  • Invalid combinations are blocked early; valid combinations process.

Affiliate key / app identifier mismatch

Symptoms:

  • Card-present flows fail or cannot initialize correctly.

Likely causes:

  • Bundle ID/app ID does not match affiliate key configuration.
  • Missing affiliate metadata in card-present requests.

Fix:

  • Align app identifiers with affiliate key setup.
  • Include required affiliate data for terminal/cloud flows.

Verify:

  • Device/reader checkout path initializes and completes in sandbox/test device.

Duplicate checkout_reference

Symptoms:

  • Duplicate or conflicting checkout outcomes, reconciliation confusion.

Likely causes:

  • Non-unique reference generation.
  • Retry logic reuses stale reference without idempotency safeguards.

Fix:

  • Generate unique deterministic references per logical payment intent.
  • Add duplicate detection and safe retry behavior.

Verify:

  • Duplicate attempts are rejected or reconciled without double fulfillment.

Card Widget blocked or not mounting

Symptoms:

  • Widget fails to render or emits error/init failures.

Likely causes:

  • Script blocked by CSP or domain policy.
  • Invalid checkout id or environment mismatch.
  • Frontend initialization race conditions.

Fix:

  • Allow required SumUp script origin in CSP and JS origins config.
  • Confirm checkout id environment and lifecycle.
  • Mount only after script load and DOM ready.

Verify:

  • Widget consistently mounts and can complete test payments.

Required Response Contract

For each debugging answer, include:

  1. Most likely root cause ranked by confidence.
  2. Minimal reproducible check to confirm/disprove each hypothesis.
  3. Exact fix steps with low-risk rollout advice.
  4. Post-fix verification checklist.
  5. Any monitoring/logging improvements to prevent recurrence.

來源與署名

來源:sumup/sumup-skills位於skills/sumup-debug提交cb72003

授權條款: Apache-2.0

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架