1.1 status
Check the private key and account status.
{
"app_key": "private_key"
}{
"app": "account_name",
"balance": 980.00
}Passquare connects your product to Apple Wallet and Google Wallet. Issue passes, update them, and send push from one API.
One API for identity, pass state, push, and automation in Apple Wallet and Google Wallet.
Conceptual call
{
"phone": "+420000000001",
"balance": 1250,
"tier": "Gold"
}Passquare updates Apple Wallet and Google Wallet, shows the current status, can send a push, apply a segment, and fire a trigger. The customer sees it in Wallet.
Connect this server to an AI client: ChatGPT, Claude, Cursor, and others. The agent can find a customer, update the pass, create an offer, and send a push. The private key is in Settings → API in your dashboard.
{
"mcpServers": {
"Passquare": {
"type": "http",
"url": "https://mcp.passquare.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_PRIVATE_KEY"
}
}
}
}Create and update Wallet passes when data changes in your CRM, and read data from Passquare. Send app_key, the private key from Settings → API in your dashboard. Test with Postman.
Check the private key and account status.
{
"app_key": "private_key"
}{
"app": "account_name",
"balance": 980.00
}Create or update a customer in Passquare. The phone number is the key and uses E.164. You can also pass custom variables in the payload. template_uuid is in the address bar of the template.
{
"app_key": "private_key",
"name": "name",
"phone": "customer mobile phone",
"email": "email address",
"surname": "surname",
"middlename": "patronymic",
"birthday": "date of birth dd.mm.yyyy",
"discount": "discount percent",
"bonus": "bonus percent",
"balance": "bonus amount",
"card_track": "...",
"template_uuid": "...",
"customerId": "customer id in your CRM",
"link": "link to the pass issue form",
"sms": "Your card: %link%"
}To send a personalized install link, pass the form URL in link. In the SMS text, %link% is replaced with that URL.
{
"success": true,
"sms_send": true,
"card": true,
"card_number": "created card number",
"card_track": "created card track",
"card_url": "personalized Apple Wallet link",
"card_gpay_url": "personalized Google Wallet link",
"form_url": "personalized form link",
"user_hash": "hash for form personalization"
}{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"phone": "+420000000001",
"email": "joe@passquare.com",
"name": "Joe",
"surname": "Master",
"middlename": "Remaster",
"birthday": "11.11.1980",
"discount": 0,
"bonus": 3.50,
"balance": 100,
"link": "https://form.passquare.com/00000000-0000-0000-0000-000000000000",
"sms": "Your card: %link%"
}Your card: https://form.passquare.com/00000000-0000-0000-0000/?hash=2f10171a33f66f3bc425335690ec880cIf the template has a push bound to balance change, the customer also sees a lock-screen message.
{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"phone": "+420000000001",
"balance": 120
}{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"phone": "420000000001",
"push": "Your order is ready for pickup!"
}Requires a connected web push app from the Marketplace.
{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"phone": "+420000000001",
"send_webpush": "Your order is ready for pickup!"
}Get customer data by phone or card number. Phone numbers use E.164.
{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"phone": "",
"card": "",
"invites": true,
"installs": true
}{
"customer": {
"phone": "+420000000001",
"email": "joe@passquare.com",
"name": "Joe",
"surname": "Master",
"middlename": "Remaster",
"birthday": "11.11.1980",
"cardNumbers": ["120"],
"cardTracks": [{"card": "120", "track": "78374598987"}],
"cardInstalls": [{"card": "120", "install": true}],
"discount": 4.5,
"bonus": 0,
"balance": 0,
"template_uuid": "...",
"remoteId": "6326",
"invitedBy": "+420000000000",
"invites": ["+420000000011", "+420000000012"]
}
}List customers by registration date.
{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"start_date": "01.01.2020",
"end_date": "31.12.2020 23:59:59",
"installed": true,
"offset": 0
}installed is omitted, the method returns all customers.true: customers with an installed pass.false: customers without an installed pass.offset for the next page.{
"customers": ["+420000000011", "+420000000012"]
}Create a push campaign for the whole base or a segment. Type can be push or webpush. Web push needs a Marketplace app. After creating the campaign, send it with push/send. For a single customer push, use user_create_or_update. segment_uuid is in the address bar of the segment.
{
"app_key": "",
"message": "",
"type": "",
"name": "",
"segment_uuid": ""
}{
"result": {
"name": "Push#0000",
"uuid": "00000000-0000-0000-0000-000000000000",
"message": "Test push!"
}
}Run a push campaign. push_uuid is in the address bar of the campaign, or take it from the push/create response.
{
"app_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"push_uuid": "00000000-0000-0000-0000-000000000000"
}When a customer receives a Wallet pass, Passquare sends a hook to the HTTPS URL in your integration settings. Handle it and store the customer in your database. When balance or discount changes on your side, send a hook back: Passquare updates the pass and can send a push.
Auth: HTTP Basic or crm_key. For crm_key, put it in the password field and leave login empty. Headers: X-organization-id, X-program-id, X-wallet-id. You can also allowlist IP 164.90.200.81. For debugging use webhook.site.
Register a customer pass. Look up the customer by phone (E.164). If missing, create them and a card, return customerId. If they exist, update, add a card (or replace if your CRM is one-card), return customerId. Card numbers are issued by Passquare; set the start of a free range in integration settings.
{
"crm_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"method": "createCustomer",
"customer": {
"name": "Joe",
"surname": "Master",
"middlename": "Remaster",
"email": "joe@passquare.com",
"phone": "+420000000001",
"birthday": "1980-01-25",
"cardNumbers": ["120"],
"cardTracks": [{"card": "120", "track": "7862374687"}],
"extra": {
"gender": "male",
"promo": "BBBBB"
},
"balance": 300.00,
"bonus": 10.00,
"discount": 25.00,
"promo": "AAAAA",
"user_hash": "a4f8c9d3e6527b1acd07e8f4b6a9d2c3",
"referCustomerPhone": "+420000000002"
}
}Required response: customerId: unique customer id in your CRM.
{"customerId": "6d2845ff-0a07-11e7-25df-d8d18565926f"}{"error": "Detailed error description..."}Balance lookup for a manual refresh of bonuses and discount on the pass.
{
"crm_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"method": "readBalance",
"customer": {
"phone": "+420000000001",
"cardNumbers": ["120"]
}
}Return balance / bonus / discount for the customer identified by phone and card number.
{
"success": true,
"bonus": 12.5,
"balance": 5,
"discount": 17.88
}Hook to credit bonuses.
{
"crm_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"method": "addBalance",
"customer": {
"phone": "+420000000001",
"cardNumbers": ["120"],
"sum": 50.00,
"transactionId": "id/guid",
"lifetime": 14
}
}Credit the customer identified by phone and card number. If lifetime is passed, that credit expires after that many days (24h).
{
"success": true
}curl -d '{"app_key":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "phone":"+420000000001", "email":"joe@passquare.com", "name":"Joe", "surname":"Master", "middlename":"Remaster", "birthday":"03.05.1980", "discount":0, "bonus":5, "balance":200}' -H "Content-Type: application/json" -X POST https://core.passquare.com/api/v2/crm/user_create_or_update<?php
$url = 'https://core.passquare.com/api/v2/crm/user_create_or_update';
$post = [
'app_key' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'phone' => '+420000000001',
'email' => 'joe@passquare.com',
'name' => 'Joe',
'surname' => 'Master',
'middlename' => 'Remaster',
'birthday' => '03.05.1980',
'discount' => 0,
'bonus' => 4.5,
'balance' => 100
];
$data_string = json_encode($post);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_TIMEOUT => 30,
CURLOPT_POST => 1,
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_POSTFIELDS => $data_string,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Content-Length: '.strlen($data_string)
]
]);
echo curl_exec($ch);
?>