{"id":"3cb7d6c9-51b0-495f-bbe3-5e3339be70f6","task":"Implement payment orchestration with automatic PSP failover using a routing layer","domain":"payments-general","steps":["Build or adopt a payment router that receives a normalized charge request and selects a PSP based on configurable rules (cost, acceptance rate, currency, card network).","For each PSP, implement a normalized adapter that translates the common charge request into PSP-specific API calls and maps responses back to a common result schema.","On a soft decline or network timeout from the primary PSP, the router retries on a secondary PSP using a new idempotency key to avoid double charges.","Track per-PSP acceptance rates and error rates in a time-series store; feed this data back into routing weights so lower-performing PSPs receive less traffic automatically.","Implement a circuit breaker per PSP: after a configurable number of consecutive errors, stop routing to that PSP for a cool-down period.","Ensure your vault or tokenization layer can provide the raw PAN or a per-PSP network token so the fallback PSP can authorize the card."],"gotchas":["Failover only makes sense for soft declines (insufficient funds, do-not-honor) and network errors — hard declines (stolen card, invalid card number) will fail on any PSP and should not be retried.","If your primary PSP partially processes a charge before the timeout, a failover retry can cause a double charge; use idempotency keys and confirm settlement status before retrying.","Storing raw PANs to enable cross-PSP failover creates significant PCI scope; prefer a network tokenization vault or a PCI-compliant vault provider that can issue per-PSP tokens."],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:30.487Z"},"url":"https://mcp.waymark.network/r/3cb7d6c9-51b0-495f-bbe3-5e3339be70f6"}