Skip to main content
All CollectionsAcceptScanning BarcodesUsing a Smartphone Camera
Scanning Barcode Passes with a Smartphone Camera
Scanning Barcode Passes with a Smartphone Camera

A Simple, No-App Solution: barcode scanning using a smartphone camera

Paul Tomes avatar
Written by Paul Tomes
Updated this week

Using just the smartphone camera for scanning barcode passes, without any dedicated scanning application, is a practical and user-friendly approach. This method leverages the ubiquity of smartphone cameras and the ease of embedding URLs in barcodes, making it accessible for both merchants and customers. Here’s how you can implement this solution effectively:


Implementation Steps

Embedding URLs in Barcodes:

  • Barcode Format: Use a 2D barcode format like QR Code, which is widely supported and easily scanned by smartphone cameras.

  • URL Encoding: Encode a URL in the barcode that directs the user to a specific webpage. This URL can include unique identifiers or parameters to track the pass and the user. (e.g., https://pub1.pskt.io/or/${pid}, https://yourdomain.com/redeem?id=${externalId})

Webpage Design:

  • Landing Page: Create a secure landing page that the URL directs to. This page should be designed to handle the specific actions required by the merchant (e.g., validating a ticket, redeeming an offer).

  • Authentication: Implement a login system or a security code entry to ensure that only authorized users can access sensitive actions. This could be a simple PIN, a one-time password (OTP), or a more robust authentication method.

Merchant Scanning Process:

  • Camera Access: Merchants can use their smartphone or tablet camera to scan the barcode. Most modern smartphones have built-in barcode scanning capabilities in their camera apps.

  • Redirect to Webpage: Upon scanning, the camera app will recognize the URL and prompt the user to open it in a web browser.

  • Action on Webpage: The merchant is then taken to the webpage where they can perform the necessary actions, such as validating the pass or processing a transaction.

Security Considerations:

  • Unique Identifiers: Ensure that each barcode contains a unique identifier to prevent duplication and misuse.

  • Session Management: Implement session management on the webpage to handle user interactions securely.

  • Encryption: Use HTTPS to encrypt data transmitted between the smartphone and the webpage to protect against interception.

Integration with Existing Systems:

If you want the action taken on the webpage to update other systems (e.g., POS, CRM, or PassKit), ensure the webpage is designed to send data to these systems after the action is completed. For example:

  • PassKit Updates: If you want the pass to reflect changes (e.g., updating a loyalty balance, updating list of offers available / redeemed, or marking a ticket as scanned), the webpage can send a request to PassKit’s API to update the pass in real-time. This ensures the pass remains dynamic and up-to-date for the customer.

  • POS Integration: After validating a pass or processing a transaction, the webpage can send real-time updates to your POS system to reflect the action (e.g., marking a ticket as used or redeeming a coupon).

  • CRM Integration: Sync customer data with your CRM to track interactions, update loyalty points, or personalize future offers.

This optional integration enhances functionality and ensures seamless coordination across your systems.


Example Workflow

  1. Customer Presents Barcode:

    • The customer opens their digital wallet and displays the barcode pass on their smartphone.

  2. Merchant Scans Barcode:

    • The merchant uses their smartphone camera to scan the barcode. The camera app recognizes the URL and prompts the merchant to open it.

  3. Redirect to Webpage:

    • The merchant is redirected to the secure webpage where they can see the pass details and perform the required action (e.g., validate the ticket).

  4. Authentication:

    • The merchant may be prompted to enter a security code or log in to proceed with the action.

  5. Action Completion:

    • Once authenticated, the merchant completes the action (e.g., marks the ticket as used), and the system updates accordingly.


Benefits

Ease of Use

No need for additional scanning apps; leverages existing smartphone capabilities.

Cost-Effective

Reduces the need for specialized scanning hardware.

Flexibility

Can be used in various scenarios, from event ticketing to loyalty programs.


Considerations

Before implementing a smartphone camera-based barcode scanning solution, it’s important to consider the following:

Webpage Development and Maintenance

  • You’ll need to build and maintain a secure, responsive webpage that handles the actions triggered by scanning the barcode (e.g., validation, redemption, or updates).

  • The webpage must be optimized for speed and usability to ensure a smooth experience for merchants.

  • Regular updates and testing will be required to maintain functionality and security.

Security Measures

  • Implement robust authentication (e.g., login, security codes) to prevent unauthorized access to sensitive actions.

  • Use HTTPS to encrypt data transmitted between the smartphone and the webpage.

  • Include unique identifiers in the barcode to minimize the risk of duplication or misuse.

Integration Complexity

  • If you want the webpage to update external systems (e.g., POS, CRM, or PassKit), ensure proper API integration and real-time data synchronization.

  • Testing and monitoring are essential to ensure seamless communication between systems.

User Experience

  • Design the webpage to be intuitive and mobile-friendly, as merchants will access it via smartphones or tablets.

  • Minimize loading times and streamline the process to avoid frustrating users.

Cost and Resources

  • Building and maintaining a custom webpage requires development resources and ongoing support.

  • Consider the cost of hosting, security, and potential updates when planning your solution.

Alternative: For Coupons use the CIR Link

If you’re using Coupons with PassKit’s Customer Initiated Redemption solution, there’s no need to develop or maintain a webpage—simply encode the redemption link directly into the barcode (e.g., https://pub1.pskt.io/or/${pid} or https://pub2.pskt.io/or/${pid}). For more details, refer to the Customer Initiated Redemption article.


Conclusion

By following these steps and considerations, you can effectively implement a barcode scanning solution using just the smartphone camera, enhancing both convenience and security for your customers and merchants.

Did this answer your question?