Create Delegation
Creates a spending delegation for the authenticated user against a previously enrolled payment method. For fiat-backed delegations (stripe/braintree/visa) the response includes a signed JWT (delegationToken); for crypto (erc4337) flows the token is held client-side and omitted. Requires a Nevermined API key.
Authorizations
Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.
Body
Payment provider type. stripe / braintree / visa / erc4337 select that rail directly. vgs (epic #1958) is a unified VGS-Collect card: a PLAN-AGNOSTIC, portable delegation whose settlement PSP (stripe / braintree) is resolved AT CHARGE TIME from the plan being paid (fiatPaymentProvider), so ONE card can charge ANY PSP (#2082). delegation.provider is persisted as the portable vgs marker (the concrete charge never sees it — the handler derives the real PSP at settle). Requires a portable providerPaymentMethodId (the CRD… cardId, which must carry an active network token); planId is OPTIONAL — pass it only to BIND the delegation to a single plan.
stripe, erc4337, braintree, visa, vgs "stripe"
Maximum spending limit in cents (smallest currency unit)
10000
Duration of the delegation in seconds
604800
Currency code (lowercase)
usd, eur, usdc, eurc "usd"
Payment-method identifier from the provider. For stripe / braintree this is the saved card; for visa this is the VGS agentic-token id returned by enrollment; for vgs this is the CRD… canonical cardId from the unified VGS-Collect enroll. Required for these providers; ignored for erc4337.
"pm_1Abc2Def3Ghi4Jkl"
Visa-only: human-readable approval prompt shown to the user during VGS Agentic Auth device binding. Required when provider=visa.
"Allow up to USD 50.00 over 5 transactions"
Visa-only: opaque assurance payload from the VGS Agentic Auth browser SDK after FIDO/OTP device binding. Required when provider=visa.
Plan ID to restrict this delegation to. Optional and plan-agnostic by default (#1534), INCLUDING provider=vgs (#2082): a unified VGS card delegation is plan-agnostic and the settlement PSP is resolved at charge time from the plan being paid, so one card can charge any PSP — pass planId only to BIND it to a single plan. EXCEPT provider=visa (the VGS mandate is merchant-scoped, derived from the plan owner; see BCK.VISA.0015), where it is REQUIRED.
"123456789"
Optional merchant Stripe account ID to restrict payments to
"acct_1Abc2Def3Ghi"
Maximum number of transactions allowed (null = unlimited)
50
Optional API Key ID (skId) to restrict this delegation to
"sk-abc123"
erc4337 / Router only: restrict spend to these pay-to addresses — the Router rejects payments to any other recipient. Omit for no recipient restriction.
erc4337 / Router only (#2230): fund this delegation from an ORGANIZATION wallet instead of the caller's own wallet. The caller must be an admin of the wallet's org. Spend is always capped by the SPENDING member's group budget (the wallet must be shared with the member's group).
"orw-abc123"
Response
The created delegation
Related topics
Delegation Selectionx402 Delegation ExtensionX402 ProtocolHow the x402 Facilitator WorksAutomatic Credit Top-Ups