Skip to main content
PATCH
Update a payment method

Authorizations

Authorization
string
header
required

Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Account → API keys.

Path Parameters

paymentMethodId
string
required

Identifier of the payment method to update

Example:

"pm_1Abc2Def3Ghi4Jkl"

Body

application/json
alias
string

Optional friendly name for the card

Example:

"My Production Card"

allowedApiKeyIds
string[] | null

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

Example:
orgId
string | null

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

Response

The updated payment method. It carries no cardId, rails or needsReactivation: read those from GET /payment-methods.

id
string
required
Example:

"pm_1Abc2Def3Ghi4Jkl"

type
string
required
Example:

"card"

last4
string
required
Example:

"4242"

brand
string
required
Example:

"visa"

expMonth
integer | null
required
Example:

12

expYear
integer | null
required
Example:

2027

alias
string | null
required
Example:

"My Card"

provider
enum<string>
required
Available options:
stripe,
braintree,
erc4337,
visa,
vgs
Example:

"stripe"

status
enum<string>
required
Available options:
Active,
Revoked
Example:

"Active"

allowedApiKeyIds
string[] | null

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

Example:
needsReactivation
boolean

Present and true on an entry of an enrolled card whose card-on-file network token is no longer active: its holder can reactivate it in the Nevermined App. Absent too when that read fails, so its absence does not prove the token active. rails, not this flag, tells whether the card can pay now and through which rail.

cardId
string

The card’s CRD… card id, on an entry of a card enrolled with Nevermined (provider vgs or visa) whose card is known, and on an entry flagged needsReactivation. A card enrolled for card-on-file and Visa agentic payments is listed once per rail (or more), each entry with the same cardId: group entries by cardId, falling back to id. Absent on other entries. When the cards cannot be read it is absent too (a vgs entry without cardId is the sign; a retry can fix it), except on an entry flagged needsReactivation, which keeps it without rails. POST /delegation/create takes it as providerPaymentMethodId for a provider its rails lists. Only GET /payment-methods sets it: the PATCH /payment-methods/{paymentMethodId} response carries neither it nor rails.

Example:

"CRDs4FYUfwueGDryKrPDjd3JR"

rails
enum<string>[]

Listed with cardId on an entry of a card enrolled with Nevermined: the delegation providers a new delegation naming the card by its cardId can pay through now — vgs (card on file; listed only while the card-on-file network token is active) and visa (Visa agentic). rails, not needsReactivation, tells whether the card can pay now. It describes the card, so the entry for a rail that was turned off still lists the card’s other rails. Empty when the card can pay through neither. Absent when the cards cannot be read, so on an entry with cardId a missing rails means unknown (retry) and [] means none. A vgs entry’s own id is the card’s CRD…, so naming it is the same request: refused BCK.DELEGATION.0005 while the card cannot pay card on file. A Revoked vgs or visa entry is refused. An Active visa entry’s own id (its agentic token) is accepted even when the entry carries no rails (its token is linked to no card, or the cards could not be read).

Available options:
vgs,
visa
Example:
orgId
string | null

Organization this card belongs to (null = personal).