@nevermined-io/payments
    Preparing search index...

    Interface CreateDelegationPayload

    Payload for creating a new delegation via POST /api/v1/delegation/create.

    interface CreateDelegationPayload {
        apiKeyId?: string;
        currency: DelegationCurrency;
        durationSecs: number;
        maxTransactions?: number;
        merchantAccountId?: string;
        planId?: string;
        provider: DelegationProvider;
        providerPaymentMethodId?: string;
        spendingLimitCents: number;
    }
    Index

    Properties

    apiKeyId?: string

    NVM API Key ID to scope the delegation to

    Currency code (e.g., 'usd' for card providers, 'usdc' for erc4337). Required by the backend — no silent default.

    durationSecs: number

    Duration of the delegation in seconds

    maxTransactions?: number

    Maximum number of transactions allowed

    merchantAccountId?: string

    Merchant account ID (Stripe Connect acct_…).

    Ignored by the backend: the seller's Connect account is resolved at settle time, never taken from the caller.

    planId?: string

    Plan ID to scope the delegation to. Optional for every provider, and additive: delegations are plan-agnostic by default; supplying planId opts into a plan-bound delegation.

    Delegation provider: 'vgs' for a card enrolled through the credit/debit card form, 'stripe' | 'visa' for the other card rails, 'erc4337' for crypto. 'braintree' is refused at create.

    providerPaymentMethodId?: string

    Payment method ID from the provider (the card's 'CRD…' id for 'vgs', Stripe 'pm_...', or Visa Agentic token id). Required for card providers.

    spendingLimitCents: number

    Maximum spending limit in cents