Skip to content

SharedPaymentToken

PQSafe AgentPay API Reference v0.1.0


PQSafe AgentPay API Reference / Stripe / SharedPaymentToken

Interface: SharedPaymentToken

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:98

A Shared Payment Token — the credential Stripe issues when a user delegates limited payment authority to an AI agent.

The token itself is an opaque reference to Stripe’s vault; PQSafe treats it as a reference that must be accompanied by a PQ signature to prove the delegation was human-authorized.

Properties

active

active: boolean

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:115

Whether the token is currently active


agentId

agentId: string

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:111

Agent identifier this token was issued to


amountUsed

amountUsed: number

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:117

Running total of amounts authorized so far (smallest currency unit)


created

created: number

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:121

Unix timestamp of creation


currency

currency: string

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:119

ISO 4217 currency code for all monetary fields in usageLimits


customer

customer: string

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:109

The Stripe customer who owns this token (cus_*)


id

id: string

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:103

Stripe SPT identifier.

Example

"spt_1PXqBBGJhmH2PkSTDemoToken123"

lastUsed

lastUsed: number | null

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:123

Unix timestamp when the token was last used (null if never used)


metadata?

optional metadata?: Record<string, string>

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:125

Stripe-managed metadata


object

object: "shared_payment_token"

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:105

Object type discriminator — always “shared_payment_token”


paymentMethod

paymentMethod: string

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:107

Stripe-internal payment method the SPT draws from (pm_*)


usageLimits?

optional usageLimits?: SharedPaymentTokenUsageLimits

Defined in: pqsafe/agent-pay/src/adapters/acp.ts:113

Usage constraints