> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Pay Link

> Update the details of a paylink.

<Info>
  **Note:** When using the production environment at [moonpay.hel.io](http://app.hel.io), set your API endpoint to `api.hel.io/v1` and generate API keys there. For the development environment, use `api.dev.hel.io/v1` and generate API keys from [moonpay.dev.hel.io](http://app.dev.hel.io).
</Info>


## OpenAPI

````yaml PATCH /v1/paylink/{id}/api-key
openapi: 3.0.0
info:
  title: Helio Open API
  description: |-
    API schema and definitions for Helio API. <br/> 
          The API is using two types of Authentication, for dashboard endpoints we use <b>JSON Web Token (JWT)</b> that is generated by self custodial wallet signing a message from API.</br> 
          We also support authentication with <b>API Key and Secret</b> which can be generated on <a href='https://hel.io'>Helio dashboard</a>.
  version: 1.0.0
  contact: {}
servers:
  - description: Helio API (Mainnet)
    url: https://api.hel.io
  - description: Helio API (Devnet)
    url: https://api.dev.hel.io
security: []
tags:
  - name: Webhooks
  - name: Exports
  - name: Currencies
    description: >-
      Supported currencies endpoint, includes fiat and digital assets
      </br><i>Authentication: </i><b>None</b>
externalDocs:
  description: Helio product documentation
  url: https://docs.hel.io/
paths:
  /v1/paylink/{id}/api-key:
    patch:
      tags:
        - Paylink
      summary: Update a Pay Link
      description: Update the details of a paylink.
      operationId: PaylinkController_updatePaylinkViaApi
      parameters:
        - name: id
          in: path
          required: true
          description: The unique ID of the pay link you want to update.
          schema:
            type: string
        - name: apiKey
          in: query
          required: true
          description: Your API key can be generated from the Helio Dashboard settings.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePaylinkWithApiDto'
      responses:
        '200':
          description: Paylink successfully updated.
          content:
            application/json:
              examples:
                success:
                  summary: Full updated paylink response
                  value:
                    id: paylink_id
                    platform: HELIO
                    description: ''
                    template: OTHER
                    disabled: false
                    inactive: false
                    notifySenderByEmail: false
                    notifyReceiverByEmail: false
                    addDiscordRole: false
                    addTelegramGroup: false
                    features:
                      canChangeQuantity: false
                      canChangePrice: false
                      requireQuantityLimits: false
                      requireCountry: false
                      requireEmail: false
                      requireDeliveryAddress: false
                      requireDiscordUsername: false
                      requireDiscordLogin: false
                      requireFullName: false
                      requirePhoneNumber: false
                      requireTwitterUsername: false
                      requireTelegramUsername: false
                      requireProductDetails: false
                      requireMaxTransactions: false
                      requireNftGate: false
                      requireDiscordAuth: false
                      requireAccessCode: false
                      requireXFollow: false
                      requireRaffle: false
                      splitRevenue: false
                      splitEqually: true
                      canSwapTokens: true
                      canPayWithCard: true
                      nftDropEnabled: false
                      showDiscountCode: true
                      isEscrowed: false
                      requireAllowlist: false
                      allowAffiliate: false
                      isEventEnabled: false
                      enableCountdown: false
                      requireCaptchaValidation: false
                      shouldRedirectOnSuccess: false
                      customThemeEnabled: false
                      isSubscription: false
                      showDetailsForCharge: false
                      hasRedirectQueryParams: false
                    maxTransactions: 1
                    name: Test Paylink
                    nftCollectionAddress: ''
                    discordAuthDetails: []
                    dynamic: false
                    affiliateDetails: null
                    price: '1000'
                    normalizedPrice: '1000'
                    redirectUrl: ''
                    redirectQueryParams: []
                    customTheme:
                      primaryColor: '#F76C1B'
                      neutralColor: '#5A6578'
                      themeMode: LIGHT
                      textColorOnButton: BLACK
                      backgroundColor: '#F9F9F9'
                    createdAt: '2025-01-01T00:00:00.000Z'
                    updatedAt: '2025-01-01T00:00:00.000Z'
                    creator:
                      id: creator_id_123
                      userType: MERCHANT
                      email: user@example.com
                      name: Example User
                      isDisabled: false
                      kycVerified: false
                      platformDetails:
                        platform: HELIO
                      roles: []
                      wallets:
                        - id: wallet_id_123
                          name: Primary Wallet
                          btcProperties: null
                          blockchainEngine: null
                      payoutWallets: []
                    company:
                      id: company_id_123
                      name: Example Company
                      email: contact@example.com
                      websiteUrl: ''
                      discordUsername: ''
                      address: ''
                      phoneNumber: ''
                      escrowFunds: false
                      twitterConfirmed: false
                      kycVerified: false
                      kybVerified: false
                      logoUrl: attachments/example_logo.png
                    currency:
                      id: currency_id_123
                      name: USD Coin
                      decimals: 6
                      order: 100
                      mintAddress: USDC_mint_address
                      coinMarketCapId: 3408
                      symbol: USDC
                      symbolPrefix: $
                      type: DIGITAL
                      iconUrl: USDC.svg
                      features:
                        - PAYMENT_PRICING
                        - PAYMENT_RECIPIENT
                        - SWAP
                      orderingType: NUMERIC
                      blockchain:
                        id: blockchain_id_123
                        name: SOL
                        symbol: SOL
                        engine:
                          id: engine_id_123
                          type: SOL
                    wallet:
                      id: wallet_id_123
                      name: Primary Wallet
                      publicKey: ExamplePublicKey1234567890
                      btcProperties: null
                      type: EXTENSION
                      blockchainEngine:
                        id: engine_id_123
                        type: SOL
                    recipients:
                      - currency:
                          id: currency_id_123
                          name: USD Coin
                          decimals: 6
                          order: 100
                          mintAddress: USDC_mint_address
                          coinMarketCapId: 3408
                          symbol: USDC
                          symbolPrefix: $
                          type: DIGITAL
                          iconUrl: USDC.svg
                          features:
                            - PAYMENT_PRICING
                            - PAYMENT_RECIPIENT
                            - SWAP
                          orderingType: NUMERIC
                          blockchain:
                            id: blockchain_id_123
                            name: SOL
                            symbol: SOL
                            engine:
                              id: engine_id_123
                              type: SOL
                        wallet:
                          id: wallet_id_123
                          name: Recipient Wallet
                          publicKey: RecipientPublicKey1234567890
                          btcProperties: null
                          type: EXTENSION
                          blockchainEngine:
                            id: engine_id_123
                            type: SOL
                    product: null
                    discountCodes: []
                    pricingCurrency:
                      id: currency_id_123
                      name: USD Coin
                      decimals: 6
                      order: 100
                      mintAddress: USDC_mint_address
                      coinMarketCapId: 3408
                      symbol: USDC
                      symbolPrefix: $
                      type: DIGITAL
                      iconUrl: USDC.svg
                      features:
                        - PAYMENT_PRICING
                        - PAYMENT_RECIPIENT
                        - SWAP
                      orderingType: NUMERIC
                      blockchain:
                        id: blockchain_id_123
                        name: SOL
                        symbol: SOL
                        engine:
                          id: engine_id_123
                          type: SOL
        '401':
          description: Provided API key is invalid or unauthorized.
          content:
            application/json:
              examples:
                unauthorized:
                  summary: Invalid or missing API key
                  value:
                    message: API key or token is invalid
                    code: 401
      security:
        - bearer: []
components:
  schemas:
    UpdatePaylinkWithApiDto:
      type: object
      properties:
        name:
          type: string
          description: Name or title of the pay link product or service.
        price:
          type: string
          description: >-
            Price is an int64 represented in base units of the currency, e.g.
            "1000000" = 1 USDC.
        pricingCurrency:
          type: string
          description: >-
            Currency ID used to price the paylink (fiat or crypto). Retrieve
            this value from the Get Currencies endpoint.
        features:
          $ref: '#/components/schemas/UpdateLinkFeaturesDto'
          description: Feature flags and behavioral options for the pay link.
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/RecipientDto'
          description: List of recipient wallets and currencies.
        splitWallets:
          type: array
          items:
            $ref: '#/components/schemas/SplitWalletDto'
          description: List of wallets to distribute the payment among.
        discountCodes:
          type: array
          items:
            $ref: '#/components/schemas/DiscountCodeDto'
          description: Array of discount codes applicable to the pay link.
        limitSaleType:
          type: string
          enum:
            - transaction
            - discordId
          description: Restricts sales to a transaction count or specific Discord ID.
        minQuantity:
          type: number
          description: Minimum quantity a user must purchase.
        maxQuantity:
          type: number
          description: Maximum quantity a user can purchase.
        affiliateDetails:
          $ref: '#/components/schemas/AffiliateDetailsDto'
          description: Settings for affiliate tracking and revenue sharing.
        raffleDetails:
          $ref: '#/components/schemas/RaffleDetailsDto'
          description: Configuration for raffle-based sales.
        redirectUrl:
          type: string
          description: URL to redirect users after completing the payment.
        redirectTimeout:
          type: integer
          description: >-
            Delay (in seconds) before redirecting the user to `redirectUrl`
            after a successful payment. Use 0 for an instant redirect, or 3 to
            show the confirmation screen for 3 seconds before redirecting.
          enum:
            - 0
            - 3
          default: 3
          example: 0
        creationSource:
          type: string
          enum:
            - PRIVATE_API
            - PUBLIC_API
          description: >-
            Indicates whether the pay link was created via private or public
            API.
        subscriptionDetails:
          $ref: '#/components/schemas/SubscriptionDetailsDto'
          description: Subscription settings for recurring payments.
        description:
          type: string
          description: Description of the product or service offered.
        notifySenderByEmail:
          type: boolean
          default: false
          description: If true, notifies the sender via email after a successful payment.
        notifyReceiverByEmail:
          type: boolean
          default: false
          description: If true, notifies the receiver via email after a successful payment.
        addDiscordRole:
          type: boolean
          default: false
          description: Automatically assigns a Discord role upon successful payment.
        discordRoleIds:
          type: array
          items:
            type: string
          description: List of Discord role IDs to be assigned.
        disabled:
          type: boolean
          description: If true, disables the pay link without deleting it.
        dynamic:
          type: boolean
          description: Enables dynamic pricing features for the pay link.
        content:
          $ref: '#/components/schemas/ContentDto'
          description: Additional content like files or links associated with the pay link.
        maxTransactions:
          type: number
          description: Maximum number of transactions allowed for this pay link.
        product:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ProductDto'
          description: Optional product object associated with the pay link.
        nftCollectionAddress:
          type: string
          description: Blockchain address of the NFT collection used in this pay link.
        discordAuthDetails:
          type: array
          items:
            $ref: '#/components/schemas/DiscordAuthDetailsDto'
          description: Details for Discord authentication and role assignment.
        accessCodeAuthProperties:
          $ref: '#/components/schemas/AccessCodeAuthPropertiesDto'
          description: Access code configuration for gated content or purchases.
        eventDetails:
          $ref: '#/components/schemas/EventDetailsDto'
          description: Event-related configuration like dates and venues.
        countdownDetails:
          $ref: '#/components/schemas/CountdownDetailsDto'
          description: Countdown timer settings for scheduled launches.
        customTheme:
          $ref: '#/components/schemas/CustomThemeDto'
          description: Applies a custom color scheme to the paylink.
    UpdateLinkFeaturesDto:
      type: object
      properties:
        splitRevenue:
          type: boolean
        splitEqually:
          type: boolean
        canChangeQuantity:
          type: boolean
        requireQuantityLimits:
          type: boolean
        canChangePrice:
          type: boolean
        isEscrowed:
          type: boolean
        showDiscountCode:
          type: boolean
        requireAllowlist:
          type: boolean
        requireRaffle:
          type: boolean
        shouldRedirectOnSuccess:
          type: boolean
        requireEmail:
          type: boolean
        requireDiscordUsername:
          type: boolean
        requireDiscordLogin:
          type: boolean
        requireFullName:
          type: boolean
        requireTwitterUsername:
          type: boolean
        requireTelegramUsername:
          type: boolean
        requireCountry:
          type: boolean
        requireDeliveryAddress:
          type: boolean
        requirePhoneNumber:
          type: boolean
        requireProductDetails:
          type: boolean
        requireMaxTransactions:
          type: boolean
        requireNftGate:
          type: boolean
        requireDiscordAuth:
          type: boolean
        requireAccessCode:
          type: boolean
        requireXFollow:
          type: boolean
        canSwapTokens:
          type: boolean
        canPayWithCard:
          type: boolean
        allowAffiliate:
          type: boolean
        enableCountdown:
          type: boolean
        customThemeEnabled:
          type: boolean
    RecipientDto:
      type: object
      properties:
        currencyId:
          type: string
          description: Currency ID retrieved from the Get Currencies endpoint.
        walletId:
          type: string
          description: >-
            Wallet ID (Helio ID) copied from Dashboard → Settings → Wallets (not
            your public key).
        sourceBlockchainEngine:
          type: string
          description: >-
            Optional blockchain engine identifier for the source of the
            transaction. Use `63b6b1200cfb4b3f6131f2b4` for Solana or
            `63b6b1200cfb4b3f6131f2b2` for EVM and `63da34127a40a721a6e0a21d`
            for Bitcoin.
      required:
        - currencyId
        - walletId
    SplitWalletDto:
      type: object
      properties:
        address:
          type: string
          description: >-
            Enter the wallet address that should receive a portion of the funds
            from this payment.
        percent:
          type: number
          description: >-
            Specify the percentage of the total payment to allocate to this
            wallet.
      required:
        - address
    DiscountCodeDto:
      type: object
      properties:
        percent:
          type: number
          description: >-
            Enter the discount percentage to apply when this code is used (e.g.,
            15 for 15%).
        token:
          type: string
        prId:
          type: string
        id:
          type: string
        tokenType:
          type: string
          enum:
            - CODE
            - NFT_COLLECTION
          description: >-
            Specify whether this discount is based on a standard code or an NFT
            collection.
      required:
        - percent
        - token
        - tokenType
    AffiliateDetailsDto:
      type: object
      properties:
        bps:
          type: number
          description: Specify the affiliate commission as basis points (1% = 100 bps).
      required:
        - bps
    RaffleDetailsDto:
      type: object
      properties: {}
    SubscriptionDetailsDto:
      type: object
      properties:
        renewalReminders:
          type: number
          description: >-
            Specify how many reminder emails should be sent before the
            subscription renews.
        gracePeriod:
          type: number
          description: >-
            Enter the number of days allowed as a grace period after a failed
            renewal attempt.
        annualDiscountBps:
          type: number
          description: >-
            Define the annual subscription discount in basis points (1% = 100
            bps).
        interval:
          type: string
          enum:
            - MONTH
            - QUARTER
            - BIANNUALLY
            - YEAR
          description: Choose how often the subscription renews.
        isAnonymous:
          type: boolean
          description: Set to true if the subscription should be anonymous. Optional.
      required:
        - renewalReminders
        - gracePeriod
        - annualDiscountBps
        - interval
    ContentDto:
      type: object
      properties:
        text:
          type: string
        mediaUrl:
          type: string
        mediaAttachmentId:
          type: string
    ProductDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - TEXT
            - SELECTOR
        active:
          type: boolean
      required:
        - name
        - description
        - type
    DiscordAuthDetailsDto:
      type: object
      properties:
        serverId:
          type: string
        roleId:
          type: string
      required:
        - serverId
        - roleId
    AccessCodeAuthPropertiesDto:
      type: object
      properties:
        accessCode:
          type: string
      required:
        - accessCode
    EventDetailsDto:
      type: object
      properties:
        datetime:
          type: string
          format: date-time
        location:
          type: string
        timezoneLocation:
          type: string
      required:
        - datetime
    CountdownDetailsDto:
      type: object
      properties:
        startDatetime:
          type: string
          format: date-time
        endDatetime:
          type: string
          format: date-time
        timezoneLocation:
          type: string
      required:
        - startDatetime
    CustomThemeDto:
      type: object
      properties:
        primaryColor:
          type: string
          description: 'Hex code for the primary color (e.g. #FF0000).'
        neutralColor:
          type: string
          description: 'Hex code for neutral colour(e.g. #00FF00).'
        textColorOnButton:
          type: string
          enum:
            - WHITE
            - BLACK
          description: Text color used on buttons.
        themeMode:
          type: string
          enum:
            - LIGHT
            - DARK
          description: Visual theme of the UI.
        backgroundColor:
          type: string
          description: 'Hex code for the background color (e.g. #0000FF).'
      required:
        - primaryColor
        - neutralColor
        - textColorOnButton
        - themeMode
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authentication using JWT token

````