---
issue: 013
title: "createProviderPaymentIntent always routes to request-network/intents regardless of provider argument"
severity: critical
domain: Payment
status: resolved
resolved: 2026-05-29
fix: "Replaced stub getProviderIntentEndpoint in payment.ts with a switch on provider: shkeeper → shkeeper.intents, decentralized → decentralized.save, default → requestNetwork.intents."
labels: [bug, frontend, critical, payment, routing]
status: open
created: 2026-05-29
source: Doc vs Code Audit 2026-05-29
---

# 🔴 createProviderPaymentIntent always routes to request-network/intents regardless of provider argument

**Severity:** critical
**Domain:** Payment
**Labels:** bug, frontend, critical, payment, routing

## Description

src/actions/payment.ts getProviderIntentEndpoint() ignores the provider parameter and always returns endpoints.payments.requestNetwork.intents ('/payment/request-network/intents'). Any checkout using provider='shkeeper' silently POSTs to the wrong backend service.

## Current Behavior

SHKeeper checkout silently POSTs to /payment/request-network/intents instead of /payment/shkeeper/intents, causing payment intent creation to fail or create a wrong-provider payment record.

## Expected Behavior

getProviderIntentEndpoint() should return the correct provider-specific endpoint based on the provider argument (e.g., endpoints.payments.shkeeper.intents for 'shkeeper').

## Reproduction Steps

Initiate a SHKeeper checkout and intercept network — observe the POST goes to /payment/request-network/intents not /payment/shkeeper/intents.

## Affected Files

- `frontend/src/actions/payment.ts`

## References

- [Doc vs Code Audit Report](../09%20-%20Audits/Doc%20vs%20Code%20Audit%20Report%20-%202026-05-29.md)
