circle-exclamation
This documentation is currently under development. Certain sections are not yet complete and will be added shortly.

How to Create Passes via API in The Wallet Crew

Create Apple Wallet and Google Wallet passes with The Wallet Crew API, then retrieve an “Add to Wallet” link for your customers.

This guide shows how to create wallet passes from your own systems (CRM, e-commerce, ticketing, POS, or backend). You will configure a pass template, call the API to create a pass, then retrieve a link your customers can open to install it.

chevron-rightReal-world exampleshashtag
  • Create a loyalty card right after a signup form is completed.

  • Generate event tickets after payment confirmation, then update them for seat changes.

  • Create membership cards and update tier/expiry after each renewal.

Prerequisites

Before proceeding, ensure you have the following:

  1. The Wallet Crew Platform Activated: Your Wallet Crew account and platform should be active.

  2. API Key Generated: Generate an API key from The Wallet Crew admin console (API Key).

  3. Pass Type Template Configured: Create and configure a pass type template in The Wallet Crew Wallet.

  4. Variables Assigned: Assign variables in the pass type to match wallet fields in Apple and Google Wallet that will be populated via the API call.

circle-info

You’ll need two values at API call time: your tenantId (in the URL path) and your passType (template name).

Step-by-Step Guide

Step 1: Configure The Wallet Crew

  1. Create a Pass Type Template:

    • Navigate to the Pass Type sectionarrow-up-right{target="_blank"|title="Pass Type"} in the admin console.

    • Define a new pass type and configure fields as required.

  2. Define Variables:

    • Map variables to the pass type fields. These variables will be populated by the API calls.

These variables will be populated by the API calls.
  1. Generate an API Key:

Step 2: Access the API

  1. Connect to Swagger UI or Postman Collection:

  2. Authenticate Using the API Key:

    • Add the API key to the X-API-KEY header of your requests.

    • Click Authorize, then enter your API key (for example, in Swagger).

Step 2: Access the API

Step 3: Create a Pass via API

  1. Test the POST Method:

    • Endpoint: POST /api/{tenantId}/passes?passType={passType}

    • Required Parameters:

      • tenantId: Your tenant identifier (in the URL path).

      • passType: The template name you created (query parameter).

    • Request Body:

    • Select application/json format:

Step 3: Create a Pass via API
circle-info

For the complete request/response schema, see the Pass API referencearrow-up-right.

  • Example:

Step 3: Create a Pass via API (2)
  1. Successful Response:

    • You will receive a passId in the response. Example:

Successful Response

Step 4: View or Download the Pass

  1. Admin Console:

    • Go to the Wallet section and filter by passId to view, edit, or download the pass.

Admin Console
  1. Pass URL:

    • A common approach is to redirect users to a hosted view page: GET /api/{tenantId}/passes/{passId}/view.

    • Use the QR code to add the pass to Apple Wallet or Google Wallet.

Step 4: View or Download the Pass

Tips and Best Practices

  1. Examples for Different Pass Types:

    • Loyalty Card:

    • Event Ticket:

    • Coupon:

  2. Testing:

    • Always test API calls in a staging environment before going live.

    • Staging url: https://admin-qa.thewalletcrew.io/

  3. Error Handling:

    • Ensure proper handling of API errors, such as authentication failures or invalid parameters.

FAQ

chevron-rightShould I use Authorization or X-API-KEY?hashtag

Use X-API-KEY. This is the API key header used by The Wallet Crew API reference.

chevron-rightWhat is passType?hashtag

passType is the template name you created in The Wallet Crew. It controls design and which variables are available on the pass.

chevron-rightWhat should I store on my side?hashtag

Store the returned passId. It is the stable identifier you will use to retrieve, update, or notify the same pass later.

Conclusion

Creating passes via The Wallet Crew API enables seamless integration with third-party systems and enhances the user experience. By following this guide, you can configure The Wallet Crew, create and manage passes, and retrieve them efficiently. For more advanced use cases, explore additional articles in the Knowledge Base.

Last updated