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 从公开仓库中收录这些内容。

举报或申请下架