Skip to main content
Show a loading overlay or spinner while the payment is being processed to provide feedback to users.

Recipe

How it works

  1. Listen for the primer:state-change event
  2. Check the isProcessing property from the event detail
  3. Show your loading UI when isProcessing is true
  4. Hide it when isProcessing is false

Variations

Custom loading screen

Inline loading overlay

Show processing message

See also

Disable external buttons

Prevent double submission during payment processing

Events guide

Handle payment lifecycle events