Update payment method

PATCH https://api.invunion.com/api/v1/payment-methods/:code payment_methods:write Markdown

Update fields on a catalog payment method.

Partial update. Send only the fields you want to change. At least one updatable field is required. Bank-connection rows cannot be edited here. Switching association_mode to exclusive fails if more than one counterparty is still linked.

Path parameters

NameTypeRequired
code

Payment method code (`code`).

Example: PM-001

string

Max 50

Required

Body parameters

NameTypeRequired
name

Display name of the instrument. At least one updatable field is required.

Example: Leones Cars EUR

string

Max 255

Optional
iban

IBAN. Catalog instruments other than the empty Default still need an IBAN or identifier.

Example: FR7630006000011234567890189

string

Max 50

Optional
identifier

Non-IBAN instrument key (PayPal email, wallet id, terminal number). Required unless iban is set. Unique per tenant catalog.

Example: carl@leonescars.fr

string

Max 120

Optional
type

Instrument type. Default bank_account.

string

No maximum

Optional
Allowed valuesbank_accountcredit_cardpaypalwerotwintcrypto_walletother
bic

BIC. Bank name and country are filled from the BIC directory when omitted.

Example: BNPAFRPP

string

Max 11

Optional
currency

ISO 4217 currency code. Default EUR.

Example: EUR

string

Max 3

Optional
counterparty_id

Counterparty code (`account_code`) to link. For exclusive mode this becomes the owner. For shared mode it is added as an association.

Example: CPT-042

string

No maximum

Optional
association_mode

exclusive (one owner) or shared (several counterparties). Default exclusive.

Allowed valuesexclusiveshared
string

No maximum

Optional
account_type

Optional account type label.

Example: checking

string

No maximum

Optional
bank_name

Bank name. Filled from BIC when omitted.

Example: BNP Paribas

string

No maximum

Optional
bank_country

ISO 3166-1 alpha-2 of the bank, not the counterparty country.

Example: FR

string

No maximum

Optional
status

Instrument status. Default active.

string

No maximum

Optional
Allowed valuesactiveinactiveerror
metadata

JSON object. At most 32 keys, nested depth 3, 8 KB serialized, and 64-character key names. Keys __proto__, constructor, and prototype are rejected.

Example: {"erp_pm":"BANK-042"}

object
Optional

Errors

This operation can return the following errors in addition to generic HTTP failures.

Error HTTP code Description
Missing Bearer token 401 The Authorization header is missing or is not a Bearer token.
Invalid or revoked API key 401 The API key is unknown, malformed, expired, or has been revoked.
API key is missing scope payment_methods:write 403 The key does not include payment_methods:write. A write scope does not imply the matching read scope.
Too many requests, please try again later 429 Wait and retry. The Retry-After header is the number of seconds to wait.
No fields to update 400 The body did not contain any updatable field.
IBAN or identifier is required 400 The update would leave the instrument without an IBAN or identifier.
Invalid association_mode 400 association_mode is not exclusive or shared.
Payment method not found 404 No catalog payment method with this code exists in the authenticated tenant.
Enable Banking accounts are managed from Bank connections, not from payment methods. 403 The row is a bank-connection account, not a catalog instrument.
Parked payment methods cannot be shared 409 The instrument is parked and cannot switch to shared mode.
Remove all but one association before switching to exclusive mode 409 More than one counterparty is still linked.
This IBAN already belongs to a catalog payment method 409 Another catalog instrument already uses this IBAN.
Internal server error 500 Unexpected server error. The JSON body includes correlationId. Retry with backoff.