Skip to content

jkampich1411/PassesApi

Repository files navigation

PassesApi

This is a utility package to create Google Wallet passes.

Passes Available:

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!

Quick Start Tutorial

  1. 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

  2. Setup the Github NPM registry and install this package. Tutorial

  3. Setup a Google Cloud Project and enable it for use with Google Wallet. Complete Steps 1. to 4. from this guide!

  4. Move the service-account file to your project directory! PLEASE KEEP THIS FILE SECURE! DO NOT PUBLISH IT ANYWHERE!

  5. 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);
  1. Now you can use any class! Just pass the SETUP variable to any class!

About

Utility Package to create Google Wallet Passes

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published