Shopify has built a set of tools to import pay-as-you-go contracts into Shopify without the need to migrate credit cards directly. In this tutorial, you’ll learn how to migrate customer information from the following payment gateways to Shopify: - Stripe - Braintree - PayPal Express - Authorize.net Stripe or Braintree will connect as a legacy subscription payment gateway **for billing your existing contracts**, while all new or updated contracts charge against Shopify Payments. Authorize.net can be setup the same way if you wish to use Shopify Payments after the migration. Other payment gateways will remain the same after the migration. > Warning: > We strongly recommend that you pause any billing in your current application while migrating customer payment methods and contracts. Pausing billing will help you avoid double-billing a contract. ## Requirements This tutorial assumes that you've already completed the [Subscriptions API migration guide](/docs/apps/build/purchase-options/subscriptions/migrate-to-subscriptions-api). ## What you'll learn In this tutorial, you'll learn how to do the following tasks: - Configure your payment gateway to work with subscriptions - Import any missing customers - Create new payment methods for customers ## Step 1: Configure your payment gateway to work with subscriptions The steps for configuring your payment gateway to work with subscriptions depend on the payment gateway that you're using. - [Migrate from Stripe](#migrate-from-stripe) - [Migrate from Braintree](#migrate-from-braintree) - [Migrate from Authorize.net](#migrate-from-authorize-net) - [Migrate from PayPal Express](#migrate-from-paypal-express) ### Migrate from Stripe If your primary payment gateway is Shopify Payments and you're migrating from Stripe, then you need to use Stripe's [Payment Intents API](https://stripe.com/docs/payments/payment-intents) to connect Stripe as a secondary payment gateway. The process is also compatible with Stripe's [Charges API](https://stripe.com/docs/api/charges). > Caution: > Customized charge flows, including specialized payment flags, aren't supported and might result in an elevated rate of authorization failures. To connect a merchant's current Stripe account to Shopify as a secondary gateway, redirect the merchant to the following URL: ``` https://admin.shopify.com/store/{shop}/payments/legacy_subscription ``` We recommend that you open the redirect URL in a new browser window so that merchants can return to your migration page when they complete the process. Merchants are redirected to Stripe and asked to initiate the connection process. After merchants successfully initiate the connection process, they're redirected back to the payment settings page and a banner notifies them of a successful connection. ### Migrate from Braintree If you're migrating from Braintree, and you sell internationally, then you need to consider that Braintree's legacy payment gateway integration doesn't support multi-currency subscription contracts. If your primary payment gateway is Shopify Payments and you're migrating from Braintree, then you need to use Braintree's [OAuth](https://developer.paypal.com/braintree/docs/guides/extend/oauth/overview) to connect Braintree as a secondary payment gateway. To connect a merchant's current Braintree account to Shopify as a secondary gateway, redirect the merchant to the following URL: ``` https://admin.shopify.com/store/{shop}/payments/legacy_subscription_braintree ``` We recommend that you open the redirect URL in a new browser window so that merchants can return to your migration page when they complete the process. Merchants are redirected to Braintree and asked to initiate the connection process. After merchants successfully initiate the connection process, they're redirected back to the payment settings page and a banner notifies them of a successful connection. Braintree uses a separate sandbox account for test mode. To connect to a **Sandbox Braintree** account, use the following URL: ``` https://admin.shopify.com/store/{shop}/payments/legacy_subscription_braintree?sandbox=true ``` ### Migrate from Authorize.net If your primary payment gateway is Shopify Payments and you're migrating from Authorize.net, then you need to use Authorize.net's [API Login ID and Transaction Key](https://support.authorize.net/knowledgebase/Knowledgearticle/?code=000001560) to connect Authorize.net as a secondary payment gateway. To connect a merchant's current Authorize.net account to Shopify as a secondary gateway, redirect the merchant to the following URL: ``` https://admin.shopify.com/store/{shop}/settings/payments/legacy_subscription_authorize_net ``` We recommend that you open the redirect URL in a new browser window so that merchants can return to your migration page when they complete the process. Merchants are redirected to Shopify and asked to enter their credentials for Authorize.net. After merchants successfully enter their credentials, they're redirected back to the payment settings page and a banner notifies them of a successful connection. ### Checking if your payment gateway is configured for subscriptions Poll the shop setting to determine whether Shopify has successfully established a connection with Stripe, Braintree, or Authorize.net:
You can associate Stripe payment methods with the customers that you import into Shopify by using the CustomerPaymentMethodRemoteCreate
mutation.
The following example uses a mutation to create a payment method for a customer:
You can associate Braintree payment methods with the customers that you import into Shopify by using the CustomerPaymentMethodRemoteCreate
mutation.
The following example uses a mutation to create a payment method for a customer:
You can associate PayPal billing agreements with the customers that you import into Shopify. Use the CustomerPaymentMethodPaypalBillingAgreementCreate
mutation to associate the Shopify customer ID with the PayPal billing agreement ID.
The following example shows a mutation that creates a payment method for a customer:
You can associate Authorize.net customer profiles with the customers that you import into Shopify. To make the association, use the CustomerPaymentMethodRemoteCreate
mutation to associate the Shopify customer ID with the Authorize.net customer profile ID and payment method ID. If the Authorize.net payment method ID isn't available, then the customer's default source is used.
The following example mutation creates a payment method for a customer: