Use this file to discover all available pages before exploring further.
The x402 Facilitator supports multiple payment models to match your product needs across APIs, agents/tools, and protected resources.These models are enabled by Nevermined’s programmable x402 settlement layer (smart accounts + policies + contracts), not just single-transfer pay-per-request flows.If you’re looking for the HTTP handshake details (402 discovery → retry with PAYMENT-SIGNATURE), see:
Charge variable amounts based on request complexity. The x402 max_amount field controls the maximum charge per request.
TypeScript
Python
import { getDynamicCreditsConfig } from '@nevermined-io/payments'// Dynamic: charge 1-10 credits based on requestconst creditsConfig = getDynamicCreditsConfig( 1n, // Minimum credits per request 10n // Maximum credits per request)const { planId } = await payments.plans.createPlan({ agentId: 'did:nv:agent-123', name: 'Pay As You Go', description: 'Variable pricing based on complexity', priceConfig, creditsConfig, accessLimit: 'credits'})// During settlement, specify actual amountawait payments.facilitator.settlePermissions({ planId, maxAmount: BigInt(actualCreditsUsed), // 1-10 based on request x402AccessToken: token, subscriberAddress: address})
from payments_py.plans import get_dynamic_credits_config# Dynamic: charge 1-10 credits based on requestcredits_config = get_dynamic_credits_config( 1, # Minimum credits per request 10 # Maximum credits per request)plan = payments.plans.create_plan( agent_id='did:nv:agent-123', name='Pay As You Go', description='Variable pricing based on complexity', price_config=price_config, credits_config=credits_config, access_limit='credits')# During settlement, specify actual amountawait payments.facilitator.settle_permissions( payment_required=payment_required, x402_access_token=access_token, max_amount=str(actual_credits_used), # 1-10 based on request)
Accept credit card payments via Stripe, Braintree, or the Visa Trusted Agent Protocol. The active provider is selected per plan via the seller’s fiatPaymentProvider metadata at registration time; all three providers settle x402 charges through the same nvm:card-delegation scheme. Visa delegations add a per-delegation WebAuthn/passkey approval enforced by Visa VTS and settle through Stripe Connect — see the Visa subsection on the card enrollment page.
const fiatConfig = await payments.plans.getFiatPriceConfig({ amount: 1000, // $10.00 currency: 'USD'})// One-time fiat purchase via the SDK (Stripe-priced plans only):const { url } = await payments.plans.orderFiatPlan(planId)// Redirect user to Stripe checkout URL
orderFiatPlan returns a Stripe checkout URL and is only available for Stripe-priced plans. Braintree-priced plans are purchased through the Nevermined App’s Braintree Drop-in checkout. Both Stripe and Braintree plans support per-request x402 settlement against credit-card delegations — see Braintree onboarding for the seller-side requirements (per-currency merchant accounts).