OptionalapiNVM API Key ID to scope the delegation to. Active (non-deprecated).
OptionalcardPaymentMethod entity UUID — references an enrolled card.
OptionalcurrencyCurrency code (e.g., 'usd' for card providers, 'usdc' for erc4337).
OptionaldelegationExisting delegation UUID to reuse instead of creating a new one. The supported (non-deprecated) path.
OptionaldurationDuration of the delegation in seconds. Required only for new delegations.
OptionalmaxMaximum number of transactions allowed.
OptionalmerchantMerchant account ID (Stripe Connect acct_xxx or Braintree merchantId).
OptionalplanPlan ID to scope a newly-created delegation to. Optional and additive:
delegations are plan-agnostic by default; supplying planId opts into a
plan-bound delegation. (Visa delegations are always plan-specific and
require it server-side.)
OptionalproviderStripe payment method ID (e.g., 'pm_...'). Required only for new delegations.
OptionalspendingMaximum spending limit in cents. Required only for new delegations.
Configuration for delegation-based payments (both crypto and card schemes).
The supported flow is create-first: create a delegation with DelegationAPI.createDelegation, then request the access token with
delegationConfig: { delegationId }.Remarks
The inline create-on-the-fly fields (
providerPaymentMethodId,spendingLimitCents,durationSecs,currency,merchantAccountId,maxTransactions,cardId) are individually deprecated. Calling X402TokenAPI.getX402AccessToken with adelegationConfigthat lacksdelegationIdbut carries one of those fields emits a runtime deprecation warning; create the delegation first and pass onlydelegationId(optionallyapiKeyId) here. The interface itself is NOT deprecated — the{ delegationId }reuse path is the supported way to configure a token request.