# Deactivate a Subscription Link

Deactivate an existing Subscription Link.

Endpoint: PUT /subscription_links/{subscription_link_id}
Version: 2022-02-01
Security: BasicAuth

## Path parameters:

  - `subscription_link_id` (string, required)
    The Subscription Link ID.

## Request fields (application/json):

  - `state` (string)
    The current state of the Subscription Link.
    Enum: "DEACTIVATED"

  - `tags` (object,null)
    Include up to 50 key: value pairs to annotate requests with custom metadata.
- Maximum character length for individual keys is 40.
- Maximum character length for individual values is 500.
(For example, order_number: 25, item_type: produce, department: sales)

## Response 200 fields (application/json):

  - `id` (string)
    The ID of the resource.

  - `additional_details` (object)
    Object containing additional details about the link.

  - `additional_details.collect_name` (boolean)
    The collected user's name.

  - `additional_details.collect_email` (boolean)
    The collected email address.

  - `additional_details.collect_phone` (boolean)
    The collected phone number.

  - `additional_details.collect_shipping_address` (boolean)
    The collected shipping address.

  - `additional_details.expiration_in_minutes` (string)
    How long (in minutes) the link should be valid for. Defaults to 60 minutes.

  - `additional_details.expired_session_url` (string)
    The URL to redirect the user to if the link expires.

  - `additional_details.receipt_requested_delivery_methods` (array)
    A list of requested delivery methods. Each method specifies 
the type of delivery and the destination(s) where the receipt should be sent.

  - `additional_details.receipt_requested_delivery_methods.type` (string, required)
    The method of receipt delivery.
    Enum: "EMAIL", "SMS", "PRINT"

  - `additional_details.receipt_requested_delivery_methods.destinations` (array, required)
    A list of destination addresses or identifiers where the receipt should be sent.

  - `additional_details.send_confirmation` (boolean)
    Setting this flag to true validates the provided email address and sends a confirmation email to that address. When set to true, the collect_email field must include an email. When set to false (default), no confirmation email will be sent (e.g., the merchant does not require it.)

  - `additional_details.send_receipt` (boolean)
    Whether to send the user a Receipt.

  - `additional_details.success_return_url` (string,null)
    A URL to redirect the subscriber after the transaction completes.

  - `additional_details.terms_of_service_url` (string,null)
    The URL to the Terms of Service.

  - `additional_details.unsuccessful_return_url` (string,null)
    A URL to redirect the user to if the transaction was successful.

  - `allowed_payment_methods` (array)
    The allowed payment methods.
    Enum: "APPLE_PAY", "BANK_ACCOUNT", "GOOGLE_PAY", "PAYMENT_CARD"

  - `application_id` (string)
    The ID of the Application the Subscription Link was created under.

  - `branding` (object)
    Branding settings for the Subscription Link.

  - `branding.accent_color` (string, required)
    Hex code of the accent color.
    Example: "#F2F2F2"

  - `branding.brand_color` (string, required)
    Hex code of branding color.
    Example: "#F2F2F2"

  - `branding.button_font_color` (string,null)
    Hex code of the button font color.

  - `branding.icon` (string, required)
    URL for the icon of the payment link.

  - `branding.logo` (string, required)
    URL of the logo for the payment link.

  - `branding.logo_alternative_text` (string,null)
    Alternate text displayed if the logo image cannot display.

  - `branding.button_label` (string)
    The text that displays within the button.

  - `created_at` (string)
    Timestamp of when the object was created.

  - `is_multiple_use` (boolean)
    If set to true, the link can be used more than once.

  - `link_expires_at` (string)
    Timestamp of when the link will expire.

  - `link_url` (string)
    The URL of the link.

  - `merchant_id` (string)
    The Merchant asssociated with the link.

  - `nickname` (string)
    A human-readable name for the resource.

  - `plans` (array)
    A list of Subscription Plan objects, along with additional information for each plan if selected.

  - `plans.subscription_plan_id` (string)
    The Subscription Plan that a customer selects via the Subscription Link.

  - `plans.name` (string)
    The name of the Subscription Plan you wish to display to your buyer. This may differ from the internal nickname of the Subscription Plan.

  - `plans.image_details` (object)
    Subscription Link image locations.

  - `plans.image_details.primary_image_url` (string)
    The primary image location.

  - `plans.image_details.alternative_image_urls` (array)
    The locations of backup images if there is an issue with the primary image.

  - `plans.url_details` (object)

  - `plans.url_details.success_return_url` (string)
    The URL to redirect the user after the transaction completes.

  - `plans.url_details.unsuccessful_return_url` (string)
    If an attempt is made but fails, redirect the user to this URL.

  - `plans.url_details.expired_session_url` (string)
    The URL to redirect the user to if their session times out.

  - `plans.url_details.terms_of_service_url` (string)
    A Terms of Service URL.

  - `state` (string)
    The current state of the Subscription Link.
    Enum: "ACTIVE", "DEACTIVATED", "EXPIRED", "COMPLETED"

  - `tags` (object,null)
    Include up to 50 key: value pairs to annotate requests with custom metadata.
- Maximum character length for individual keys is 40.
- Maximum character length for individual values is 500.
(For example, order_number: 25, item_type: produce, department: sales)

  - `type` (string)
    The type of Subscription Link. This is very useful for filtering and informing the frontend about the type of Subscription Link.
    Enum: "SUBSCRIPTION_PLAN", "MULTIPLE_SUBSCRIPTION_PLANS"

  - `updated_at` (string)
    Timestamp of when the object was last updated.

  - `_links` (object)

  - `_links.self` (object)
    Link to the resource that was used in the request.

  - `_links.self.href` (string)

## Response 400 fields (application/json):

  - `total` (integer, required)
    Total number of errors returned.

  - `_embedded` (object, required)
    Container for embedded error objects.

  - `_embedded.errors` (array)
    List of individual error objects.

  - `_embedded.errors.code` (string)
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

  - `_embedded.errors.logref` (string)
    A log reference identifier for the error, useful for debugging and support purposes.

  - `_embedded.errors.message` (string)
    A human-friendly error message.

  - `_embedded.errors._links` (object)
    Links related to this error.

  - `_embedded.errors._links.self` (object)
    Link to the resource related to the error.

  - `_embedded.errors._links.self.href` (string)
    URL of the related resource.

## Response 401 fields (application/json):

  - `total` (integer, required)
    Total number of errors returned.

  - `_embedded` (object, required)
    Container for embedded error objects.

  - `_embedded.errors` (array)
    List of individual error objects.

  - `_embedded.errors.code` (string)
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

  - `_embedded.errors.logref` (string)
    A log reference identifier for the error, useful for debugging and support purposes.

  - `_embedded.errors.message` (string)
    A human-friendly error message.

  - `_embedded.errors._links` (object)
    Links related to this error.

  - `_embedded.errors._links.self` (object)
    Link to the resource related to the error.

  - `_embedded.errors._links.self.href` (string)
    URL of the related resource.

## Response 403 fields (application/json):

  - `total` (integer, required)
    Total number of errors returned.

  - `_embedded` (object, required)
    Container for embedded error objects.

  - `_embedded.errors` (array)
    List of individual error objects.

  - `_embedded.errors.code` (string)
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

  - `_embedded.errors.logref` (string)
    A log reference identifier for the error, useful for debugging and support purposes.

  - `_embedded.errors.message` (string)
    A human-friendly error message.

  - `_embedded.errors._links` (object)
    Links related to this error.

  - `_embedded.errors._links.self` (object)
    Link to the resource related to the error.

  - `_embedded.errors._links.self.href` (string)
    URL of the related resource.

## Response 404 fields (application/json):

  - `total` (integer, required)
    Total number of errors returned.

  - `_embedded` (object, required)
    Container for embedded error objects.

  - `_embedded.errors` (array)
    List of individual error objects.

  - `_embedded.errors.code` (string)
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

  - `_embedded.errors.logref` (string)
    A log reference identifier for the error, useful for debugging and support purposes.

  - `_embedded.errors.message` (string)
    A human-friendly error message.

  - `_embedded.errors._links` (object)
    Links related to this error.

  - `_embedded.errors._links.self` (object)
    Link to the resource related to the error.

  - `_embedded.errors._links.self.href` (string)
    URL of the related resource.

## Response 406 fields (application/json):

  - `total` (integer, required)
    Total number of errors returned.

  - `_embedded` (object, required)
    Container for embedded error objects.

  - `_embedded.errors` (array)
    List of individual error objects.

  - `_embedded.errors.code` (string)
    The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request.

  - `_embedded.errors.logref` (string)
    A log reference identifier for the error, useful for debugging and support purposes.

  - `_embedded.errors.message` (string)
    A human-friendly error message.

  - `_embedded.errors._links` (object)
    Links related to this error.

  - `_embedded.errors._links.self` (object)
    Link to the resource related to the error.

  - `_embedded.errors._links.self.href` (string)
    URL of the related resource.


