Skip to main content

Payments SDK

x402 payment configuration — pricing, facilitators, grants, and subscription

Operations

Generated Reference

Overview

x402 payment configuration — pricing, facilitators, grants, and subscription

Available Operations

lucidGetAssetPricing

Retrieve the x402 pricing configuration for an AI asset. Returns null if no pricing has been configured (asset is free access). No authentication required.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetAssetPricingResponse>

Errors

lucidSetAssetPricing

Admin-only. Sets or updates the pricing configuration for an AI asset.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.SuccessResponse>

Errors

lucidDeleteAssetPricing

Admin-only. Removes pricing (asset becomes free access).

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidDeleteAssetPricingResponse>

Errors

lucidGetAssetRevenue

Retrieve the revenue summary for an AI asset including total earned, pending settlement, and withdrawn amounts. Defaults to USDC token if not specified.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetAssetRevenueResponse>

Errors

lucidWithdrawAssetRevenue

Admin-only. Marks confirmed revenue as pending_payout. The actual on-chain transfer happens via the batch payout epoch.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidWithdrawAssetRevenueResponse>

Errors

lucidGetPaymentConfig

Retrieve the current x402 payment configuration including supported chains, default facilitator, enabled status, and facilitator-specific settings.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetPaymentConfigResponse>

Errors

lucidSetDefaultFacilitator

Admin-only. Sets the default x402 facilitator (direct, coinbase, payai).

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<models.SuccessResponse>

Errors

lucidGetSupportedChains

List all blockchain chains supported for x402 payments, including the accepted payment tokens (e.g., USDC) on each chain.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidGetSupportedChainsResponse>

Errors

lucidSubscribeAsset

x402-gated. Pay via USDC and receive a time-limited access subscription. On success, creates an on-chain AccessReceipt.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidSubscribeAssetResponse>

Errors

lucidCreatePaymentGrant

Admin-only. Issues a signed payment grant for an agent run. The grant is Ed25519-signed by the orchestrator and scoped to specific models/tools.

Example Usage

Standalone function

The standalone function version of this method:

Parameters

Response

Promise<operations.LucidCreatePaymentGrantResponse>

Errors