X402 - Permissions

Get Permission

Retrieves complete information about a specific permission.

get/x402/permissions/{permissionHash}

Request

  • Base URL: https://api.sandbox.nevermined.app/api/v1
  • URL: https://api.sandbox.nevermined.app/api/v1/x402/permissions/{permissionHash}
  • Auth: HTTP bearer

Path parameters

permissionHashstring required

Unique permission identifier

Response

Permission details

permissionHashstring required

Unique identifier of the permission (hash)

scheme'nvm:erc4337' | 'nvm:card-delegation' required

Payment scheme identifier

planIdstring

No permission the API creates today carries one: the single write path (delegation.service.ts — permissionRepository.save) hardcodes planId = null as plan-agnostic, and the response builder maps planId ?? undefined, which JSON.stringify drops — so the key is ALWAYS absent, on both schemes. Retained because the column exists and older rows may carry a value.

planNamestring required

Name of the payment plan. Always the empty string on permissions the API creates today — the write path hardcodes planName to it. The key is always emitted, which is why it stays in required.

status'Active' | 'Revoked' | 'Expired' | 'Exhausted' required

Current status of the permission

createdAtstring date-time required

Date when the permission was created

lastUsedAtstring date-time nullable required

Date when the permission was last used, or null if never used

expiresAtstring date-time nullable required

Date when the permission expires, or null if it does not expire

redemptionLimitinteger nullable required

Maximum number of redemptions allowed, or null for unlimited

delegationIdstring nullable

Linked delegation id. Present on any delegation-linked permission, on both schemes

spendingLimitCentsstring nullable

Spending limit in cents. Present on any delegation-linked permission, on both schemes

currencystring nullable

Currency code. Present on any delegation-linked permission, on both schemes

remainingBudgetCentsstring nullable

Remaining budget in cents. Present on any delegation-linked permission, on both schemes

Example response

{
  "permissionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "scheme": "nvm:erc4337",
  "status": "Active",
  "createdAt": "2025-05-09T12:00:00Z",
  "lastUsedAt": "2025-05-09T14:00:00Z",
  "expiresAt": "2025-12-20T00:00:00Z",
  "redemptionLimit": 10,
  "delegationId": "a1b2c3d4-e5f6-4a90-8bcd-ef1234567890",
  "spendingLimitCents": "10000",
  "currency": "usd",
  "remainingBudgetCents": "9000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.