← Stripe

Confirm A Payment Intent with Stripe API

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

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Confirm A Payment Intent with the Stripe API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

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

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

Create a workflow to Confirm A Payment Intent with the Stripe API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Confirm A Payment Intent action
    1. Connect your Stripe account
    2. Configure alert
    3. Select a Payment Intent ID
    4. Optional- Select a Customer ID
    5. Optional- Select a Payment Method
    6. Optional- Configure Receipt Email
    7. Optional- Select a Setup Future Usage
    8. Optional- Configure Shipping - Address - City
    9. Optional- Configure Shipping - Address - Country
    10. Optional- Configure Shipping - Address - Line 1
    11. Optional- Configure Shipping - Address - Line 2
    12. Optional- Configure Shipping - Address - Postal Code
    13. Optional- Configure Shipping - Address - State
    14. Optional- Configure Shipping - Name
    15. Optional- Configure Shipping - Carrier
    16. Optional- Configure Shipping - Phone
    17. Optional- Configure Shipping - Tracking Number
    18. Optional- Select a Capture Method
    19. Optional- Configure Confirmation Token
    20. Optional- Configure Error On Requires Action
    21. Optional- Configure Mandate
    22. Optional- Select a Mandate Data - Customer Acceptance - Type
    23. Optional- Configure Mandate Data - Customer Acceptance - Accepted At
    24. Optional- Configure Mandate Data - Customer Acceptance - Offline
    25. Optional- Configure Mandate Data - Customer Acceptance - Online - IP Address
    26. Optional- Configure Mandate Data - Customer Acceptance - Online - User Agent
    27. Optional- Configure Off Session
    28. Optional- Configure Payment Method Data
    29. Optional- Configure Payment Method Options
    30. Optional- Select one or more Payment Method Types
    31. Optional- Configure Radar Options - Session
    32. Optional- Configure Return URL
    33. Optional- Configure Use Stripe SDK
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Confirm a Payment Intent with Stripe API on New Invoice Paid (Instant) from Teamleader Focus API
Teamleader Focus + Stripe
 
Try it
Confirm a Payment Intent with Stripe API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Stripe
 
Try it
Confirm a Payment Intent with Stripe API on New Item in Feed from RSS API
RSS + Stripe
 
Try it
Confirm a Payment Intent with Stripe API on New Message from Discord API
Discord + Stripe
 
Try it
Confirm a Payment Intent with Stripe API on New Message In Channels from Slack API
Slack + Stripe
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is 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.

Confirm A Payment Intent on Stripe
Description:Confirm that your customer intends to pay with current or provided payment method. [See the documentation](https://stripe.com/docs/api/payment_intents/confirm).
Version:0.1.2
Key:stripe-confirm-payment-intent

Code

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

export default {
  key: "stripe-confirm-payment-intent",
  name: "Confirm A Payment Intent",
  type: "action",
  version: "0.1.2",
  description: "Confirm that your customer intends to pay with current or provided payment method. [See the documentation](https://stripe.com/docs/api/payment_intents/confirm).",
  props: {
    app,
    // eslint-disable-next-line pipedream/props-label, pipedream/props-description
    alert: {
      type: "alert",
      alertType: "info",
      content: "Upon confirmation, Stripe will attempt to initiate a payment. [See the documentation](https://stripe.com/docs/api/payment_intents/confirm).",
    },
    id: {
      propDefinition: [
        app,
        "paymentIntent",
      ],
      optional: false,
    },
    // Needed to populate the options for payment_method
    customer: {
      propDefinition: [
        app,
        "customer",
      ],
    },
    paymentMethod: {
      propDefinition: [
        app,
        "paymentMethod",
        ({ customer }) => ({
          customer,
        }),
      ],
    },
    receiptEmail: {
      label: "Receipt Email",
      description: "Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).",
      propDefinition: [
        app,
        "email",
      ],
    },
    setupFutureUsage: {
      propDefinition: [
        app,
        "setupFutureUsage",
      ],
    },
    shippingAddressCity: {
      label: "Shipping - Address - City",
      propDefinition: [
        app,
        "addressCity",
      ],
    },
    shippingAddressCountry: {
      label: "Shipping - Address - Country",
      propDefinition: [
        app,
        "addressCountry",
      ],
    },
    shippingAddressLine1: {
      label: "Shipping - Address - Line 1",
      propDefinition: [
        app,
        "addressLine1",
      ],
    },
    shippingAddressLine2: {
      label: "Shipping - Address - Line 2",
      propDefinition: [
        app,
        "addressLine2",
      ],
    },
    shippingAddressPostalCode: {
      label: "Shipping - Address - Postal Code",
      propDefinition: [
        app,
        "addressPostalCode",
      ],
    },
    shippingAddressState: {
      label: "Shipping - Address - State",
      propDefinition: [
        app,
        "addressState",
      ],
    },
    shippingName: {
      propDefinition: [
        app,
        "shippingName",
      ],
    },
    shippingCarrier: {
      propDefinition: [
        app,
        "shippingCarrier",
      ],
    },
    shippingPhone: {
      propDefinition: [
        app,
        "shippingPhone",
      ],
    },
    shippingTrackingNumber: {
      propDefinition: [
        app,
        "shippingTrackingNumber",
      ],
    },
    captureMethod: {
      type: "string",
      label: "Capture Method",
      description: "Controls when the funds will be captured from the customer's account.",
      options: [
        "automatic",
        "automatic_async",
        "manual",
      ],
      optional: true,
    },
    confirmationToken: {
      type: "string",
      label: "Confirmation Token",
      description: "ID of the ConfirmationToken used to confirm this PaymentIntent.",
      optional: true,
    },
    errorOnRequiresAction: {
      type: "boolean",
      label: "Error On Requires Action",
      description: "Set to true to fail the payment attempt if the PaymentIntent transitions into requires_action. This parameter is intended for simpler integrations that do not handle customer actions, like saving cards without authentication.",
      optional: true,
    },
    mandate: {
      type: "string",
      label: "Mandate",
      description: "ID of the mandate that's used for this payment.",
      optional: true,
    },
    mandateDataCustomerAcceptanceType: {
      type: "string",
      label: "Mandate Data - Customer Acceptance - Type",
      description: "The type of customer acceptance information included with the Mandate.",
      options: [
        "online",
        "offline",
      ],
      optional: true,
    },
    mandateDataCustomerAcceptanceAcceptedAt: {
      type: "string",
      label: "Mandate Data - Customer Acceptance - Accepted At",
      description: "The time at which the customer accepted the Mandate.",
      optional: true,
    },
    mandateDataCustomerAcceptanceOffline: {
      type: "object",
      label: "Mandate Data - Customer Acceptance - Offline",
      description: "If this is a Mandate accepted offline, this hash contains details about the offline acceptance.",
      optional: true,
    },
    mandateDataCustomerAcceptanceOnlineIpAddress: {
      type: "string",
      label: "Mandate Data - Customer Acceptance - Online - IP Address",
      description: "The IP address from which the Mandate was accepted by the customer.",
      optional: true,
    },
    mandateDataCustomerAcceptanceOnlineUserAgent: {
      type: "string",
      label: "Mandate Data - Customer Acceptance - Online - User Agent",
      description: "The user agent of the browser from which the Mandate was accepted by the customer.",
      optional: true,
    },
    offSession: {
      type: "boolean",
      label: "Off Session",
      description: "Set to true to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and charge them later.",
      optional: true,
    },
    paymentMethodData: {
      type: "object",
      label: "Payment Method Data",
      description: "If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the [payment_method](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method) property on the PaymentIntent. [See the documentation](https://docs.stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_data).",
      optional: true,
    },
    paymentMethodOptions: {
      type: "object",
      label: "Payment Method Options",
      description: "Payment method-specific configuration for this PaymentIntent. [See the documentation](https://docs.stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options).",
      optional: true,
    },
    paymentMethodTypes: {
      propDefinition: [
        app,
        "paymentMethodTypes",
      ],
    },
    radarOptionsSession: {
      type: "string",
      label: "Radar Options - Session",
      description: "A Radar Session is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.",
      optional: true,
    },
    returnUrl: {
      type: "string",
      label: "Return URL",
      description: "The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.",
      optional: true,
    },
    useStripeSdk: {
      type: "boolean",
      label: "Use Stripe SDK",
      description: "Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.",
      optional: true,
    },
  },
  methods: {
    getOtherParams() {
      const {
        shippingAddressCity,
        shippingAddressCountry,
        shippingAddressLine1,
        shippingAddressLine2,
        shippingAddressPostalCode,
        shippingAddressState,
        shippingName,
        shippingCarrier,
        shippingPhone,
        shippingTrackingNumber,
        mandateDataCustomerAcceptanceType,
        mandateDataCustomerAcceptanceAcceptedAt,
        mandateDataCustomerAcceptanceOffline,
        mandateDataCustomerAcceptanceOnlineIpAddress,
        mandateDataCustomerAcceptanceOnlineUserAgent,
        radarOptionsSession,
      } = this;

      const hasShippingData = shippingAddressCity
        || shippingAddressCountry
        || shippingAddressLine1
        || shippingAddressLine2
        || shippingAddressPostalCode
        || shippingAddressState
        || shippingName
        || shippingCarrier
        || shippingPhone
        || shippingTrackingNumber;

      const hasMandateData = mandateDataCustomerAcceptanceType
        || mandateDataCustomerAcceptanceAcceptedAt
        || mandateDataCustomerAcceptanceOffline;

      const hasOnlineData = mandateDataCustomerAcceptanceOnlineIpAddress
        || mandateDataCustomerAcceptanceOnlineUserAgent;

      return {
        ...(hasShippingData && {
          shipping: {
            address: {
              city: shippingAddressCity,
              country: shippingAddressCountry,
              line1: shippingAddressLine1,
              line2: shippingAddressLine2,
              postal_code: shippingAddressPostalCode,
              state: shippingAddressState,
            },
            name: shippingName,
            carrier: shippingCarrier,
            phone: shippingPhone,
            tracking_number: shippingTrackingNumber,
          },
        }),
        ...(hasMandateData && {
          mandate_data: {
            customer_acceptance: {
              type: mandateDataCustomerAcceptanceType,
              accepted_at: mandateDataCustomerAcceptanceAcceptedAt,
              offline: mandateDataCustomerAcceptanceOffline,
              ...(hasOnlineData && {
                online: {
                  ip_address: mandateDataCustomerAcceptanceOnlineIpAddress,
                  user_agent: mandateDataCustomerAcceptanceOnlineUserAgent,
                },
              }),
            },
          },
        }),
        ...(radarOptionsSession && {
          radar_options: {
            session: radarOptionsSession,
          },
        }),
      };
    },
  },
  async run({ $ }) {
    const {
      app,
      id,
      paymentMethod,
      receiptEmail,
      setupFutureUsage,
      captureMethod,
      confirmationToken,
      errorOnRequiresAction,
      mandate,
      offSession,
      paymentMethodData,
      paymentMethodOptions,
      paymentMethodTypes,
      returnUrl,
      useStripeSdk,
      getOtherParams,
    } = this;

    const resp = await app.sdk().paymentIntents.confirm(id, {
      payment_method: paymentMethod,
      receipt_email: receiptEmail,
      setup_future_usage: setupFutureUsage,
      capture_method: captureMethod,
      confirmation_token: confirmationToken,
      error_on_requires_action: errorOnRequiresAction,
      mandate,
      off_session: offSession,
      payment_method_data: paymentMethodData,
      payment_method_options: utils.parseJson(paymentMethodOptions),
      payment_method_types: paymentMethodTypes,
      return_url: returnUrl,
      use_stripe_sdk: useStripeSdk,
      ...getOtherParams(),
    });
    $.export("$summary", "Successfully confirmed the payment intent");
    return resp;
  },
};

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
StripeappappThis component uses the Stripe app.
Payment Intent IDidstringSelect a value from the drop down menu.
Customer IDcustomerstringSelect a value from the drop down menu.
Payment MethodpaymentMethodstringSelect a value from the drop down menu.
Receipt EmailreceiptEmailstring

Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings

Setup Future UsagesetupFutureUsagestringSelect a value from the drop down menu:on_sessionoff_session
Shipping - Address - CityshippingAddressCitystring

City, district, suburb, town, or village.

Shipping - Address - CountryshippingAddressCountrystring

Two-letter country code (ISO 3166-1 alpha-2).

Shipping - Address - Line 1shippingAddressLine1string

Address line 1 (e.g., street, PO Box, or company name).

Shipping - Address - Line 2shippingAddressLine2string

Address line 2 (e.g., apartment, suite, unit, or building).

Shipping - Address - Postal CodeshippingAddressPostalCodestring

ZIP or postal code.

Shipping - Address - StateshippingAddressStatestring

State, county, province, or region.

Shipping - NameshippingNamestring

Recipient name.

Shipping - CarriershippingCarrierstring

The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.

Shipping - PhoneshippingPhonestring

Recipient phone (including extension).

Shipping - Tracking NumbershippingTrackingNumberstring

The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.

Capture MethodcaptureMethodstringSelect a value from the drop down menu:automaticautomatic_asyncmanual
Confirmation TokenconfirmationTokenstring

ID of the ConfirmationToken used to confirm this PaymentIntent.

Error On Requires ActionerrorOnRequiresActionboolean

Set to true to fail the payment attempt if the PaymentIntent transitions into requires_action. This parameter is intended for simpler integrations that do not handle customer actions, like saving cards without authentication.

Mandatemandatestring

ID of the mandate that's used for this payment.

Mandate Data - Customer Acceptance - TypemandateDataCustomerAcceptanceTypestringSelect a value from the drop down menu:onlineoffline
Mandate Data - Customer Acceptance - Accepted AtmandateDataCustomerAcceptanceAcceptedAtstring

The time at which the customer accepted the Mandate.

Mandate Data - Customer Acceptance - OfflinemandateDataCustomerAcceptanceOfflineobject

If this is a Mandate accepted offline, this hash contains details about the offline acceptance.

Mandate Data - Customer Acceptance - Online - IP AddressmandateDataCustomerAcceptanceOnlineIpAddressstring

The IP address from which the Mandate was accepted by the customer.

Mandate Data - Customer Acceptance - Online - User AgentmandateDataCustomerAcceptanceOnlineUserAgentstring

The user agent of the browser from which the Mandate was accepted by the customer.

Off SessionoffSessionboolean

Set to true to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and charge them later.

Payment Method DatapaymentMethodDataobject

If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the payment_method property on the PaymentIntent. See the documentation

Payment Method OptionspaymentMethodOptionsobject

Payment method-specific configuration for this PaymentIntent. See the documentation

Payment Method TypespaymentMethodTypesstring[]Select a value from the drop down menu:acss_debitalipayau_becs_debitbancontactcardcard_presentepsgiropayidealinterac_presentp24sepa_debitsofort
Radar Options - SessionradarOptionsSessionstring

A Radar Session is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.

Return URLreturnUrlstring

The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.

Use Stripe SDKuseStripeSdkboolean

Set to true when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.

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.

About Stripe

Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.

More Ways to Use Stripe

Triggers

New Custom Webhook Events from the Stripe API

Emit new event on each webhook event

 
Try it
Canceled Subscription from the Stripe API

Emit new event for each new canceled subscription

 
Try it
New Abandoned Cart from the Stripe API

Emit new event when a customer abandons their cart.

 
Try it
New Customer from the Stripe API

Emit new event for each new customer

 
Try it
New Dispute from the Stripe API

Emit new event for each new dispute

 
Try it

Actions

Cancel A Payment Intent with the Stripe API

Cancel a PaymentIntent. See the documentation

 
Try it
Cancel Or Reverse A Payout with the Stripe API

Cancel a pending payout or reverse a paid payout. See the documentation here and here

 
Try it
Capture a Payment Intent with the Stripe API

Capture the funds of an existing uncaptured payment intent. See the documentation

 
Try it
Create a Customer with the Stripe API

Create a customer. See the documentation

 
Try it
Create a Payment Intent with the Stripe API

Create a payment intent. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,500+
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.
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.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
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 models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce
Salesforce
Cloud-based customer relationship management (CRM) platform that helps businesses manage sales, marketing, customer support, and other business activities, ultimately aiming to improve customer relationships and streamline operations.
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
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.