TapSenior Network API v1

Professional Guide for Integrating TapSenior Family+ Card APIs

This guide explains how approved TapSenior Network partners can connect their own systems to TapSenior for partner verification, Family+ card creation, card validation, points earning, points redemption, commission tracking, customer lookup, directory search, and payout requests.

Base URL

https://YOUR-DOMAIN.com/wp-json/tapsenior/v1

Authentication Header

X-TapSenior-API-Key: YOUR_API_KEY

Point rule: Customers earn 1 point for every $1 spent. Redemption value is 200 points = $5 credit, which means 40 points = $1 credit.

Table of Contents

Authentication

Every API request must include the partner API key. The API key is created by TapSenior admin inside WordPress under TapSenior API. Each key is linked to one partner account.

curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/partner/verify" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"

You may also send the key as a bearer token:

Authorization: Bearer YOUR_API_KEY

Partner Verification API

GET /partner/verify

This endpoint allows a business system to confirm whether the connected business is a valid TapSenior Network Partner.

Parameter Required Description
partner_id No Optional. If omitted, the API uses the partner linked to the API key.
curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/partner/verify" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"
{
  "success": true,
  "partner": {
    "partner_id": 123,
    "brand_name": "Maple Home Care",
    "category": "Home Care",
    "city": "Calgary",
    "province": "AB",
    "verified": true,
    "payment_status": "paid"
  }
}

Family+ Card Validation API

POST /cards/validate

Use this endpoint when a customer presents a TapSenior Family+ Card. The partner system can check card status, member details, available points, and available credit.

Parameter Required Description
card_id or card_code Yes* TapSenior Family+ card number, such as TS12345.
email Yes* Can be used instead of card_id.

*Send either card_id/card_code or email.

curl -X POST "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/cards/validate" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"card_id":"TS12345"}'
{
  "success": true,
  "card": {
    "card_id": "TS12345",
    "full_name": "John Smith",
    "status": "active",
    "available_points": 1200,
    "available_credit": 30,
    "redeem_rule": "200 points = $5 credit"
  }
}

Create TapSenior Family+ Card API

POST /cards/create

This endpoint allows a verified partner to create a TapSenior Family+ Card for a senior customer directly from the partner’s own system.

Parameter Required Description
full_name Yes Customer full name.
email Yes Customer email. Used to prevent duplicate cards.
phone, address, city, province, postal_code No Optional customer details.
curl -X POST "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/cards/create" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "full_name":"Mary Johnson",
    "email":"mary@example.com",
    "phone":"4035551234",
    "city":"Calgary",
    "province":"AB"
  }'
{
  "success": true,
  "created": true,
  "card": {
    "card_id": "TS45821",
    "full_name": "Mary Johnson",
    "status": "active"
  },
  "pin_code": "123456"
}
Important: The PIN is returned only at creation time. Store or deliver it securely.

Points Earn API

POST /points/earn

Use this endpoint after a senior customer completes a purchase. TapSenior records points based on the rule: $1 spent = 1 point.

Parameter Required Description
card_id/card_code or email Yes Customer card identifier.
invoice_number or external_transaction_id Yes Unique transaction reference. Prevents duplicates.
invoice_amount Yes Purchase amount before points are calculated.
service_brand No Default is TapSenior.
curl -X POST "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/points/earn" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card_id":"TS12345",
    "invoice_number":"INV-1001",
    "invoice_amount":150,
    "service_brand":"TapSenior"
  }'
{
  "success": true,
  "points_added": 150,
  "card": {
    "available_points": 1350,
    "available_credit": 33
  }
}

Points Redeem API

POST /points/redeem

Use this endpoint when a customer uses TapSenior Family+ points to receive credit or benefits from a partner business. The API checks available points, records the redemption, and creates commission tracking.

Parameter Required Description
card_id/card_code or email Yes Customer card identifier.
invoice_number or external_transaction_id Yes Unique transaction reference.
redeem_amount Yes Dollar credit the customer wants to redeem.
system_commission No Commission amount to split under TapSenior rules.
gift_amount No Optional amount that gives additional points.
note No Internal note.
curl -X POST "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/points/redeem" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card_id":"TS12345",
    "invoice_number":"INV-1002",
    "redeem_amount":5,
    "system_commission":10,
    "note":"Redeemed at partner location"
  }'
{
  "success": true,
  "redeemed": true,
  "points_used": 200,
  "commission": {
    "commission_rule": "partner_a_60_tapsenior_40",
    "partner_a_commission": 6,
    "admin_commission": 4
  }
}
Commission rule: when a card issued by Partner A is used at Partner B, Partner A receives 60% of the system commission and TapSenior receives 40%.

Transaction History API

GET /transactions

This endpoint returns redemption and commission-related transactions where the authenticated partner is either the service partner or the card-issuing partner.

Parameter Required Description
limit No Default 50, maximum 200.
curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/transactions?limit=50" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"

Commission Tracking API

GET /commission

This endpoint shows the partner’s commission wallet and commission history earned from cards issued by that partner.

curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/commission" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"
{
  "success": true,
  "wallet": {
    "earned_commission": 320,
    "pending_withdrawal": 0,
    "paid_commission": 100,
    "available_commission": 220,
    "minimum_withdrawal": 100,
    "can_request_withdrawal": true
  },
  "history": []
}

Customer Lookup API

GET /customers/lookup

Use this endpoint to find a TapSenior Family+ customer by card number, email, or phone.

Parameter Required Description
card_id/card_code No Card number.
email No Customer email.
phone No Customer phone.
curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/customers/lookup?email=mary@example.com" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"

Partner Directory API

GET /directory

This endpoint allows websites, apps, or partner systems to display TapSenior Network partners by search keyword, city, category, and verification status.

Parameter Required Description
q No Search keyword.
city No City filter.
category No Service/product category.
verified_only No true or false.
limit No Default 50, maximum 100.
curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/directory?city=Toronto&category=Senior%20Transportation&verified_only=true" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"

Payout API

GET /payout

Returns commission wallet and withdrawal history for the authenticated partner.

curl -X GET "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/payout" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY"

POST /payout/request

Creates a withdrawal request. The minimum withdrawal amount is $100.

Parameter Required Description
amount No If omitted, the API requests the full available commission.
payment_note No Payment instructions, e-transfer email, bank note, or admin note.
curl -X POST "https://YOUR-DOMAIN.com/wp-json/tapsenior/v1/payout/request" \
  -H "X-TapSenior-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount":150,
    "payment_note":"Please send by e-transfer to partner@example.com"
  }'

Common Errors

Error Code Meaning How to Fix
missing_api_key No API key was sent. Add X-TapSenior-API-Key header.
invalid_api_key The API key is wrong or revoked. Create a new key in TapSenior API admin.
rate_limited Too many requests in one minute. Wait and reduce request frequency.
partner_not_verified Partner is not verified. Verify the partner in TapSenior admin.
card_not_found Card does not exist. Check card number or customer email.
card_inactive Card exists but is not active. Activate the card before using it.
duplicate_transaction Invoice/transaction was already recorded. Use a unique invoice number.
insufficient_points Customer does not have enough points. Reduce redeem amount or earn more points first.
below_minimum Payout request below $100. Wait until available commission reaches $100.

Recommended Integration Flow

For a new customer: Create card → Validate card → Earn points after purchase.

For an existing customer: Lookup/validate card → Earn points or redeem points → Review transaction/commission.

For partner finance: Check commission wallet → Request payout when available commission is at least $100.