← Stripe + Supernotes integrations

Create a simple card with Supernotes API on New Custom Webhook Events from Stripe API

Pipedream makes it easy to connect APIs for Supernotes, Stripe and 1200+ other apps remarkably fast.

Trigger workflow on
New Custom Webhook Events from the Stripe API
Next, do this
Create a simple card with the Supernotes API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Stripe trigger and Supernotes action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Custom Webhook Events trigger
    1. Connect your Stripe account
    2. Select one or more Events
  3. Configure the Create a simple card action
    1. Connect your Supernotes account
    2. Configure Name
    3. Configure Markup
    4. Optional- Select a Icon
    5. Optional- Configure Tags
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event on each webhook event
Version:0.0.5
Key:stripe-custom-webhook-events

Stripe Overview

With Stripe, you can easily accept payments online. Stripe provides a simple
and powerful way to accept payments over the internet. With Stripe, you can
easily

  • Accept payments from major credit and debit cards
  • Process payments in over 130 currencies
  • Set up recurring billing
  • Accept Apple Pay, Google Pay, and other alternative payment methods
  • And much more!

Trigger Code

import stripe from "../../stripe.app.mjs";
import constants from "../common/constants.mjs";

export default {
  key: "stripe-custom-webhook-events",
  name: "New Custom Webhook Events",
  type: "source",
  version: "0.0.5",
  description: "Emit new event on each webhook event",
  props: {
    stripe,
    enabledEvents: {
      type: "string[]",
      label: "Events",
      description: "Events to listen for. Select `*` for all events",
      options: constants.WEBHOOK_EVENTS,
      default: [
        "*",
      ],
    },
    /* eslint-disable pipedream/props-label */
    /* eslint-disable pipedream/props-description */
    http: {
      type: "$.interface.http",
      customResponse: true,
    },
    /* eslint-enable pipedream/props-description */
    /* eslint-enable pipedream/props-label */
    db: "$.service.db",
  },
  hooks: {
    async activate() {
      let enabledEvents = this.enabledEvents;
      if (enabledEvents.includes("*")) enabledEvents = [
        "*",
      ];
      const endpoint = await this.stripe.sdk().webhookEndpoints.create({
        url: this.http.endpoint,
        enabled_events: enabledEvents,
      });
      this.db.set("endpoint", JSON.stringify(endpoint));

      for (const eventType of this.enabledEvents) {
        const events = await this.stripe.getEvents({
          eventType,
        });

        for (const event of events) {
          this.emit(event);
        }
      }
    },
    async deactivate() {
      const endpoint = this.getEndpoint();
      this.db.set("endpoint", null);
      if (!endpoint) return;
      const confirmation = await this.stripe.sdk().webhookEndpoints.del(endpoint.id);
      if ("deleted" in confirmation && !confirmation.deleted) {
        throw new Error("endpoint not deleted");
      }
    },
  },
  run(event) {
    const endpoint = this.getEndpoint();
    if (!endpoint) {
      this.http.respond({
        status: 500,
      });
      throw new Error("endpoint config missing from db");
    }
    const sig = event.headers["stripe-signature"];
    try {
      event = this.stripe.sdk().webhooks.constructEvent(event.bodyRaw, sig, endpoint.secret);
    } catch (err) {
      this.http.respond({
        status: 400,
        body: err.message,
      });
      console.log(err.message);
      return;
    }
    this.http.respond({
      status: 200,
    });

    this.emit(event);
  },
  methods: {
    emit(event) {
      this.$emit(event, {
        id: event.id,
        summary: `New event ${event.type} with id ${event.data.id}`,
        ts: Date.parse(event.created),
      });
    },
    getEndpoint() {
      let endpoint;
      const endpointJson = this.db.get("endpoint");
      try {
        endpoint = JSON.parse(endpointJson);
      } catch (err) {
        console.error(err);
      }
      return endpoint;
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
StripestripeappThis component uses the Stripe app.
EventsenabledEventsstring[]Select a value from the drop down menu:*account.application.authorizedaccount.application.deauthorizedaccount.external_account.createdaccount.external_account.deletedaccount.external_account.updatedaccount.updatedapplication_fee.createdapplication_fee.refund.updatedapplication_fee.refundedbalance.availablecapability.updatedcharge.capturedcharge.dispute.closedcharge.dispute.createdcharge.dispute.funds_reinstatedcharge.dispute.funds_withdrawncharge.dispute.updatedcharge.expiredcharge.failedcharge.pendingcharge.refund.updatedcharge.refundedcharge.succeededcharge.updatedcheckout.session.async_payment_failedcheckout.session.async_payment_succeededcheckout.session.completedcoupon.createdcoupon.deletedcoupon.updatedcredit_note.createdcredit_note.updatedcredit_note.voidedcustomer.createdcustomer.deletedcustomer.discount.createdcustomer.discount.deletedcustomer.discount.updatedcustomer.source.createdcustomer.source.deletedcustomer.source.expiringcustomer.source.updatedcustomer.subscription.createdcustomer.subscription.deletedcustomer.subscription.pending_update_appliedcustomer.subscription.pending_update_expiredcustomer.subscription.trial_will_endcustomer.subscription.updatedcustomer.tax_id.createdcustomer.tax_id.deletedcustomer.tax_id.updatedcustomer.updatedfile.createdinvoice.createdinvoice.deletedinvoice.finalizedinvoice.marked_uncollectibleinvoice.paidinvoice.payment_action_requiredinvoice.payment_failedinvoice.payment_succeededinvoice.sentinvoice.upcominginvoice.updatedinvoice.voidedinvoiceitem.createdinvoiceitem.deletedinvoiceitem.updatedissuing_authorization.createdissuing_authorization.requestissuing_authorization.updatedissuing_card.createdissuing_card.updatedissuing_cardholder.createdissuing_cardholder.updatedissuing_dispute.createdissuing_dispute.funds_reinstatedissuing_dispute.updatedissuing_transaction.createdissuing_transaction.updatedmandate.updatedorder.createdorder.payment_failedorder.payment_succeededorder.updatedorder_return.createdpayment_intent.amount_capturable_updatedpayment_intent.canceledpayment_intent.createdpayment_intent.payment_failedpayment_intent.processingpayment_intent.succeededpayment_method.attachedpayment_method.card_automatically_updatedpayment_method.detachedpayment_method.updatedpayout.canceledpayout.createdpayout.failedpayout.paidpayout.updatedperson.createdperson.deletedperson.updatedplan.createdplan.deletedplan.updatedprice.createdprice.deletedprice.updatedproduct.createdproduct.deletedproduct.updatedradar.early_fraud_warning.createdradar.early_fraud_warning.updatedrecipient.createdrecipient.deletedrecipient.updatedreporting.report_run.failedreporting.report_run.succeededreporting.report_type.updatedreview.closedreview.openedsetup_intent.canceledsetup_intent.createdsetup_intent.setup_failedsetup_intent.succeededsigma.scheduled_query_run.createdsku.createdsku.deletedsku.updatedsource.canceledsource.chargeablesource.failedsource.mandate_notificationsource.refund_attributes_requiredsource.transaction.createdsource.transaction.updatedsubscription_schedule.abortedsubscription_schedule.canceledsubscription_schedule.completedsubscription_schedule.createdsubscription_schedule.expiringsubscription_schedule.releasedsubscription_schedule.updatedtax_rate.createdtax_rate.updatedtopup.canceledtopup.createdtopup.failedtopup.reversedtopup.succeededtransfer.createdtransfer.failedtransfer.paidtransfer.reversedtransfer.updated
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.

Trigger Authentication

Stripe uses API keys for authentication. When you connect your Stripe account, Pipedream securely stores the keys so you can easily authenticate to Stripe APIs in both code and no-code steps.

Stripe uses API keys to authenticate requests (more info in their docs here).

To connect Pipedream to your Stripe account,

  1. Create a Stripe API key
  2. Make sure to create either a Secret or Restricted key
  3. Enter the API key below

To help ensure proper security, we recommend you create a Restricted key, and only allow access to operations you need require in Pipedream.

About Stripe

Payment Platform

Action

Description:Create a single card with the minimum amount of data required. [See docs here](https://api.supernotes.app/docs/swagger#/cards/_simple_create_card_v1_cards_simple_post).
Version:0.0.2
Key:supernotes-create-simple-card

Action Code

import app from "../../supernotes.app.mjs";

export default {
  key: "supernotes-create-simple-card",
  name: "Create a simple card",
  description: "Create a single card with the minimum amount of data required. [See docs here](https://api.supernotes.app/docs/swagger#/cards/_simple_create_card_v1_cards_simple_post).",
  version: "0.0.2",
  type: "action",
  props: {
    app,
    name: {
      propDefinition: [
        app,
        "name",
      ],
    },
    markup: {
      propDefinition: [
        app,
        "markup",
      ],
    },
    icon: {
      propDefinition: [
        app,
        "icon",
      ],
    },
    tags: {
      propDefinition: [
        app,
        "tags",
      ],
    },
  },
  methods: {
    createSimpleCard({
      $ = this,
      data,
    }) {
      return this.app._makeRequest({
        $,
        config: {
          path: "/v1/cards/simple",
          data,
          method: "POST",
        },
      });
    },
  },
  async run({ $ }) {
    const {
      name,
      markup,
      icon,
      tags,
    } = this;

    const response = await this.createSimpleCard({
      $,
      data: {
        name,
        markup,
        icon,
        tags,
      },
    });
    const card = response.pop();
    if (card) {
      $.export("$summary", `Successfully created card with ID: "${card.payload.data.id}"`);
    }
    return card;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
SupernotesappappThis component uses the Supernotes app.
Namenamestring

The name of the card

Markupmarkupstring

The markup of the card

IconiconstringSelect a value from the drop down menu:gearfootballrsstv-retropump-medicalface-laughblinds-openshield-crossmeter-firecheck-to-slotsquare-9arrow-down-a-zhourglass-endcompact-disctext-heightup-right-and-down-left-from-centerglassesline-columnshead-side-cough-slashcart-flatbed-boxesbarcode-readdown-left-and-up-right-to-centertemperature-three-quarterschart-pie-simpleteddy-bearh4user-magnifying-glassbridgepizzadown
Tagstagsstring[]

The tags of the card

Action Authentication

Supernotes uses API keys for authentication. When you connect your Supernotes account, Pipedream securely stores the keys so you can easily authenticate to Supernotes APIs in both code and no-code steps.

To connect Pipedream to your Supernotes account,

  1. Sign in to your Supernotes account
  2. Click the User button in the bottom left, then > Settings > Manage API Keys
  3. From there you can create, view, or delete API keys

Refer to the Supernotes documentation for more info.

About Supernotes

Supernotes is your new home for ideas, records, tasks, and lists. Enjoy efficient note-taking without the hassle.

More Ways to Connect Supernotes + Stripe

New Custom Webhook Events from the Stripe API

Emit new event on each webhook event

 
Try it
Cancel a Payment Intent with the Stripe API

Cancel a payment intent. Once canceled, no additional charges will be made by the payment intent and any operations on the payment intent will fail with an error. For payment intents with status=requires_capture, the remaining amount_capturable will automatically be refunded. See the docs for more information

 
Try it
Cancel Or Reverse a Payout with the Stripe API

Cancel or reverse a payout. A payout can be canceled only if it has not yet been paid out. A payout can be reversed only if it has already been paid out. Funds will be refunded to your available balance. See the docs for more information

 
Try it
Capture a Payment Intent with the Stripe API

Capture the funds of an existing uncaptured payment intent. See the docs for more information

 
Try it
Confirm a Payment Intent with the Stripe API

Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, Stripe will attempt to initiate a payment. See the docs for more information

 
Try it
Create a Customer with the Stripe API

Create a customer. See the docs for more information

 
Try it

Explore Other Apps

1
-
12
of
1200+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Beta
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Beta
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
Telegram Bot
Telegram Bot
Telegram is a cloud-based instant messaging and voice over IP service
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular apps like ChatGPT and DALL·E 2.
Google Sheets
Google Sheets
With Google Sheets, you can create, edit, and collaborate wherever you are
Discord
Discord
Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.