Set a card PIN
Changed onSet or replace the card's online PIN using a block encrypted in your client with the published PIN encryption public key. Grid cannot decrypt the block and never stores or logs PIN material.
Use this when you operate your own PIN-entry UI. For a hosted PIN-entry iframe, use GET /cards/{id}/pin-entry-url — the two are alternatives, and a card may use either at any time.
Setting a PIN clears a BLOCKED PIN, so a cardholder locked out by incorrect attempts can recover by choosing a new PIN without a separate unblock. Read GET /cards/{id} for the resulting status. Grid supports online PINs only; offline PIN cards are not supported.
Every call 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}/set-pin
- AuthHTTP basic
Request body
Example request
{
"encryptedPinBlock": "SGVsbG8sIHRoaXMgaXMgYSBiYXNlNjQtZW5jb2RlZCBjaXBoZXJ0ZXh0Li4u"
}Response
PIN change accepted.
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