Solutions

Developers

Resources

Solutions

Developers

Resources

Set Up Mobile Wallet Offers with Badge API: A Step-by-Step Guide
Set Up Mobile Wallet Offers with Badge API: A Step-by-Step Guide

May 8, 2025

Blog Post

Set Up Mobile Wallet Offers with Badge API: A Step-by-Step Guide

Launch mobile wallet offers in minutes with the Badge API. Create, personalize, and deliver Apple & Google Wallet passes—no app or SDK required.

Mobile wallets aren’t just for payments anymore—they’re a high-impact engagement channel that lives on your customer’s lock screen. But integrating Apple Wallet and Google Wallet directly? That’s usually slow, fragmented, and heavy on dev time.

Badge changes that.

With Badge’s Mobile Wallet API, you can launch and manage wallet-based offers and passes—without wrestling with complex SDKs or juggling platform quirks. Whether you’re adding loyalty cards, promo passes, or geo-triggered notifications, Badge gives you the tools to ship fast and scale without the typical wallet app development overhead.

The result?

A direct-to-device channel that’s frictionless for your team and frictionless for your team and for your customers.


What is the Badge API?

The Badge API is a RESTful service that lets you create, update, and manage mobile wallet passes programmatically. Passes created through the API can be downloaded directly into a customer’s Apple Wallet or Google Wallet and are automatically kept up to date.

Key capabilities include:

  • Templated Pass Creation: Define the structure and styling of your mobile wallet passes using customizable templates. Add branding, images, colors, and custom fields.

  • User-Specific Pass Generation: Generate personalized passes tied to individual customers—complete with segmentation logic, offer details, and dynamic content.

  • Secure, Scalable Delivery: All passes are distributed via device-aware download links and can be revoked or updated anytime via API.

  • No App Required: Customers simply tap a link to download the pass to their phone. Apple Wallet and Google Wallet handle the rest.


Step-by-Step: How to Set Up Mobile Wallet Offers with the Badge API

This walkthrough will detail how to go from zero to issuing live mobile wallet passes using the Badge API.


Step 1: Get API Access

To begin, log in to your Badge Workspace and create an API key.

How:

  • Go to Settings → API Management

  • Generate a key (you’ll need this for all requests)

  • Keep it secure—it authorizes access to your passes and templates


Step 2: Create a Pass Template

A Pass Template is the boilerplate design your passes are based on. It defines the pass type (e.g., Membership, Gift Card, Event Ticket) and sets the default layout, styling, and data structure for all passes issued from it.

You can create a template in two ways:

Programmatically (recommended for API users):

Use the API to configure your template from end to end:

Manually:

For most projects, especially if you're creating just one template, it's faster and easier to set it up manually in the Badge UI. The API-based method is powerful, but the UI simplifies the process significantly for one-off or low-volume needs.

Custom Attributes

Custom Attributes make your passes dynamic. Wherever you see the ⚡ icon, you can define values that vary per user or per pass.

  • Pass Attributes apply to a single pass and are set at issuance.

  • User Attributes apply across all passes assigned to a user and can be reused or updated globally.

These values can be set in either the UI or the API during pass creation.


Step 3: Issue and Update Passes with userPassUpsert

Use the userPassUpsert API endpoint to issue a new pass or update an existing one for any user, based on your live Pass Template.

When you call this endpoint, Badge returns a universal Pass Download Link—a smart URL that detects the user’s device and installs the correct pass format (Apple Wallet or Google Wallet). You can share this link directly via email, SMS, or in-app messaging.

You can update:

  • User-level attributes (e.g., loyalty points, member tier)

  • Pass-level attributes (e.g., ticket number, expiration)

This is especially useful when a user holds multiple passes or tickets.

Example Request:

curl --request POST \
     --url https://api.trybadge.com/v0/rpc/userPassUpsert \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "user": {
    "id": "123456789012",
    "email": "jane@mail.com",
    "attributes": {
      "memberBalance": "1000"
    }
  },
  "pass": {
    "id": "00000000001",
    "attributes": {
      "ticketNumber": "ABC123",
      "ticketExpiration": "New Value"
    }
  },
  "passTemplateId": "a84f890a-2478-925f-38ba-673e833e526c"
}
'


Step 4: Send Push Notifications to Passholders

Once a user installs a pass, they become a passholder—and you can engage them directly with lock screen push notifications.

Use the passSendPushNotification endpoint to programmatically trigger a message to a specific pass. You’ll need the pass.id used during issuance via userPassUpsert, so be sure to track that ID in your system.

Notification targeting (e.g. “only VIP passes” or “all expiring today”) is managed on your side. Badge delivers the message to the right pass on the right device.

Pro Tip: Update + Notify in One Call

To replicate the workflow available in the Badge Workspace Campaigns feature, you’ll need to make two separate API calls: one to userPassUpsert to update the pass, and a second to passSendPushNotification to trigger the push alert. This ensures the pass content is updated and the user is notified—without needing to reissue the pass.


Why Developers Choose Badge API

Badge was built with developers in mind. From your first digital wallet API call to full-scale deployment, the platform is designed to help you move fast, stay flexible, and build mobile wallet experiences without unnecessary complexity.

What sets Badge apart:

  • Fast, developer-first setup: Get started quickly with a well-documented REST API, real-world code samples, and prebuilt SDKs. Most teams launch their first pass in a single sprint—no complex environments or hidden dependencies.

  • Flexible pass design: Customize every element of your mobile wallet pass, from branding and layout to real-time content. Whether you're managing loyalty, ticketing, or promotions, you control the structure and data through the API.

  • No app required: Badge eliminates the need for a native app. Customers add passes directly to Apple Wallet or Google Wallet via smart links—no downloads, logins, or dev cycles required.

  • Real-time updates: Passes update instantly when triggered by your backend. Change offers, refresh loyalty points, or adjust event info—without reissuing or requiring new user action.

  • Developer support that understands devs: Badge’s technical support team is fluent in code and knows mobile wallet infrastructure inside and out. You won’t get generic answers—you’ll get solutions that make sense for your stack.


Ready to Build With Badge?

Skip the SDK sprawl and bloated integrations. With Badge, you can launch mobile wallet passes in minutes—not weeks. Whether you're looking to add loyalty, promotions, or ticketing to Apple Wallet and Google Wallet, Badge gives you full control with clean APIs and clear documentation.

Dive into the Badge API docs to get started
or
Talk to our team to see how it fits into your stack

Start building in minutes

Building in mobile wallets has never been easier. Try it for free.

Send users in-wallet campaigns

Send passes to users' wallets

Build passes

Sign up to get a workspace

Start building in minutes

Building in mobile wallets has never been easier. Try it for free.

Start building in minutes

Building in mobile wallets has never been easier. Try it for free.

Send users in-wallet campaigns

Send passes to users' wallets

Build passes

Sign up to get a workspace

Pages

Solutions

Company

Developers

© 2025 Badge. All rights reserved.

Pages

Solutions

Company

Developers

© 2025 Badge. All rights reserved.

Pages

Solutions

Company

Developers

© 2025 Badge. All rights reserved.