Get a PIN-entry URL
Changed onGet a temporary URL for a secure PIN-entry iframe. The cardholder chooses a four-digit PIN inside the iframe, without the plaintext PIN crossing your servers or Grid's. Grid supports online PINs only.
Configure cardConfigs.pinTargetOrigin through PATCH /config before requesting a URL. It is the canonical HTTPS origin of the page that hosts the iframe. The iframe is restricted to that origin; this endpoint takes no request body or origin parameter.
Each call creates a fresh, temporary PIN-entry session. Request a URL immediately before displaying the form. Fetching the URL does not set or change the PIN. Set your iframe's src to the returned iframeUrl without modifying it. Follow the Card PIN guide to submit the form and confirm the result. Never store, cache, or log the URL or token. The session expires at expiresAt and permits one successful PIN submission. Responses include Cache-Control: no-store.
Use the iframe's submission result to confirm completion, and GET /cards/{id} to read pinStatus. OK alone cannot confirm a change to an already configured PIN.
If you operate your own PIN-entry UI, use POST /cards/{id}/set-pin with a client-encrypted payload instead.
Requires permission to manage cards. Every successful URL request is audit-logged with the requesting actor.
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/cards/{id}/pin-entry-url
- AuthHTTP basic
Query parameters
JSON-encoded CSS declarations for the PIN input, with string values and optional nested declarations for supported pseudo-classes: :first-child, :last-child, :enabled, :read-write, :read-only, :placeholder-shown, :valid, :invalid, :disabled, :hover, :focus-within, :focus, :focus-visible, and :active. Use CSS property names such as font-size. URL-encode the JSON as one query parameter; do not base64-encode it. Grid includes the styles in the returned iframeUrl. Omit this parameter to use the default appearance. Each request applies only to its returned URL. Styles that load external resources, including external fonts and images, are not supported. The JSON string is limited to 3072 characters, and its compact UTF-8 representation must fit within 4096 characters after base64 encoding. Invalid JSON, an invalid structure, or oversized styles return 400 INVALID_INPUT.
Response
A fresh PIN-entry URL and its expiration.
Example response
{
"iframeUrl": "https://embed.example.com/pin?session=eyJhbGciOiJIUzI1NiJ9...",
"sessionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "2026-05-08T14:16:00Z",
"environment": "SANDBOX"
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- warning
added the new
CORRIDOR_UNDER_MAINTENANCEenum value to theresponse property for the response status
- warning