Updates a payment method. Currently external_reference is the only field this endpoint accepts, so it is how you correct the reference your own system holds against a Root payment method.
Accepted on external and collection_module payment methods; any other type is rejected with 400. On a collection_module payment method the external reference is the only field this endpoint will change, so a request that also carries verification fields is rejected: the module payload belongs to the collection module's own update path. Surrounding whitespace is trimmed and the reference cannot be empty. External references are not required to be unique, so setting one another payment method already holds succeeds.
If you hold the reference but not the payment_method_id, find the payment method first with GET /payment-methods/external-reference/{external_reference}, then call this endpoint with the id it returns. Use that route rather than the external_reference filter on GET /payment-methods, which returns dismissed payment methods unless you also pass dismissed=false, so a correction can land on one that is no longer in use.
400The payment method is neither external nor collection_module, the reference is empty, or the request tried to change another field on a collection_module payment method.
404No payment method with that id exists in your organization.