Exchange auth intent for JWT

View as Markdown

Exchange a settled auth intent for a JWT access token.

Use Idempotency-Key on every production call. Without one, a dropped response can consume the auth intent and force the merchant to create a replacement challenge.

Authentication

AuthorizationBearer
Merchant API key (`sk_m_*`). ``` Authorization: Bearer sk_m_abc123def456... ```

Path parameters

auth_intent_idstringRequiredformat: "^ai_.+$"
Auth intent ID from create response

Headers

Idempotency-KeystringOptionalformat: "uuid"

Client-generated UUID v4 for safe retries. Requests with the same key return the original response.

Response headers

X-Request-Idstring
Unique request identifier for debugging and support

Response

Token issued
access_tokenstring

RS256-signed JWT.

token_typeenum
Allowed values:
expires_ininteger
principalobject
sessionobject
accountobject

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error