Payment Methods

Update a payment method

Updates a saved payment method, changing its friendly alias and/or the set of NVM API keys allowed to use it. Requires a Nevermined API key.

patch/payment-methods/{paymentMethodId}

Request

  • Base URL: https://api.sandbox.nevermined.app/api/v1
  • URL: https://api.sandbox.nevermined.app/api/v1/payment-methods/{paymentMethodId}
  • Auth: HTTP bearer

Path parameters

paymentMethodIdstring required
Example:pm_1Abc2Def3Ghi4Jkl

Identifier of the payment method to update

Request body

aliasstring

Optional friendly name for the card

allowedApiKeyIdsstring[] nullable

Array of NVM API Key skId values allowed to use this card. Null or empty = any key can use it.

orgIdstring nullable

Move the card to an org (a valid orgId) or to personal (null). Omit to leave unchanged.

Example request

{
  "alias": "My Production Card",
  "allowedApiKeyIds": [
    "sk-abc123",
    "sk-def456"
  ]
}

Response

The updated payment method

idstring required
typestring required
last4string required
brandstring required
expMonthinteger nullable required
expYearinteger nullable required
aliasstring nullable required
provider'stripe' | 'braintree' | 'erc4337' | 'visa' | 'vgs' required
status'Active' | 'Revoked' required
allowedApiKeyIdsstring[] nullable

NVM API Key IDs allowed to use this card. Null = any key can use it.

orgIdstring nullable

Organization this card belongs to (null = personal).

Example response

{
  "id": "pm_1Abc2Def3Ghi4Jkl",
  "type": "card",
  "last4": "4242",
  "brand": "visa",
  "expMonth": 12,
  "expYear": 2027,
  "alias": "My Card",
  "provider": "stripe",
  "status": "Active",
  "allowedApiKeyIds": [
    "sk-abc123",
    "sk-def456"
  ]
}

Changes

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