Token Schemas
kya
Token
kya
TokenHeader
{
"kid": "<JWK Key ID>",
"alg": "ES256",
"typ": "kya+JWT"
}
Payload
{
// Standard claims (from the JWT spec)
"iss": "<URL of the token issuer>",
"iat": 1742245254, // 'issued at' timestamp
"exp": 1773867654, // 'expiration' timestamp
"jti": "b9821893-7699-4d24-af06-803a6a16476b", // Unique token ID
"sub": "<Buyer Agent Account ID>",
"aud": "<Seller Agent Account ID>",
// Skyfire-defined claims common to both 'pay' and 'kya' types
"env": "<Issuer environment (sandbox, production, etc)>",
"ssi": "<Seller Service ID>", // Seller service that this token was created for
"btg": "<Buyer Tag (Buyer's internal reference ID)>",
// Skyfire-defined claims for 'kya' (Know Your Agent) type tokens
"bid": { // Buyer Identity claims
"email": "[email protected]”,
...
},
"aid": { // Agent Identity claims
}
}
Note
- See buyerIdentityRequirement for a list of the Buyer Identity claims (
bid
) that a Seller Service can require.
pay
Token
pay
TokenHeader
{
"kid": "<JWK Key ID>",
"alg": "ES256",
"typ": "pay+JWT"
}
Payload
{
// Standard claims (from the JWT spec)
"iss": "<URL of the token issuer>",
"iat": 1742245254, // 'issued at' timestamp
"exp": 1773867654, // 'expiration' timestamp
"jti": "b9821893-7699-4d24-af06-803a6a16476b", // Unique token ID
"sub": "<Buyer Agent Account ID>",
"aud": "<Seller Agent Account ID>",
// Skyfire-defined claims common to both 'pay' and 'kya' types
"env": "<Issuer environment (sandbox, production, etc)>",
"ssi": "<Seller Service ID>", // Seller service that this token was created for
"btg": "<Buyer Tag (Buyer's internal reference ID)>",
// Skyfire-defined claims for 'pay' (Agent Payment) type tokens
"spr": "0.010000", // Seller Service Price
"sps": "PAY_PER_USE", // Seller Service Pricing Model
"amount": "15.000000", // Token Amount in Currency units
"cur": "USD", // Currency unit
"value": "15000000", // Token Amount in Settlement Network
"mnr": "1500" // Maximum number of requests when sps == "PAY_PER_USE"
}
Note
- See Create Agent's Service for valid values for the
sps
claim (priceModel)- If the Seller Service Pricing Model (
sps
claim) isCUSTOM
, then thespr
andmnr
claims are omitted
- If the Seller Service Pricing Model (
kya+pay
Token
kya+pay
TokenHeader
{
"kid": "<JWK Key ID>",
"alg": "ES256",
"typ": "kya+pay+JWT"
}
Payload
{
// Standard claims (from the JWT spec)
"iss": "<URL of the token issuer>",
"iat": 1742245254, // 'issued at' timestamp
"exp": 1773867654, // 'expiration' timestamp
"jti": "b9821893-7699-4d24-af06-803a6a16476b", // Unique token ID
"sub": "<Buyer Agent Account ID>",
"aud": "<Seller Agent Account ID>",
// Skyfire-defined claims common to both 'pay' and 'kya' types
"env": "<Issuer environment (sandbox, production, etc)>",
"ssi": "<Seller Service ID>", // Seller service that this token was created for
"btg": "<Buyer Tag (Buyer's internal reference ID)>",
// Skyfire-defined claims for 'kya' (Know Your Agent) type tokens
"bid": { // Buyer Identity claims
"email": "[email protected]”,
...
},
"aid": { // Agent Identity claims
},
// Skyfire-defined claims for 'pay' (Agent Payment) type tokens
"spr": "0.010000", // Seller Service Price
"sps": "PAY_PER_USE", // Seller Service Pricing Model
"amount": "15.000000", // Token Amount in Currency units
"cur": "USD", // Currency unit
"value": "15000000", // Token Amount in Settlement Network
"mnr": "1500" // Maximum number of requests when sps == "PAY_PER_USE"
}
Note
- See buyerIdentityRequirement for a list of the Buyer Identity claims (
bid
) that a Seller Service can require. - See Create Agent's Service for valid values for the
sps
claim (priceModel)- If the Seller Service Pricing Model (
sps
claim) isCUSTOM
, then thespr
andmnr
claims are omitted
- If the Seller Service Pricing Model (
Updated 3 days ago