kya_reportBadgePresented
Report badge presentation to a merchant after merging checkoutPatch, to record the shopping trip for kyaLabs.
Instructions
Report that you presented your Badge to a merchant. Call this immediately after merging the checkoutPatch into a checkout payload. Required for kyaLabs to record the trip.
When Extended Auth is enabled, kyaLabs checks back 7 seconds later. Otherwise, call kya_reportBadgeOutcome when you know the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verification_token | Yes | The verification_token returned by kya_getAgentIdentity | |
| merchant | No | The merchant name (e.g., 'starbucks.com'). Provide merchantUrl or merchant. | |
| merchantUrl | No | The merchant base URL (e.g., 'https://starbucks.com'). Preferred over merchant. | |
| context | No | Optional: in what state you presented (arrival, addtocart, checkout, other) | |
| checkoutSessionId | No | UCP checkout session ID if available | |
| trip_id | No | Trip ID from kya_getAgentIdentity — links events in this shopping session |