Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
    Pay with Stripe balance
    Bank debits
    Bank redirects
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
      Alipay
      Amazon Pay
      Apple Pay
      Cash App Pay
      Google Pay
      GrabPay
      Link
      MB WAY
      MobilePay
      PayPal
        PayPal button
        Activate PayPal payments
        Accept a payment
        Set up future payments
        Choose settlement preference
        Disputed payments
        Payout reconciliation
        Supported locales
        Import saved PayPal payment methods
      PayPay
      Revolut Pay
      Satispay
      Secure Remote Commerce
      Vipps
      WeChat Pay
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsAdd payment methodsWalletsPayPal

Import saved PayPal payment methods

Learn how to import saved payment methods from PayPal.

Copy page

You can import PayPal billing agreements created outside of Stripe and reuse them through the Stripe integration.

Before you begin

Follow the instructions in Set up future PayPal payments to enable recurring payments.

Import PayPal billing agreements to Stripe
Server-side

You can use the billing_agreement_id parameter of a Setup Intent to import an active PayPal billing agreement to Stripe. The resulting PaymentMethod allows you to charge your existing customer’s PayPal account without the customer needing to reauthorize the billing agreement. This guide shows the steps you need to follow.

Create a Customer
Server-side

Create a Customer object when your customer creates an account on your business. Associating the ID of the Customer object with your own internal representation of a customer lets you retrieve and use the stored payment method details later. If your customer hasn’t created an account, you can still create a Customer object now and associate it with your internal representation of the customer’s account later.

Command Line
cURL
curl -X POST https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

Attach a payment method
Server-side

After you create a customer, attach a payment method by creating a Setup Intent.

Command Line
cURL
curl https://api.stripe.com/v1/setup_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "payment_method_types[]"=paypal \ -d "payment_method_data[type]"=paypal \ -d "payment_method_options[paypal][billing_agreement_id]"=B-1234556789 \ --data-urlencode return_url="https://example.com" \ -d confirm=true \ -d usage=off_session \ -d "mandate_data[customer_acceptance][type]"=offline \ -d customer=cus_XXX

Use your saved payment method
Server-side

Follow the instructions in Set up future PayPal payments to use this payment method to charge your customers.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc