Skip to main content

PinPad API

The PinPad API provides secure PIN entry functionality for POS UI extensions, allowing you to display modal PIN pad interfaces for secure PIN collection, validation, and processing with customizable options and callback handling. The API enables secure authentication workflows within your extensions.

  • Staff authentication: Implement secure authentication requiring PIN verification from staff.
  • Access control: Create access control for sensitive operations like refunds or voids.
  • Authorization: Build security features requiring PIN-based authorization for critical actions.
  • Secure entry: Create secure data entry workflows requiring PIN confirmation.
Support
Targets (28)

The shopify global object provides secure PIN entry functionality. Access the following properties on shopify to display PIN pad interfaces for authentication and secure input.

Anchor to showPinPad
showPinPad
(onSubmit: (pin: number[]) => | Promise<>, options?: ) => void
required

Shows a PIN pad to the user in a modal dialog. The onSubmit function is called when the PIN is submitted and should validate the PIN, returning 'accept' or 'reject'.

• When accepted: The modal dismisses and triggers the onDismissed callback—perform any post-validation navigation in this callback rather than in onSubmit.

• When rejected: Displays the optional errorMessage and keeps the modal open.

Use for implementing secure authentication workflows, access control, or PIN-based verification systems.


  • Implement secure PIN validation: Validate PINs securely on your backend service rather than in client-side code, using the onSubmit callback to communicate with your secure validation endpoint.
  • Provide clear user feedback: Use appropriate labels, titles, and error messages to guide users through the PIN entry process.
  • Handle PIN entry appropriately: Implement proper error handling for PIN validation failures, provide retry mechanisms, and ensure sensitive PIN data is handled securely throughout the process.
  • Configure appropriate PIN constraints: Set reasonable PIN length requirements and masking options based on your security requirements and user experience considerations.

PIN validation must be handled through the onSubmit callback and should be performed securely on your backend service rather than in client-side extension code.


Was this page helpful?