# Update subscription token

This method provides a mechanism for merchants to <a href="https://docs.solidgate.com/billing/subscriptions/subscriptions-1.0/manage-subscription/update-subscription-token/" target="_blank">update the payment token</a> when the customer's preferred payment method changes.

Endpoint: POST /subscription/update-token
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)

  - `signature` (string, required)

## Request fields (application/json):

  - `subscription_id` (string, required)
    Unique subscription identifier.
    Example: 83b19018-cbc4-45f0-899a-dda84fd2705e

  - `token` (string, required)
    Secure payment token representing sensitive payment method information.
    Example: uPrZ4lx6OFxDOC5wVeA0w5E2dBtDgCdGINo5jWPtxwQbsENzrFUIAUFT9rk7J0xWkpKj0NjVlEoa1ufu8fBIexEdyHFSNaPYQC7F

## Response 400 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: 2.01

  - `error.message` (string, required)
    Error message.
    Example: Validation error

## Response 401 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating the specific authorization failure.
    Example: 1.01

  - `error.message` (string, required)
    Descriptive message providing more details about the authorization failure.
    Example: Authorization failed

## Response 403 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating that access to the service is denied.
    Example: 1.02

  - `error.message` (string, required)
    Message informing that the service is not allowed for the account.
    Example: Access denied

## Response 404 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: 2.01

  - `error.message` (string, required)
    Error message.
    Example: {entityName} not found with id: {entityId}

