Skip to main content

Public Fetch (Widget)

Public, unauthenticated endpoint used by the v2 payment widget to fetch a styling preset on load. Same response shape as the admin Get endpoint, but served by the integration server with no Bearer token. CSS is not sensitive — UUIDs are unguessable and the merchant explicitly chose to expose it by referencing it from their site.

Authentication: None.

Endpoint: GET /api/v2/widget-styles/{id}


Path Parameters

ParameterTypeRequiredDescription
idstringYesWidget style UUID

Response — 200 OK

Same payload as Get Widget Style.

StatusDescription
404Widget style not found

Initialization

The widget calls this endpoint internally when widgetStyleId is supplied:

import { RudiqPaymentWidget, RudiqWidgetVersion } from "@rudiq/payment-widget";

<RudiqPaymentWidget
host="https://api.example.com"
paymentId={paymentId}
token={token}
widgetVersion={RudiqWidgetVersion.V2}
widgetStyleId="550e8400-e29b-41d4-a716-446655440000"
isOpen={open}
onClose={() => setOpen(false)}
/>

Without widgetStyleId the widget falls back to its built-in defaults — there is no server-side "default" preset.