---
llm-context: developer-guide
category: core-concepts
title: Issuing PassFlow Mobile Passes for Apple/Google Wallet
difficulty: intermediate
time: 8 minutes
format: markdown
updated: 
---


# Issuing PassFlow Mobile Passes for Apple/Google Wallet

This guide focuses on the complete workflow for issuing PassFlow mobile passes that can be added to Apple Wallet and Google Wallet for NFC-based access.

## What is PassFlow?

PassFlow is DoorFlow&#39;s native service for managing digital credentials that work with Apple Wallet and Google Wallet. PassFlow supports:

- **NFC technology** - Tap phone to reader (Apple VAS and Google SmartTap)
- **Barcode/QR codes** - Visual scanning
- **Multiple pass types** - Access cards, membership cards, event tickets, etc.

## Pass Types Supported

PassFlow can issue various types of digital passes:

**Access &amp; Membership:**
- Corporate access passes
- Membership cards
- School ID cards
- Hotel room keys

**Events &amp; Travel:**
- Event tickets
- Boarding passes
- Airline tickets

**Retail:**
- Loyalty cards
- Coupons

## Key Principles

### User Consent is Required

Unlike some credential systems, PassFlow passes **cannot be added silently**:

- Person must always approve &quot;Add to Wallet&quot;
- User explicitly accepts the pass
- Consistent with Apple and Google wallet security policies

### Apple Wallet Limitations

**Important:** Apple passes cannot be remotely removed from Apple Wallet:

- User must manually remove pass from their wallet
- Deleting the credential in DoorFlow prevents future access but doesn&#39;t remove the pass from the device
- This is an Apple Wallet platform limitation, not a DoorFlow limitation

**What happens when you delete a PassFlow credential in DoorFlow:**
- Access is immediately revoked at doors
- Pass appears in wallet but won&#39;t grant access
- User should manually remove pass from wallet

### Google Wallet Behavior

Google SmartTap passes can be remotely revoked:
- Deleting credential in DoorFlow removes pass from Google Wallet
- More seamless cleanup than Apple

## Pass Distribution Methods

### Method 1: Email Invitation

DoorFlow automatically emails the pass invitation to the person.

**When to use:**
- Simple, hands-off implementation
- You don&#39;t need to customize invitation messaging
- Person already exists in DoorFlow with email address

**How it works:**
1. Create PassFlow credential via API
2. DoorFlow sends email with &quot;Add to Wallet&quot; link
3. Person clicks link and approves adding pass
4. Pass provisions to Apple Wallet or Google Wallet
5. Access granted at physical readers

### Method 2: Your App with Invitation Code

You retrieve the invitation details and present them in your own app.

**When to use:**
- Custom invitation experience
- Integration with existing mobile app
- In-app pass management
- White-label experience

**How it works:**
1. Create PassFlow credential via API
2. Retrieve pass invitation URL from credential
3. Display &quot;Add to Wallet&quot; button in your app
4. Person taps button, approves adding pass
5. Pass provisions to their wallet
6. Access granted at physical readers

## Sequence Diagram

This diagram shows pass issuance triggered from either the DoorFlow UI or via API:

```mermaid
sequenceDiagram
    participant Admin as DoorFlow Admin User
    participant ClientApp as Client App
    participant DoorFlow as DoorFlow
    participant Wallet as Apple/Google Wallet
    participant Person as Person

    Note over Admin,Person: 1. Request PassFlow Pass for Person

    alt Request via DoorFlow UI
        Admin-&gt;&gt;DoorFlow: Request via website
    else Request via API
        ClientApp-&gt;&gt;DoorFlow: Request via API
    end

    DoorFlow-&gt;&gt;Admin: Return credential_id with status &#39;invited&#39;

    DoorFlow-&gt;&gt;DoorFlow: 2. Generate wallet pass

    Note over ClientApp,Person: 3. Pass invitation sent via email or API

    alt Configured at DoorFlow account level
        DoorFlow-&gt;&gt;Person: Send &quot;Add to Wallet&quot; link via Email
    else Developer handles delivery
        ClientApp-&gt;&gt;DoorFlow: Request details for credential_id
        DoorFlow--&gt;&gt;ClientApp: Return wallet pass URL
        ClientApp-&gt;&gt;Person: Display &quot;Add to Wallet&quot; button
    end

    Note over Person: 4. Person accepts pass

    Person-&gt;&gt;Wallet: Tap &quot;Add to Apple/Google Wallet&quot;
    Wallet-&gt;&gt;Person: Request user approval
    Person-&gt;&gt;Wallet: Approve

    Wallet-&gt;&gt;DoorFlow: Confirm pass added
    DoorFlow-&gt;&gt;ClientApp: Webhook: credential status changed to &#39;active&#39;

    DoorFlow-&gt;&gt;DoorFlow: Sync credential with access readers

    Note over Admin,Person: 5. Remove PassFlow credential

    alt Remove via DoorFlow UI
        Admin-&gt;&gt;DoorFlow: Remove PassFlow credential
    else Remove via API
        ClientApp-&gt;&gt;DoorFlow: Request via API
    end

    DoorFlow-&gt;&gt;Wallet: Revoke credential (Google only)

    alt Google Wallet
        Wallet-&gt;&gt;Person: Pass removed automatically
    else Apple Wallet
        Note over Person: Pass remains in wallet&lt;br/&gt;but won&#39;t grant access
    end

    DoorFlow-&gt;&gt;ClientApp: Webhook: credential status &#39;revoked&#39;
```

## Implementation

### Method 1: Email Invitation

**Step 1: Create person with email**

```bash
POST /api/3/people
{
  &quot;person&quot;: {
    &quot;first_name&quot;: &quot;Alex&quot;,
    &quot;last_name&quot;: &quot;Chen&quot;,
    &quot;email&quot;: &quot;alex@example.com&quot;,
    &quot;enabled&quot;: true
  }
}
```

**Step 2: Create PassFlow credential**

```bash
POST /api/3/people/{person_id}/credentials
{
  &quot;person_credential&quot;: {
    &quot;credential_type_id&quot;: 9,
    &quot;enabled&quot;: true
  }
}
```

**Response:**
```json
{
  &quot;id&quot;: &quot;cred_pf123&quot;,
  &quot;credential_type_id&quot;: 9,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;enabled&quot;: true,
  &quot;person_id&quot;: 12345,
  &quot;created_at&quot;: &quot;2024-01-15T14:25:00Z&quot;
}
```

**Step 3: DoorFlow automatically emails invitation**

Person receives email with &quot;Add to Apple Wallet&quot; or &quot;Add to Google Wallet&quot; button. No additional work required.

### Method 2: Your App Handles Delivery

**Step 1: Create person**

```bash
POST /api/3/people
{
  &quot;person&quot;: {
    &quot;first_name&quot;: &quot;Alex&quot;,
    &quot;last_name&quot;: &quot;Chen&quot;,
    &quot;enabled&quot;: true
  }
}
```

**Step 2: Create PassFlow credential**

```bash
POST /api/3/people/{person_id}/credentials
{
  &quot;person_credential&quot;: {
    &quot;credential_type_id&quot;: 9
  }
}
```

**Step 3: Retrieve pass details**

```bash
GET /api/3/credentials/{credential_id}
```

**Response:**
```json
{
  &quot;id&quot;: &quot;cred_pf123&quot;,
  &quot;credential_type_id&quot;: 9,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;wallet_pass_url&quot;: &quot;https://redeem.doorflow.com/passes/abc123&quot;,
  &quot;person_id&quot;: 12345
}
```

**Step 4: Present &quot;Add to Wallet&quot; in your app**

**iOS (Apple Wallet):**
```swift
// Display Apple Wallet button
let passURL = URL(string: &quot;https://redeem.doorflow.com/passes/abc123&quot;)!
// Use PKAddPassButton or custom UI
```

**Android (Google Wallet):**
```kotlin
// Display Google Wallet button
val passUrl = &quot;https://redeem.doorflow.com/passes/abc123&quot;
// Use Google Wallet button or custom UI
```

**Web:**
```html
&lt;a href=&quot;https://redeem.doorflow.com/passes/abc123&quot;&gt;
  &lt;img src=&quot;add-to-apple-redeem.svg&quot; alt=&quot;Add to Apple Wallet&quot;&gt;
&lt;/a&gt;
```

## Credential Status Lifecycle

PassFlow credentials go through these statuses:

1. **pending** - Pass created, waiting for person to add to wallet
2. **active** - Person added pass to wallet, credential working
3. **revoked** - Credential removed from DoorFlow, access denied

## Apple VAS Limitations

**Apple Value Added Services (VAS) passes have restrictions:**

- **Limited use cases:** Primarily for sports clubs, gyms, membership organizations
- **Not for general corporate access:** Apple restricts VAS usage
- **Approval required:** Your use case must be approved by Apple

**If your use case doesn&#39;t fit Apple VAS restrictions:**
- Consider HID Mobile Access instead (works with Apple)
- Use PassFlow for Google Wallet (Android users)
- Provide backup credentials (card or PIN)

## Best Practices

### Provide Backup Credentials

Not all users can use mobile passes:

```bash
# Issue PassFlow credential (primary)
POST /api/3/people/12345/credentials
{
  &quot;credential_type_id&quot;: 9,
  &quot;enabled&quot;: true
}

# Issue PIN (backup)
POST /api/3/people/12345/credentials
{
  &quot;credential_type_id&quot;: 6,
  &quot;value&quot;: &quot;******&quot;
}
```

### Monitor Pass Acceptance

Don&#39;t assume pass was added to wallet:

```bash
# Check credential status
GET /api/3/credentials/{credential_id}
```

### Test on Both Platforms

PassFlow works differently on iOS vs Android:

**Test checklist:**
- [ ] Pass adds successfully to Apple Wallet
- [ ] Pass adds successfully to Google Wallet
- [ ] NFC tap works on readers (both platforms)
- [ ] Pass displays correctly (branding, colors)
- [ ] Pass removal works (auto on Android, manual on iOS)
- [ ] Backup credentials work when phone is unavailable

### Educate Users

Users need guidance on:
- How to add pass to their wallet
- How to use pass at readers (tap phone)
- What to do if pass doesn&#39;t work (use backup PIN)
- How to remove pass when no longer needed (Apple users)

## Troubleshooting

**Q: Pass stuck in &#39;pending&#39; status**

Person hasn&#39;t added pass to wallet yet. Check:
- Did they receive the invitation?
- Do they know how to add passes to their wallet?
- Is wallet app installed and working?
- Try resending invitation

**Q: Pass added to wallet but not working at readers**

Check these common issues:

1. **Credential not synced to readers**
   - Wait a few minutes for sync
   - Check reader is online

2. **Person lacks group membership**
   ```bash
   GET /api/3/people/{person_id}
   # Check group_ids includes appropriate groups
   ```

3. **Person is disabled**
   ```bash
   GET /api/3/people/{person_id}
   # Check &quot;enabled&quot;: true
   ```

4. **Reader doesn&#39;t support NFC**
   - Verify reader has NFC capability
   - Check reader is configured for PassFlow

5. **Phone NFC is disabled**
   - User must enable NFC in phone settings
   - Test with another NFC-enabled app

**Q: How do I update pass information (name)?**

Once you update the person&#39;s name in DoorFlow it will be passed on to the pass using push notifications automatically.

**Q: Can a person have PassFlow pass on multiple wallets?**

No. A PassFlow pass can only appear in one redeem. Once the pass has been activated within a wallet the pass invitation will no longer allow the pass to be added to another redeem.

## Security Considerations

### Pass URLs are Sensitive

Wallet pass URLs should be treated securely:

- Anyone with URL can add pass to their wallet
- Use HTTPS for all pass delivery
- Consider URL expiration if implementing custom delivery
- Don&#39;t log pass URLs in plain text

### Prevent Unauthorized Pass Sharing

Educate users not to share &quot;Add to Wallet&quot; links:
- Passes should only be added to the authorized person&#39;s device
- Sharing pass URLs could grant unauthorized access
- Monitor for multiple passes added from same invitation

## Comparison: PassFlow vs HID Mobile Access

| Feature | PassFlow | HID Mobile Access |
|---------|----------|-------------------|
| **Wallet integration** | Apple Wallet, Google Wallet | HID Mobile Access app |
| **User experience** | Native wallet app | Dedicated HID app |
| **Setup complexity** | Simpler | More complex |
| **Apple support** | Limited (VAS restrictions) | Full support |
| **Android support** | Full support | Full support |
| **Remote revocation** | Partial (Android only) | Full (both platforms) |
| **Best for** | Android-focused, simple deployments | Full mobile credential control |

**When to choose PassFlow:**
- Android-heavy user base
- Want native wallet integration
- Simple deployment requirements
- Don&#39;t need granular credential control

**When to choose HID Mobile Access:**
- Need Apple support without VAS restrictions
- Enterprise-grade credential management
- Full remote revocation capabilities
- Already using HID infrastructure

## Quick Reference

**Create PassFlow credential:**
```bash
POST /api/3/people/{person_id}/credentials
Body: {
  &quot;credential_type_id&quot;: 9
}
```

**Retrieve wallet pass URL:**
```bash
GET /api/3/credentials/{credential_id}
# Returns: { &quot;wallet_pass_url&quot;: &quot;https://redeem.doorflow.com/passes/abc123&quot; }
```

**Check credential status:**
```bash
GET /api/3/credentials/{credential_id}
# Returns: { &quot;status&quot;: &quot;invited|active|revoking|revoked|added_to_wallet&quot; }
```

**Revoke credential:**
```bash
DELETE /api/3/credentials/{credential_id}
```

**Required OAuth scope:** `account.person`

