Interface PaymentPresentationMessagePart

interface PaymentPresentationMessagePart {
    context?: "INFO" | "AUTH";
    formatting?: ("BOLD" | "ITALIC" | "UNDERLINE")[];
    text: string;
    type: "TEXT" | "LINK";
    url?: string;
}

Properties

context?: "INFO" | "AUTH"

Optional semantic context for UI treatment.

Provides guidance on how the link should be handled by the client application.

  • INFO: Content is purely informational. May be opened in iframe, same tab, new tab, or WebView within mobile app.
  • AUTH: Content requires customer authentication. Must be opened in new window/tab in browser, or using ASWebAuthenticationSession (iOS) / Android Custom Tabs (Android).
context: "INFO"  // Informational content
context: "AUTH" // Authentication required
formatting?: ("BOLD" | "ITALIC" | "UNDERLINE")[]

Optional text styles applied to the text. Order does not imply priority.

Array of formatting flags that can be combined to style the text. Maximum 3 styles can be applied simultaneously.

  • BOLD: Render text in bold.
  • ITALIC: Render text in italic.
  • UNDERLINE: Render text underlined.
formatting: ["BOLD"]                    // Bold text
formatting: ["BOLD", "ITALIC"] // Bold and italic
formatting: ["UNDERLINE"] // Underlined text
text: string

The human-readable text content for this part.

For TEXT type: The plain text to render. For LINK type: The clickable link text to display.

text: "From "                    // Plain text part
text: "$36.71/month" // Text with styling
text: "Learn more" // Link display text
type: "TEXT" | "LINK"

Kind of part being rendered.

  • TEXT: Plain text segment.
  • LINK: Clickable hyperlink segment.
type: "TEXT"  // Plain text segment
type: "LINK" // Clickable hyperlink segment
url?: string

Target URL for LINK parts. Ignored for TEXT parts.

Required when type is "LINK", should be a valid URI.

url: "https://example.com"                // External link
url: "https://www.klarna.com/terms" // Terms link