Apply for API access through your loyalty platform provider (Punchh or Paytronix); both require a partner agreement and are not self-service
At checkout, look up the guest's loyalty account by email or phone number using the customer lookup endpoint to retrieve their current points balance
After a successful order, post a transaction event to the loyalty platform's earn endpoint with the order total and eligible line items; the platform calculates and credits points according to the active earning rules
For redemptions, call the redemption validation endpoint with the guest's requested reward and receive a discount value or coupon code to apply to the current order
On order completion, finalize the transaction with the loyalty platform to close the earn/redeem cycle; use the order ID as the idempotency key to prevent double-crediting
Known gotchas
Loyalty earn and redeem calls must be made in the correct sequence; finalizing before redemption validation can result in points being issued and also a discount applied without proper authorization
Points crediting is typically asynchronous on high-volume platforms; do not display a final updated balance immediately after earn — refresh the balance after a short delay or prompt the guest to check their app
Earning rules change frequently (promotional multipliers, blackout items); always drive earn calculations from the loyalty platform's API rather than computing points locally
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp