> ## 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.

# Create a Pay Link

> Create a new paylink using your API key with full control over pricing, currency, and payout configuration.

<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 POST /v1/paylink/create/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/create/api-key:
    post:
      tags:
        - Paylink
      summary: Create a Pay Link
      description: >-
        Create a new paylink using your API key with full control over pricing,
        currency, and payout configuration.
      operationId: PaylinkController_createPaylinkWithApiKey
      parameters:
        - name: apiKey
          required: true
          in: query
          description: API key can be generated on helio dashboard settings page
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaylinkWithApiDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShallowEnrichedPaylink'
              examples:
                success:
                  summary: Successful pay link creation
                  value:
                    id: 6812817fcf4943d0f0e4d5a1
                    platform: HELIO
                    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
                      canSwapTokens: false
                      canPayWithCard: true
                      nftDropEnabled: false
                      showDiscountCode: false
                      isEscrowed: false
                      requireAllowlist: false
                      allowAffiliate: false
                      isEventEnabled: false
                      enableCountdown: false
                      requireCaptchaValidation: false
                      shouldRedirectOnSuccess: true
                      customThemeEnabled: false
                      isSubscription: false
                      showDetailsForCharge: false
                      hasRedirectQueryParams: true
                    name: Query Params Pay Link Test
                    discordAuthDetails: []
                    dynamic: false
                    affiliateDetails: null
                    price: '10000'
                    normalizedPrice: '10000'
                    redirectUrl: https://www.google.com/
                    redirectTimeout: 3
                    redirectQueryParams:
                      - queryParamType: WALLET_ADDRESS
                    content: {}
                    creator:
                      id: 667c1f9352919e407156128a
                      userType: MERCHANT
                      email: jesse.baffour@helio.co
                      name: ''
                      isDisabled: false
                      kycVerified: false
                      platformDetails:
                        platform: HELIO
                    company:
                      id: 667c1f9352919e407156128c
                      name: Helio
                      email: jesse@hel.io
                      websiteUrl: ''
                      discordUsername: ''
                      address: ''
                      phoneNumber: ''
                      escrowFunds: false
                      twitterConfirmed: false
                      kycVerified: false
                      kybVerified: false
                    currency:
                      id: 6340313846e4f91b8abc519b
                      name: USD Coin
                      decimals: 6
                      order: 1
                      mintAddress: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      coinMarketCapId: 3408
                      symbol: USDC
                      symbolPrefix: $
                      type: DIGITAL
                      iconUrl: USDC.svg
                      features:
                        - PAYMENT_PRICING
                        - PAYMENT_RECIPIENT
                        - SWAP
                      blockchain:
                        id: 6340313846e4f91b8abc515c
                        name: SOL
                        symbol: SOL
                        engine:
                          id: 63b6b1200cfb4b3f6131f2b4
                          type: SOL
                    wallet:
                      id: 667c1f9352919e4071561294
                      name: ''
                      publicKey: 7YancRyNQyp9s6G7YNwx9H93UqswoKWqF9GuNJPufyvW
                      btcProperties: null
                      type: EXTENSION
                    recipients:
                      - currency:
                          id: 6340313846e4f91b8abc519b
                          name: USD Coin
                          decimals: 6
                          order: 1
                          mintAddress: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                          coinMarketCapId: 3408
                          symbol: USDC
                          symbolPrefix: $
                          type: DIGITAL
                          iconUrl: USDC.svg
                          features:
                            - PAYMENT_PRICING
                            - PAYMENT_RECIPIENT
                            - SWAP
                          blockchain:
                            id: 6340313846e4f91b8abc515c
                            name: SOL
                            symbol: SOL
                            engine:
                              id: 63b6b1200cfb4b3f6131f2b4
                              type: SOL
                        wallet:
                          id: 667c1f9352919e4071561294
                          name: ''
                          publicKey: 7YancRyNQyp9s6G7YNwx9H93UqswoKWqF9GuNJPufyvW
                          btcProperties: null
                          type: EXTENSION
                          blockchainEngine:
                            id: 63b6b1200cfb4b3f6131f2b4
                            type: SOL
                    volume: 0
                    sales: '0'
                    product: null
                    additionalImages: []
                    additionalImageUrls: []
                    discountCodes: []
                    discordRoleIds: []
                    telegramGroupIds: []
                    pricingCurrency:
                      id: 6340313846e4f91b8abc519b
                      name: USD Coin
                      decimals: 6
                      order: 1
                      mintAddress: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      coinMarketCapId: 3408
                      symbol: USDC
                      symbolPrefix: $
                      type: DIGITAL
                      iconUrl: USDC.svg
                      features:
                        - PAYMENT_PRICING
                        - PAYMENT_RECIPIENT
                        - SWAP
                      blockchain:
                        id: 6340313846e4f91b8abc515c
                        name: SOL
                        symbol: SOL
                        engine:
                          id: 63b6b1200cfb4b3f6131f2b4
                          type: SOL
                    createdAt: '2025-04-30T20:01:03.910Z'
        '401':
          description: Provided API key has no access to the resource.
          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:
    CreatePaylinkWithApiDto:
      type: object
      required:
        - name
        - price
        - pricingCurrency
        - features
        - recipients
      properties:
        template:
          type: string
          enum:
            - PRODUCT
            - SUBSCRIPTION
            - PRE_SALE
            - SINGLE_NFT
            - VIDEO
            - DISCORD_MEMBERSHIP
            - INVOICE
            - EMBEDDED
            - LINK_OR_FILE
            - TRADING_VIEW
            - EVENT
            - WOO_COMMERCE
            - OTHER
            - LEGACY
            - RAFFLE
            - SHOPIFY
            - BLINK
          description: Layout or presentation style of the pay link checkout.
        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/CreateLinkFeaturesDto'
          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.
        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
        redirectQueryParams:
          type: array
          items:
            $ref: '#/components/schemas/RedirectQueryParamDto'
          description: >-
            Appends dynamic query parameters (e.g. the payer's wallet address)
            to the redirect URL after a successful payment. Requires
            `shouldRedirectOnSuccess` and `hasRedirectQueryParams` to be enabled
            in `features`.
        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.
    ShallowEnrichedPaylink:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentResponse'
        limitSaleType:
          enum:
            - transaction
            - discordId
          type: string
        minQuantity:
          type: number
        maxQuantity:
          type: number
        features:
          $ref: '#/components/schemas/LinkFeatures'
        affiliateDetails:
          $ref: '#/components/schemas/AffiliateDetails'
        raffleDetails:
          $ref: '#/components/schemas/RaffleDetails'
        subscriptionDetails:
          $ref: '#/components/schemas/SubscriptionDetails'
        redirectUrl:
          type: string
      required:
        - content
        - features
    CreateLinkFeaturesDto:
      type: object
      properties:
        canChangeQuantity:
          type: boolean
          description: Allows the buyer to change the quantity during checkout.
        requireQuantityLimits:
          type: boolean
          description: Enforces minimum and maximum quantity limits.
        canChangePrice:
          type: boolean
          description: Allows the buyer or merchant to adjust the price.
        isEscrowed:
          type: boolean
          description: Enables escrow functionality for holding funds temporarily.
        showDiscountCode:
          type: boolean
          description: Displays the option to enter a discount code.
        requireAllowlist:
          type: boolean
          description: Restricts access to users on an allowlist.
        requireRaffle:
          type: boolean
          description: Requires participation in a raffle to proceed.
        shouldRedirectOnSuccess:
          type: boolean
          description: Redirects the user to a specified URL after successful payment.
        isSubscription:
          type: boolean
          description: Indicates the pay link is for a recurring subscription.
        showDetailsForCharge:
          type: boolean
          description: Enables pay link name, description and image on a charge.
        isEventEnabled:
          type: boolean
          description: Enables features related to event registration or access.
        requireEmail:
          type: boolean
          description: Requires the user to enter an email address.
        requireDiscordUsername:
          type: boolean
          description: Requires the user to provide their Discord username.
        requireDiscordLogin:
          type: boolean
          description: Requires the user to authenticate with Discord.
        requireFullName:
          type: boolean
          description: Requires the user to provide their full name.
        requireTwitterUsername:
          type: boolean
          description: Requires the user to provide their Twitter username.
        requireTelegramUsername:
          type: boolean
          description: Requires the user to provide their Telegram username.
        requireCountry:
          type: boolean
          description: Requires the user to select or provide their country.
        requireDeliveryAddress:
          type: boolean
          description: Requires a delivery address for fulfillment.
        requirePhoneNumber:
          type: boolean
          description: Requires the user to provide a phone number.
        requireProductDetails:
          type: boolean
          description: Requires additional product-related details from the user.
        requireMaxTransactions:
          type: boolean
          description: Limits the total number of transactions allowed.
        requireNftGate:
          type: boolean
          description: Restricts access to users holding a specific NFT.
        requireDiscordAuth:
          type: boolean
          description: Enforces Discord-based authentication.
        requireAccessCode:
          type: boolean
          description: Requires users to enter an access code for entry.
        requireXFollow:
          type: boolean
          description: Requires users to follow a specific X (Twitter) account.
        canSwapTokens:
          type: boolean
          description: Enables users to swap tokens during the payment process.
        canPayWithCard:
          type: boolean
          description: >-
            Enables the buyer to pay with a card via MoonPay Ramps. Requires
            MoonPay API keys configured on the merchant account.
        allowAffiliate:
          type: boolean
          description: Enables affiliate tracking and referral features.
        enableCountdown:
          type: boolean
          description: Activates a countdown timer before the pay link is active.
        customThemeEnabled:
          type: boolean
          description: Allows use of a custom design theme for the pay link.
    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
    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: {}
    RedirectQueryParamDto:
      type: object
      required:
        - queryParamType
      properties:
        queryParamType:
          type: string
          enum:
            - WALLET_ADDRESS
          description: The type of dynamic query parameter to append to the redirect URL.
        value:
          type: string
          description: Optional custom value for the query parameter.
    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
    ContentResponse:
      type: object
      properties: {}
    LinkFeatures:
      type: object
      properties:
        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
        splitRevenue:
          type: boolean
        splitEqually:
          type: boolean
        requireNftGate:
          type: boolean
        requireDiscordAuth:
          type: boolean
        requireAccessCode:
          type: boolean
        requireXFollow:
          type: boolean
        canSwapTokens:
          type: boolean
        canPayWithCard:
          type: boolean
        nftDropEnabled:
          type: boolean
        showDiscountCode:
          type: boolean
        allowAffiliate:
          type: boolean
        isEventEnabled:
          type: boolean
        enableCountdown:
          type: boolean
        shouldRedirectOnSuccess:
          type: boolean
        customThemeEnabled:
          type: boolean
        hasRedirectQueryParams:
          type: boolean
        isHelioPlay:
          type: boolean
        canChangePrice:
          type: boolean
        requireQuantityLimits:
          type: boolean
        canChangeQuantity:
          type: boolean
        isEscrowed:
          type: boolean
        requireAllowlist:
          type: boolean
        requireAirdrop:
          type: boolean
        requireRaffle:
          type: boolean
        requireCaptchaValidation:
          type: boolean
        isSubscription:
          type: boolean
        hasStripeApiKey:
          type: boolean
    AffiliateDetails:
      type: object
      properties:
        bps:
          type: number
      required:
        - bps
    RaffleDetails:
      type: object
      properties:
        maxEntries:
          type: number
        winners:
          type: number
        maxPurchaseQuantity:
          type: number
        endDatetime:
          type: string
          format: date-time
        timezoneLocation:
          type: string
        state:
          type: string
          enum:
            - RAFFLE_STARTED
            - PICKING_WINNERS
            - CREATING_ALLOWLIST
            - FINALIZING_RAFFLE
      required:
        - winners
        - maxPurchaseQuantity
        - endDatetime
        - timezoneLocation
        - state
    SubscriptionDetails:
      type: object
      properties:
        renewalReminders:
          type: number
        gracePeriod:
          type: number
        annualDiscountBps:
          type: number
        interval:
          type: string
          enum:
            - SECOND
            - MINUTE
            - HOUR
            - DAY
            - WEEK
            - MONTH
            - YEAR
        isAnonymous:
          type: boolean
          description: Set to true if the subscription should be anonymous. Optional.
      required:
        - renewalReminders
        - gracePeriod
        - annualDiscountBps
        - interval
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authentication using JWT token

````