# Update a payment method `PATCH / PUT / POST /api/v1/payment_methods/{id}` Updates a payment method by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Payment methods → Write**. ## Path parameters - `id` (integer, required) — ID of the payment method. ## Body parameters - `label` (string) — Unique label, up to 64 characters. - `is_active` (boolean) — Whether the method is active. Deactivation clears the default flag. - `sort_order` (integer) — Non-negative display order. - `traceable` (boolean) — Whether the payment method is traceable. - `is_default` (boolean) — Set true on an active method to select it as the workspace default. ## Request (PATCH) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PATCH \ --url "https://api.asdincloud.com/api/v1/payment_methods/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"label":"Club bank transfer"}' ``` ## Request (PUT) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PUT \ --url "https://api.asdincloud.com/api/v1/payment_methods/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"label":"Club bank transfer"}' ``` ## Request (POST) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/payment_methods/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"label":"Club bank transfer"}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.payment_method.messages.updated" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `400` — A payment method ID cannot be changed. - `422` — One or more fields failed validation. - `500` — The change could not be saved.