The PassKit Golang SDK makes it quick and easy to create and install your branded membership passes for Apple Wallet and Google Pay.
This repository has following structure with each purpose.
certs
folder is a place to store your credential files.examples
folder contains SDK methods you can use to create membership cards and engage with members.
- Installation
- Prerequisites
- Quickstart
- Examples
- GUI Tool
- Documentation
- Check Other Passes
- Getting Help
- License
Install passkit-io-go with:
go get -u github.com/PassKit/passkit-golang-sdk
Then, import SDK with:
import(
"github.com/PassKit/passkit-golang-sdk/io/members"
"github.com/PassKit/passkit-golang-sdk/io"
)
-
Create a PassKit account. Sign up for free HERE.
-
Generate & Download your SDK credentials by clicking the 'GENERATE NEW SDK CREDENTIALS' button from the Developer Tools page in the portal.
By completing this Quickstart, you will be able to issue a membership card for a new member.
-
Ensure your followed the steps in prerequisites.
-
Install PassKit Golang SDK with:
go get -u github.com/PassKit/passkit-golang-sdk
-
Place your SDK credential files (
certificate.pem
,key.pem
andca-chain.pem
) in the certs folder in this repoo. The SDK uses these .pem files to authenticate against the PassKit server. -
Now we need to decrypt your
key.pem
. At your project root directory, runcd ./certs openssl ec -in key.pem -out key.pem
. Yourkey.pem
file should look like below. If you do not seeProc-Type: 4,ENCEYPTED
on line 2, you have successfully decryptedkey.pem
. -
Replace
YOUR_EMAIL_ADDRESS@EMAIL.COM
inmain.go
with your email address in order to receive the welcome email with card url which your member will also receive. -
Go back to root directory with
cd ../..
. Then rungo run main.go
to create a sample program (with default template & tier) and issue a membership card against that.
Follow the steps of the Quickstart to create a sample membership card and experience it in your Mobile Wallet.
EngageWithMembers()
contains multiple methods you can use to engage with your members.
For example, you can update contents of digital membership card or send a push notification.
GUI tool can be accessed from your PassKit account.
- Coupons (coming soon)
- Flight Ticket (coming soon)
- Email support@passkit.com
- Online chat support
Distributed under MIT License. Details available on license file.