Payment Models
PaymentRequest
Properties
class PaymentRequest {
maxAmountRequired: string; // Maximum payment amount required
assetType: string; // Asset type (e.g., "SPL")
assetAddress: string; // Token mint address or "native" for SOL
paymentAddress: string; // Recipient wallet address
network: string; // Blockchain network identifier
expiresAt: Date; // Payment request expiration time
nonce: string; // Unique nonce for this request
paymentId: string; // Unique payment identifier
resource: string; // Resource path being requested
description?: string; // Optional description
}Creating a Payment Request
Methods
isExpired()
isExpired()toDict()
toDict()toJSON()
toJSON()fromDict()
fromDict()Validation
PaymentAuthorization
Properties
Creating a Payment Authorization
Methods
toHeaderValue()
toHeaderValue()fromHeader()
fromHeader()toDict()
toDict()toJSON()
toJSON()Validation
Usage Examples
Creating Payment Request on Server
Parsing Payment Authorization on Server
Validating Payment Authorization
Type Definitions
Next Steps
Last updated
