← Back
Stripe
Stripe.js removes deprecated Payment Intents and Setup Intents methods in breaking API change
Stripe APIStripe · breaking-changeapisdk · docs.stripe.com ↗

Breaking Changes to Stripe.js

Stripe has removed several long-deprecated methods from Stripe.js as part of a major API cleanup. These methods will now throw an error if called, requiring immediate migration for affected integrations.

Affected Methods

Payment Intents API (3 methods removed):

  • handleCardPayment → migrate to confirmCardPayment
  • confirmPaymentIntent → migrate to confirmCardPayment
  • handleFpxPayment → migrate to confirmFpxPayment

Setup Intents API (2 methods removed):

  • handleCardSetup → migrate to confirmCardSetup
  • confirmSetupIntent → migrate to confirmCardSetup

Sources API (2 methods removed):

  • createSource → migrate to Payment Methods API
  • retrieveSource → migrate to Payment Methods API

Migration Guide

The updated methods use clearer naming and improved functionality. For example:

// Payment Intents - Before
stripe.handleCardPayment(clientSecret, cardElement);

// Payment Intents - After
stripe.confirmCardPayment(clientSecret, {
  payment_method: { card: cardElement }
});

For the legacy Sources API methods, Stripe recommends migrating to the Payment Methods API, which offers better support for payment method reusability and compliance requirements.

Action Items

Review your Stripe.js integrations immediately to identify any usage of these deprecated methods. Stripe provides detailed migration examples in the changelog for each affected method. Update your code before the removal takes effect to avoid runtime errors in production.