Managing CL Functions Subscriptions

The Chainlink Functions Subscription Manager is available here. The Functions Subscription Manager lets you create a subscription, add consumers to it, remove consumers from it, fund it with LINK, and delete it.

When you connect to the Subscription Manager, choose the correct network, then click connect wallet.

Subscriptions

You use a Chainlink Functions subscription to pay for, manage, and track Functions requests.

Create a subscription

  1. Open functions.chain.link and click Create Subscription:

    Chainlink Functions subscription landing page
  2. Provide an email address and an optional subscription name:

    Chainlink Functions create subscription
  3. The first time that you interact with the Subscription Manager using your EOA, you have to approve the Terms of Service (ToS):

    Chainlink Functions accept ToS
  4. When you approve the ToS, a MetaMask popup appears that asks you to approve the subscription creation:

    Chainlink Functions approve subscriptions creation
  5. After the subscription is created, you are asked to sign a message in MetaMask to link the subscription name and email address to your subscription:

Chainlink Functions sign message ToS Chainlink Functions sign message ToS MetaMask
  1. After the subscription is created, fund it with LINK:

    Chainlink Functions subscription add funds
  2. After funding, you can add a consumer to it:

    Chainlink Functions subscription add consumer Chainlink Functions subscription add consumer
  3. After creation, you can fetch the details of your subscription:

    Chainlink Functions subscription details

Fund a subscription

  1. Open your subscription details and click Actions then click Fund subscription:

    Chainlink Functions click fund
  2. Fund your subscription. For instance, 0.1 LINK:

    Chainlink Functions add fund to your subscription
  3. A MetaMask popup appears, and you are asked to confirm the transaction. After you confirm the transaction, a confirmation screen appears:

    Chainlink Functions subscription funded

Add a consumer contract to a subscription

  1. Open your subscription details and click Add Consumer:

    Chainlink Functions add consumer
  2. Fill in the consumer address:

    Chainlink Functions provider consumer address
  3. A MetaMask popup appears, and you are asked to confirm the transaction. After you confirm the transaction, a confirmation screen appears:

    Chainlink Functions consumer added

Remove a consumer contract from a subscription

  1. Open your subscription details and click the consumer you want to remove, then Remove Consumer:

    Chainlink Functions remove consumer
  2. A MetaMask popup appears, and you are asked to confirm the transaction.

    Chainlink Functions confirm the removal of the consumer Chainlink Functions confirm the removal of the consumer in MetaMask
  3. After you confirm the transaction, a confirmation screen appears:

    Chainlink Functions consumer removed

Cancel a subscription

Note: You cannot cancel a subscription if there are in-flight requests. In-flight requests are requests that still need to be fulfilled.

  1. Open your subscription details, click Actions, then Cancel subscription:

    Chainlink Functions cancel subscription
  2. Fill in the receiver address of the remaining funds:

    Chainlink Functions cancel subscription
  3. A MetaMask popup appears, and you are asked to confirm the transaction.

    Chainlink Functions confirm the removal of the subscription Chainlink Functions confirm the removal of the subscription in MetaMask
  4. After you confirm the transaction, a confirmation screen appears:

    Chainlink Functions subscription canceled

Time out pending requests manually

The Subscription Manager provides the option to time out requests manually. You can time out requests that have been pending for longer than five minutes to unlock your subscription funds.

  1. Open your subscription details and scroll to the Pending section. If a request has been pending longer than five minutes, its status displays as Time out required. Click the link within the red banner that says Time out request:

    Pending Functions request eligible for timeout

    If you have multiple requests that are eligible for timeout, the Time out request link in the red banner times out all the requests at once.

    Alternatively, you can time out an individual request. Open the Actions menu for that request, and click Time out request:

    Individual request timeout
  2. A MetaMask popup appears, and you are asked to confirm the transaction:

    Prompt to approve timeout transaction
  3. After you confirm the transaction, a confirmation screen appears:

    Timeout transaction confirmation
  4. The subscription details page displays another confirmation in the upper right corner showing that the request has been timed out successfully:

    Request timed out dialog
  5. The timed out request appears in the Failed fulfillments tab of the History section:

    Chainlink Functions subscription canceled

Get the latest Chainlink content straight to your inbox.