WALLET PASS API enables you to issue mobile wallet passes for Apple Wallet, Google Pay and integrate them into your app or cloud system.
Your passes for Apple Wallet must be cryptographically signed with a certificate from your Apple Developer Account. To obtain your pass signing certificate follow the following:
- Access your Apple Developer account.
- In Certificates, Identifiers & Profiles, select Identifiers.
- Under Identifiers, select Pass Type IDs.
- Select the pass type identifier, then click Edit. If there is a certificate listed under Production Certificates, click the Download button next to it. If there are no certificates listed, click the Create Certificate button, then follow the instructions to create a pass signing certificate.
- You can get CSR from
/certificates/csr
endpoint. - Upload obtained certificate to /certificates/upload endpoint.
- API version: 1.0
PHP 7.2 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/setemares/walletpass-php.git"
}
],
"require": {
"setemares/walletpass-php": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/walletpass-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use WalletPassJP\Configuration;
use WalletPassJP\Client;
$key = 'YOUR_API_KEY';
$config = (new Configuration())->setEndpoint('https://walletpass.jp/api/v1');
$apiInstance = new Client(
$key,
// config is optional
$config,
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$asset_id = 'asset id';
try {
$result = $apiInstance->assets()->show($asset_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->show: ', $e->getMessage(), PHP_EOL;
}
$limit = 15; // int | Records imit
$page = 1; // int | Page number
$tags = []; // string[] | Filter by tags
try {
$result = $apiInstance->assets()->list($limit, $page, $tags);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->list: ', $e->getMessage(), PHP_EOL;
}
$asset_id = 'asset id'; // Asset ID
$body = new \WalletPassJP\Model\Body1(); // \WalletPassJP\Model\Body1 |
try {
$apiInstance->assets()->update($asset_id, $body);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->update: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://walletpass.jp/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AssetsApi | deleteAsset | DELETE /assets/{asset} | Delete Asset |
AssetsApi | getAssetByID | GET /assets/{asset} | Get Asset by ID |
AssetsApi | listAssets | GET /assets | Get all assets |
AssetsApi | updateAsset | PATCH /assets/{asset} | Update Asset |
AssetsApi | uploadAsset | POST /assets | Upload an asset |
ProjectsApi | createProject | POST /projects | Create new Project |
ProjectsApi | deleteProject | DELETE /projects/{project} | Delete Project |
ProjectsApi | getProjectByID | GET /projects/{project} | Get Project |
ProjectsApi | listProjects | GET /projects | Get a list of created Projects |
ProjectsApi | updateProject | PATCH /projects/{project} | Update Project |
CertificatesApi | deleteCertificate | DELETE /certificates/{certificate} | Delete certificate |
CertificatesApi | getCSR | GET /certificates/csr | Get CSR |
CertificatesApi | getCertificateByID | GET /certificates/{certificate} | Get certificate by ID |
CertificatesApi | listCertificates | GET /certificates | Get all certificates |
CertificatesApi | updateCertificate | PATCH /certificates/{certificate} | Update Certificate |
CertificatesApi | uploadCertificate | POST /certificates/upload | Upload Certificate |
CertificatesApi | uploadP12Certificate | POST /certificates | Upload new certificate |
MessagesApi | createMessage | POST /messages | Create a Message |
MessagesApi | listMessages | GET /messages | Get all messages |
PassesApi | createPass | POST /templates/{template}/passes | Create pass |
PassesApi | deletePass | DELETE /passes/{pass} | Delete pass |
PassesApi | getPassApple | GET /passes/{pass}/pkpass | Get pass in pkpass format |
PassesApi | getPassByExtID | GET /passes/external/{externalID} | Get pass by external ID |
PassesApi | getPassByID | GET /passes/{pass} | Get pass |
PassesApi | getPassGoogle | GET /passes/{pass}/gpay | Get pass Google Play installation link |
PassesApi | getPassLink | GET /passes/{pass}/link | Get pass download link |
PassesApi | listTemplatePasses | GET /templates/{template}/passes | Get all template passes |
PassesApi | updatePass | PATCH /passes/{pass} | Update pass |
TagsApi | deleteTag | DELETE /tags/{tag} | Delete tag |
TagsApi | getTagModels | GET /tags/{tag} | Get associated models |
TagsApi | listTags | GET /tags | Your GET endpoint |
TemplatesApi | copyTemplate | POST /templates/{template} | Copy template |
TemplatesApi | createPass | POST /templates/{template}/passes | Create pass |
TemplatesApi | createTemplate | POST /templates | Create template |
TemplatesApi | deleteTemplate | DELETE /templates/{template} | Delete template |
TemplatesApi | getTemplateByID | GET /templates/{template} | Get template |
TemplatesApi | getTemplateFields | GET /templates/{template}/fields | Get all template fields |
TemplatesApi | listTemplatePasses | GET /templates/{template}/passes | Get all template passes |
TemplatesApi | listTemplates | GET /templates | Get all templates |
TemplatesApi | updateTemplate | PATCH /templates/{template} | Update template |
- Asset
- BarcodeSettings
- Beacon
- Project
- ProjectRequest
- ProjectTemplates
- Certificate
- CertificateRequest
- Colors
- Error
- Link
- Location
- Message
- MessagesLocalizedBody
- MessagesLocalizedHeader
- PaginationMeta
- Pass
- PassField
- PassRequest
- PassRequestFields
- SettingsCoupon
- SettingsGiftCard
- SettingsMembership
- SettingsStampCard
- Template
- TemplateExpirySettings
- TemplateGooglePayApps
- TemplateRequest
- TemplateRequestBeacons
- TemplateRequestLinks
- TemplateRequestLocations
- WalletPassMetaInformation
- Type: HTTP bearer authentication