Remove tag="type" on PaymentRequestMetadata (#4931)

This would conflict with the flattened kind: PaymentRequestMetadataKind
enum, which itself is internally tagged with "type", leading to two
"type" fields being serialized, confusing the deserializer.

Deserialization would fail, be silenced in the stripe webhook and lead
to the incorrect region being assigned to a server.
This commit is contained in:
François-Xavier Talbot
2025-12-18 18:52:43 -05:00
committed by GitHub
parent 85c65e697d
commit 8fb38ba0f2

View File

@@ -1520,7 +1520,7 @@ pub enum ChargeRequestType {
}
#[derive(Deserialize, Serialize)]
#[serde(tag = "type", rename_all = "snake_case")]
#[serde(rename_all = "snake_case")]
pub struct PaymentRequestMetadata {
#[serde(flatten)]
pub kind: PaymentRequestMetadataKind,