PHPackages                             w4s/w4s-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. w4s/w4s-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

w4s/w4s-php
===========

Developer Wallet4Sales By Salvador

v1.0.2(4y ago)031PHPPHP &gt;=7.0

Since Mar 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Wallet4Sales/W4S)[ Packagist](https://packagist.org/packages/w4s/w4s-php)[ Docs](https://www.wallet4sales.com/)[ RSS](/packages/w4s-w4s-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Wallet4Sales v1 SDK Quickstart
==============================

[](#wallet4sales-v1-sdk-quickstart)

**Quickstart for Wallet4Sales v1 [platform](https://www.wallet4sales.com/)**

Overview
--------

[](#overview)

This quickstart guide is designed for developers to run rapidly within the Wallet4Sales v1 environment using PHP. For further information please feel free to create a request or write to us at: .

Authentication
--------------

[](#authentication)

Our system uses an authentication process for each user account. You need to create your account before requesting your API\_KEY. Please click here to [create your account](https://www.wallet4sales.com/)

#### Get Your API Keys

[](#get-your-api-keys)

Log to your account, go to your user profile and click the button to request your API\_KEY. An email will be sent to the account you confirmed with your credentials. In case you cannot find a way to request your API\_KEY, you can write to us at  to request your credential and connect to our service.

### Composer

[](#composer)

The Wallet4Sales SDK uses composer to manage dependencies. Visit the composer documentation to learn how to install composer.

Go to the root of the project

```
cd [route]/Wallet4Sales
```

then install it through composer:

```
composer install

```

This SDK and its dependencies will be installed under `./vendor`.

Create a new Template
=====================

[](#create-a-new-template)

To create a new Template, you will need your API\_KEY to make a request to our system. This will be attached to the `Authorization header: Bearer {API_KEY}`.

```
require __DIR__.'/vendor/autoload.php';

use Wallet4SalesPHP\Wallet4Sales;

$data['BackgroundColor'] = "rgb(255,255,255)";
$data['ForegroundColor'] = "rgb(0, 0, 0)";
$data['LabelColor'] = "rgb(0, 0, 0)";
$data['OrganizationName'] = "Test";
$data['PassTypeIdentifier'] = "Change this";
$data['TeamIdentifier'] = "Change this";
$data['PassType'] = {PASS_TYPE_ID};
$data['CertificateID'] = {CERTIFICATE_ID};
$data['TemplateName'] = "{TEMPLATE_NAME}";
$data['Description'] = "A little description";
$data['Content'] = array(
  "Items" => array(
    "bodyHeader" => array(
      array(
        "label" => "String",
        "value" => "String",
        "LabelIsDinamic" => bool,
        "ValueIsDinamic" => bool,
        "ChangeMessage" => "string",
        "TextAlign" => "string"
      )
    )
  )
);

$data['Images']['strip'] = "IconCode or Url";

$API_KEY = '{Your API_KEY}';

$w4s = new Wallet4Sales();
$w4s->setAccesToken($API_KEY);
$Template = $w4s->CreateTemplate($data);
print_r($Template);
```

This template will be created in your administrator panel with a code useful for your next requests such as creating a campaign for your marketing action.

Table of contents for a Template
--------------------------------

[](#table-of-contents-for-a-template)

Key nameTypeDescripciónBackgroundColorcolor, as a stringRequired. Background color of the pass, specified as an CSS-style RGB triple. For example, rgb(23, 187, 82).ForegroundColorcolor, as a stringRequired. Foreground color of the pass, specified as a CSS-style RGB triple. For example, rgb(100, 10, 110).LabelColorcolor, as a stringRequired. Color of the label text, specified as a CSS-style RGB triple. For example, rgb(255, 255, 255).OrganizationNamestringRequired. Display name of the organization that originated and signed the pass.PassTypeIdentifierstringRequired. Pass type identifier, as issued by Apple. The value must correspond with your signing certificate.TeamIdentifierstringRequired. Team identifier of the organization that originated and signed the pass, as issued by Apple.PassTypeintegerRequired. EL ID del tipo de pase que se creará. Por ejemplo 2.CertificateIDintegerRequired. EL ID del Certificado que ha subido o del propio sistema.TemplateNamestringRequired. Nombre del template que se va a crear.Descriptionlocalizable stringRequired. Brief description of the pass, used by the iOS accessibility technologies. Don’t try to include all of the data on the pass in its description, just include enough detail to distinguish passes of the same type.ContentarrayRequired. Pass content due to theWallet4Sales documentation.ItemsarrayRequired. Items del pass due to Wallet4Sales documentation It can encompass the following values: `bodyHeader`, `bodyBack`, `bodyPrimary`, `bodySecondary`, `bodyAuxiliary`, `bodyBack`Upload a Certificate
====================

[](#upload-a-certificate)

To upload a certificate, you must download a CSR on our platform or request one following the instruction:

```
require __DIR__.'/vendor/autoload.php';

use Wallet4SalesPHP\Wallet4Sales;

$w4s = new Wallet4Sales();
$w4s->setAccesToken($API_KEY);

$CSR = $w4s->CreateCSR();
print_r($CSR);
```

The request send you back a signature request which must be uploaded to your [Apple Developer](https://developer.apple.com/) account to issue your certificate.

### Upload your Certificate (CER)

[](#upload-your-certificate-cer)

Once your certificate has been issued in your Apple Developers account, you can upload it to our system and it will return the CertificateID you need to create your `Template`.

```
require __DIR__.'/vendor/autoload.php';

use Wallet4SalesPHP\Wallet4Sales;

$cer = 'Certificates/pass.cer';
$json = array(
  "certificate" => base64_encode(file_get_contents($cer))
);

$w4s = new Wallet4Sales();
$w4s->setAccesToken($API_KEY);

$Certificate = json_decode($w4s->LoadCertificate($json),true);
print_r($Certificate);
```

Create Campaign
===============

[](#create-campaign)

A marketing campaign helps us distribute passes. It allows us create your taylor made marketing action towards your clients.

```
require __DIR__.'/vendor/autoload.php';

use Wallet4SalesPHP\Wallet4Sales;

$w4s = new Wallet4Sales();
$w4s->setAccesToken($API_KEY);

$data['Name'] = '{CAMPAIGN_NAME}';
$data['TemplateCode'] = '{TEMPLATE_CODE}';
$data['Description'] = '{DESCRIPTION}';

$Campaign = $w4s->CreateCampaign($data);
print_r($Campaign);
```

It will send you back the `CampaignCode` you need to create and distribute passes.

Create Pass
===========

[](#create-pass)

```
require __DIR__.'/vendor/autoload.php';

use Wallet4SalesPHP\Wallet4Sales;

$w4s = new Wallet4Sales();
$w4s->setAccesToken($API_KEY);

$Pass = $w4s->CreatePass('{CAMPAIGN_CODE}');
print_r($Pass);
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1578d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/87734697?v=4)[Apple Wallet](/maintainers/Wallet4Sales)[@Wallet4Sales](https://github.com/Wallet4Sales)

---

Top Contributors

[![geanpearre94-glitch](https://avatars.githubusercontent.com/u/239432717?v=4)](https://github.com/geanpearre94-glitch "geanpearre94-glitch (33 commits)")[![Wallet4Sales](https://avatars.githubusercontent.com/u/87734697?v=4)](https://github.com/Wallet4Sales "Wallet4Sales (25 commits)")

---

Tags

phpappleandroidiphonewalletiospassbookipad

### Embed Badge

![Health badge](/badges/w4s-w4s-php/health.svg)

```
[![Health](https://phpackages.com/badges/w4s-w4s-php/health.svg)](https://phpackages.com/packages/w4s-w4s-php)
```

###  Alternatives

[pkpass/pkpass

PHP PKPass class for iOS Wallet

9853.4M11](/packages/pkpass-pkpass)[eo/passbook

iOS Passbook for PHP

2681.6M3](/packages/eo-passbook)[thenextweb/passgenerator

A Laravel package to create Apple Wallet (old Passbook) compatible tickets.

302478.1k](/packages/thenextweb-passgenerator)[chiiya/laravel-passes

Laravel library for creating iOS and Android Wallet Passes

37114.8k](/packages/chiiya-laravel-passes)[byte5/laravel-passgenerator

A Laravel package to create Apple Wallet (old Passbook) compatible tickets.

9239.0k](/packages/byte5-laravel-passgenerator)[chiiya/passes

PHP library for creating iOS and Android Wallet Passes

70318.3k2](/packages/chiiya-passes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
