Documentation Index
Fetch the complete documentation index at: https://docs.nevermined.app/llms.txt
Use this file to discover all available pages before exploring further.
What Are Delegations?
A delegation is a scoped spending authorization tied to an enrolled payment card. It defines the boundaries of what an agent can charge: the maximum amount over the delegation’s lifetime, how many transactions are allowed, and when the authorization expires. Think of it as a controlled allowance: you’re giving an agent permission to spend within strict limits, rather than handing over your card.The Visa Agentic Tokens rollout retired the previous separate “Visa mandate” object. Visa is now one of three networks (
stripe, braintree, visa) on the unified nvm:card-delegation scheme, with a single create endpoint and a single record shape. Visa delegations differ only in that they require a per-delegation device-binding ceremony at create time.Delegation Properties
All three networks share the same core fields:| Field | Description |
|---|---|
provider | stripe, braintree, visa, or erc4337 |
providerPaymentMethodId | PSP-side token: Stripe pm_…, Braintree paymentMethodToken, or Visa Agentic Token vat_… |
spendingLimitCents | Maximum total amount the delegation can charge over its lifetime, in cents |
durationSecs | How long the delegation is valid for, in seconds from creation |
maxTransactions | Optional cap on the number of charges. Omit the field to allow unlimited transactions. |
currency | ISO 4217 lowercase (usd, eur, …) |
planId | Optional plan binding. Required for Visa (Trusted Agent Protocol). |
merchantAccountId | PSP-side merchant routing. Stripe Connected Account ID, Braintree per-currency merchantAccountId, or seller’s Stripe Connect account for Visa settlement. |
apiKeyId | Optional NVM API key link for automatic selection |
consumerPrompt | Visa-only: human-readable approval text shown during device binding |
assuranceData | Visa-only: opaque blob produced by the WebAuthn ceremony |
Creating a Delegation
Via the Nevermined Pay Dashboard
After enrolling a card, create a delegation from the Nevermined Pay dashboard:- Stripe / Braintree
- Visa
- Navigate to your enrolled card
- Click Create Delegation
- Set the spending limit (in dollars / euros)
- Set the duration (e.g. 7 days)
- Optionally set a max-transactions cap
- Optionally link an NVM API key
- Confirm to create
Via the API
All providers use the same endpoint and DTO. The Visa branch adds two required fields (consumerPrompt, assuranceData) and requires a planId.
- Stripe Delegation
- Braintree Delegation
- Visa Delegation
delegationId and delegationToken (the signed JWT) for the new authorization.Spending Controls
All delegations enforce multiple layers of spending control:Lifetime Spending Limit
spendingLimitCents caps the cumulative amount charged over the delegation’s lifetime, not per-transaction. Once amountSpentCents >= spendingLimitCents, the delegation transitions to Exhausted.
Usage Limits
maxTransactions caps the total number of charges. Once reached, the delegation is Exhausted regardless of remaining budget.
Time-Based Expiration
AftercreatedAt + durationSecs, the delegation transitions to Expired regardless of remaining budget or usage.
Card Spending Ceiling
Each card has a cumulative spending ceiling (default $10.00). The sum ofspendingLimitCents across all active delegations on a card can’t exceed this ceiling.
Example:
| Card Ceiling | Delegation A | Delegation B | Remaining |
|---|---|---|---|
| $10.00 | $5.00 | $3.00 | $2.00 |
Updating a Delegation
Delegations are not updated in place. To change the limit, duration, or any other parameter, revoke the existing one and create a new one. For Visa, this requires a fresh device-binding ceremony.Cancelling a Delegation
DELEGATION_INACTIVE.
Status Lifecycle
Active delegations can be used for payments. NVM Pay checks status, usage, and expiration on every verify and settle request. Each delegation tracks amountSpentCents, remainingBudgetCents, and transactionCount.
API Key Linking
You can optionally link a delegation to a specific NVM API key. This tells NVM Pay “when this API key is used, charge this delegation.” This is especially useful when you have multiple active delegations and want deterministic routing. Instead of the agent guessing which one to use, the API key determines it automatically. All three networks support API key linking through the sameapiKeyId field.
See Delegation Selection for the full resolution algorithm.
Transaction History
Every settled charge is recorded as a transaction:| Field | Description |
|---|---|
amount | Transaction amount |
currency | Currency code |
status | completed or failed |
providerTransactionId | PSP charge identifier (Stripe pi_…, Braintree transaction id, Stripe Connect pi_… for Visa settlement) |
failureReason | Error details (if failed) |
createdAt | When the transaction occurred |
Network Comparison
| Visa | Stripe | Braintree | |
|---|---|---|---|
| Create endpoint | POST /api/v1/delegation/create (provider: 'visa') | POST /api/v1/delegation/create (provider: 'stripe') | POST /api/v1/delegation/create (provider: 'braintree') |
| Per-delegation auth | WebAuthn/passkey device binding (browser-only) | API credentials only | API credentials only |
| Required extras | consumerPrompt, assuranceData, planId | — | merchantAccountId matching currency |
| Cancel | DELETE /api/v1/delegation/{id} | DELETE /api/v1/delegation/{id} | DELETE /api/v1/delegation/{id} |
| Settlement | Stripe Connect against seller’s connected account | Stripe PaymentIntents | Braintree transaction.sale against vaulted token |
What’s Next?
If you have multiple delegations, learn how NVM Pay decides which one to use for a given payment request.Delegation Selection
How NVM Pay resolves which delegation to charge