V2 Preview — This authentication flow is part of the V2 API preview. Breaking changes may occur.
Overview
All V2 Merchant API endpoints require a JWT token passed via thex-access-token header. You obtain the token by exchanging your merchant API key at POST /authenticate.
Merchant API keys start with mk_live_ (or mk_test_ for test mode) and are created in the PuppetVendors admin under Settings → API Access. The full key is revealed once at creation.
Authenticating
200
scopeis"merchant"for merchant tokens — vendor keys (vk_) authenticate at the same endpoint but return"vendor"scope- The key’s prefix determines the token scope:
mk_keys mint merchant-scoped tokens with theadmin:users,admin:vendors, andadmin:payoutspermissions
Using the Token
Include the token in all subsequent requests via thex-access-token header. Send the token value directly, with no Bearer prefix:
Token Expiry & Refresh
Merchant tokens expire after 14 days (1209600 seconds). UsePOST /refresh-token with a valid (non-expired) token to get a new one without re-authenticating:
Verifying a Key
POST /verify is a side-effect-free probe: it confirms the key is valid and reachable and returns the scope, mode, and identity it carries, but does not issue a JWT or count as a use (lastUsedAt is unchanged). Any key that passes /verify will also pass /authenticate.
Key Rotation & Revocation
- Rotate a key in Settings → API Access — the previous key keeps working for a 24-hour grace window, so a rotation is an overlap rather than a cutover
- Revoke a key to immediately refuse any token minted from it