integration_type_from_headers (payments/server_integration.rs)

hyperswitch · crates/router/src/core/payments/server_integration.rs · rust · Apache-2.0
payments

Parses X‑Integration‑Type header and validates against merchant integration type.

// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Shared plumbing for the server-integration (`X-Integration-Type: server`) response shape.
//!
//! Both the create-intent and update-intent flows hand the caller the two artifacts its checkout
//! would otherwise fetch in separate calls: the combined payment-method list and the wallet
//! session tokens. This module owns the header parsing and the concurrent fetch of those two
//! sections, and attaches them to the response. The two routes decide when to run it: a create
//! or an update that opted in with the header.
//!
//! No business logic lives here. It calls the two existing c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key