patch payment method.md

Patch Payment Method

Management API · Payment

PATCH https://app.mk.io/api/v1/organization/paymentMethods/{paymentmethod_id}

Partially update a payment method using JSON Patch (RFC 6902). Requires Content-Type: application/json-patch+json.

The following field can be updated via replace operations:

RBAC Capability Required: core.subscription.update

Authentication

Path parameters

Name Type Required Description
paymentmethod_id string Yes format: uuid

Request body

Content type: application/json-patch+json

Example request

curl -X PATCH "https://app.mk.io/api/v1/organization/paymentMethods/{paymentmethod_id}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json-patch+json" \
  -d '[
  {
    "op": "replace",
    "path": "/metadata/displayName",
    "value": ""
  }
]'

Responses

200 — The updated payment method.

Example:

{
  "metadata": {
    "created": "2024-01-01T00:00:00Z",
    "createdBy": "00000000-0000-0000-0000-000000000000",
    "createdByEmail": "string",
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "organizationId": "00000000-0000-0000-0000-000000000000"
  },
  "related": {
    "projects": [
      "string"
    ]
  },
  "spec": {
    "type": "azure",
    "allowedOrganizations": [
      "00000000-0000-0000-0000-000000000000"
    ],
    "autoPurchaseBeamLicenses": true,
    "azureOfferId": "string",
    "azurePlanName": "string",
    "azurePrivateOfferId": "00000000-0000-0000-0000-000000000000",
    "azureSaasSubscriptionAutoRenew": true,
    "azureSaasSubscriptionEnd": "string",
    "azureSaasSubscriptionId": "string",
    "azureSaasSubscriptionName": "string",
    "azureSaasSubscriptionStart": "string",
    "azureSaasSubscriptionStatus": "string",
    "endDate": "2099-01-01",
    "notes": "string",
    "productPublicationName": "string",
    "startDate": "2026-01-01"
  },
  "status": {
    "isActive": true,
    "termsAndConditionsAccepted": true
  }
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}