This is a utility package to create Google Wallet passes.
Pass Type | Supported | Reason |
---|---|---|
Gift Cards | ❌ | Coming soon! |
Loyality Cards | ❌ | Coming soon! |
Offers | ❌ | Coming soon! |
In-store Payments | ❌ | NDA required |
Boarding Passes | ✔️ | --- |
Event Tickets | ❌ | Coming soon! |
Closed-Loop and Open-Loop Transit | ❌ | NDA required |
Transit passes | ❌ | Part coming soon! |
Generic Pass | ✔️ | Open Beta! Report bugs under issues tab! |
-
First, you need to setup a Google Wallet issuer account You can either setup a temporary issuer account using this service or sign up in the Google Pay Business Console
-
Setup the Github NPM registry and install this package. Tutorial
-
Setup a Google Cloud Project and enable it for use with Google Wallet. Complete Steps 1. to 4. from this guide!
-
Move the service-account file to your project directory! PLEASE KEEP THIS FILE SECURE! DO NOT PUBLISH IT ANYWHERE!
-
Setup the library: (This example uses TypeScript)
import {Setup, <any package you need>} from '@jkampich1411/passesapi';
import * as fs from 'fs';
const ISSUER_ID = '<your Issuer ID>';
const CREDENTIALS = JSON.parse(
fs.readFileSync('<path-to-your-service-account>.json')
);
const SETUP = new Setup(CREDENTIALS, ISSUER_ID);
- Now you can use any class! Just pass the
SETUP
variable to any class!