Block Cryptolens licenses after full PayWhirl refunds

Block one lifetime Cryptolens license after PayWhirl confirms a full refund on the linked single-license invoice and charge.

12 stepsFinanceOperations

Free to start, no card required.

How it works

  1. When this happens

    Receive a signed refund event

    Webhook

  2. Step 1 · Code

    Check the invoice and charge IDs

  3. Step 2

    Check the refund event

    Follows the first path that matches

    • Refund reference found

      1. Step 3 · Paywhirl

        Read the original invoice

      2. Step 4 · Paywhirl

        Read the refunded charge

      3. Step 5 · Code

        Verify the single-license refund

      4. Step 6

        Check the verified refund

        Follows the first path that matches

        • Full refund for one license

          1. Step 7 · Cryptolens

            Look up keys for the original invoice

          2. Step 8 · Code

            Match one unblocked license

          3. Step 9

            Check the matched key

            Follows the first path that matches

            • One matching unblocked key

              1. Step 10 · Cryptolens

                Block the refunded license

              2. Step 11 · Code

                Confirm the block

            • Otherwise

              Nothing happens

        • Otherwise

          Nothing happens

    • Otherwise

      Nothing happens

Before you start

Register charge.refunded in PayWhirl Classic with the same signing secret as the trigger. Enter the SKU for single-license USD purchases and its Cryptolens product ID. When issuing each key, set its entire Notes field to paywhirl: followed by the original invoice ID and allow GetKeys and BlockKey on that product.

Accounts to connect

See all 200 in Finance

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template