StayMe

Partner Merchant Earn API

Award StayMe loyalty points to your customers when they spend at your venue. Integrate in minutes with our simple REST API.

Base URL
https://staybook-quf2jwtmya-as.a.run.app/api/partner

Authentication

All API requests must include your API key in the request header. Contact StayMe admin to obtain your API key.

X-Partner-API-Key: your_api_key_here
GET /api/partner/check-member

Check Member

Verify that a customer is a StayMe member before processing a transaction. Returns the member's name, tier, and your applicable earn rate.

Query Parameters

Parameter Type Required Description
email string Yes Customer's email address

Example Request

curl -X GET "https://staybook-quf2jwtmya-as.a.run.app/api/partner/check-member?email=guest@example.com" \
     -H "X-Partner-API-Key: your_api_key_here" \
     -H "Accept: application/json"

Example Response (member found)

{
  "exists": true,
  "member_name": "Jane Smith",
  "tier": "Gold",
  "earn_rate": 2.0
}
POST /api/partner/earn

Award Points

Award loyalty points to a StayMe member for a spend at your merchant location. Points are calculated as: floor(spend_amount × earn_rate), optionally capped at your configured maximum.

Request Body (JSON)

Field Type Required Description
member_email string Yes Member's email address
spend_amount number Yes Amount spent in USD (e.g. 45.50)
transaction_ref string No Your unique transaction ID (prevents duplicates)
description string No Human-readable description shown to the member

Example Request

curl -X POST "https://staybook-quf2jwtmya-as.a.run.app/api/partner/earn" \
     -H "X-Partner-API-Key: your_api_key_here" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{
       "member_email": "guest@example.com",
       "spend_amount": 87.50,
       "transaction_ref": "TXREF-20260101-001",
       "description": "Dinner at The Grand Bistro"
     }'

Example Response

{
  "status": "success",
  "points_awarded": 175,
  "member_name": "Jane Smith",
  "new_balance": 2350
}

Error Codes

HTTP Status Meaning
401Missing or invalid API key
404Member email not found
409Duplicate transaction reference
422Validation error or spend too low to earn points

Need Help?

Contact your StayMe account manager to obtain your API key, adjust earn rates, or get integration support.

🍪 쿠키를 사용하여 사용자 경험을 개인화하고 트래픽을 분석합니다. See our 개인정보 처리방침 and 서비스 약관.

StayMe 어시스턴트 AI
회원님을 대신해 작업을 수행할 수 있습니다
입력 중...
비교:
비교
StayMe

StayMe를 홈 화면에 추가

내 예약에 바로 접속하세요