Gifts, team seats and licence key rotation
Buyers can send an item as a gift or buy seats for a team, and your server can reissue, turn off or share one licence key.
Added
8- SellingA buyer can buy an item for someone else: pass gift to POST /api/v1/public/items/:id/checkout with recipientEmail, and optionally recipientName, message, deliverAt, hidePrice and claimUrl, signed in or as a guest. The buyer stays the payer and never sees what it delivers. On the delivery date, checked every five minutes, the recipient gets the Gift Received email with a link to claim it, and your server gets grant.gifted.
- SellingThe recipient claims a gift signed in with POST /api/v1/public/me/gifts/:orderId/claim and its token, or by signing in with the gift's email address, verified. A guest claims it with POST /api/v1/guest/:orgId/gifts/:orderId/claim and the token in x-gift-token. Your server gets grant.claimed. A gift another account claimed answers 409 GIFT_ALREADY_CLAIMED, and a wrong token or one not delivered yet answers 404 GIFT_NOT_FOUND. A subscription or a booking cannot be a gift.
- SellingPass seats: true to checkout to buy up to 500 seats for a team. Each grant becomes a pool held by the buyer, and what it gives, access, holdings and a licence key, follows each seat's assignee. The buyer assigns and frees seats with POST /api/v1/public/me/holdings/:grantId/seats/assign and /seats/free, and your server with /api/v1/server/commerce/grants/:id/seats/assign and /seats/free. A refused assignment answers 409 SEAT_REFUSED.
- SellingA seat assigned by email is held once an account with that address is verified, and the person gets the Seat Assigned email. When a seat is freed or reassigned, its licence key is reissued with its activations reset, so the previous person's copy stops working. An order's page in the console shows who a gift went to and whether it was claimed, and how many seats are assigned and claimed.
- SellingA full refund under the item type's revoke rule now also stops an unclaimed gift being claimed (GIFT_REVOKED), cancels a gift not sent yet and takes access from every seat. Deleting a buyer's data clears gift recipients' and seat holders' emails and the buyer's gift note.
- Licence keysPOST /api/v1/server/commerce/grants/:id/keys/rotate with { unit } reissues one leaked key: the old key answers not_found at once and the buyer sees the new one in their holdings. activations is reset by default, so every machine activates again, or keep. Your server gets license.rotated with the key's last group, never the key.
- Licence keysPOST /api/v1/server/commerce/grants/:id/keys/disable and /keys/enable turn one key off and back on while its grant and other keys keep working. A disabled key answers revoked and takes no new activation, and its activations stay for when it is back on. Each key now lists disabled and rotatedAt.
- Licence keysSet seatCounted: true on a license_key benefit to give a team purchase one key for the whole order, its activations counted against the seats bought: five seats with activationLimit 2 is one key for ten machines, or one a seat with no limit. The key lists its seats.