Configuring Stripe Keys and Settings
Create your Stripe keys to connect Superwall to Stripe. Fill out some settings to configure your app.
Once you’ve created a Stripe app, you’ll need to configure it with your Stripe keys and fill in a few settings. This is a one-time setup that connects Superwall to Stripe. The easiest way to get started is to click on the link in your overview page, which will take you to your app’s Settings page:
Application settings
Fill out metadata about your iOS app in this section.
-
Icon: An icon to represent your app, we recommend using the same one that your iOS app does. This will appear on the checkout and subscription management pages.
-
Application Name: The name of your app, we recommend using the same name as your iOS app.
-
Support URL: A URL to your support page. This will be shown on the checkout and subscription management pages.
-
Support Email: An email you provide customers for support questions and general reach out
-
Redeemable on Desktop: If your app is an iPad app on Mac, enable this option so that users can redeem products on their Mac. If you aren’t using iPads Apps on the Mac, you can disable this. If this is disabled, Superwall enforces redemption on an iOS device.
Once you’ve filled out this information, click on the Update Application button.
Web Paywall Domain
This is the domain your paywalls will be shown from. This was set when the Stripe app was created, and cannot be changed.
Stripe Live Configuration
This section allows you to connect Stripe keys with Superwall. You will need:
- Publishable Key: A Stripe publishable key. Stripe creates this key for you, you don’t need to generate it yourself.
- Secret Key: A Stripe secret key that you create. Once you’ve made one, paste it here.
To access these, click on the API Keys link:
Under Restricted Keys, click on + Create restricted key:
Choose “Providing this key to another website” and click Continue ->:
Use “Superwall” as the name and “superwall.com” as the URL, then click Create restricted key:
You’ll get a modal of your restricted key, copy this to your clipboard, you won’t be able to view it again:
From there, copy your Publishable Key and copied key from the Stripe dashboard to Superwall:
Once you’ve provided those two keys, click on Update Configuration to save your changes. This section should say “Configured” at the top right if setup was successful:
Stripe Sandbox Configuration
For the sandbox configuration, you’ll follow the same previous steps, except you retrieve the keys from this link: Stripe Sandbox API Keys.
You should see something similar to this:
Paste the both the Publishable Key and Secret Key into Superwall for each respective field and click on the Update Configuration button. As before, this section should say “Configured” at the top right if setup was successful.
iOS configuration
Superwall uses the details here to handle deep links back to your app after a purchase occurs. All of this information is required.
- Apple Custom URL Scheme: Add your app’s custom URL scheme. If you haven’t set on up, read here for instructions.
- Apple App ID: Your iOS app’s ID. If you’re unsure of your app’s ID, you find it in App Store Connect -> Select your App -> General -> App Information -> Apple ID:
- Bundle ID: Your iOS app’s bundle ID. You can find this in Xcode -> Targets -> General -> Identity -> Bundle Identifier.
- Team ID: The team ID that your iOS app belongs to. To find this, visit Apple Developer -> Account -> Membership details -> Team ID. It’s obscured here, but it’ll be where the arrow points in the image below:
Confirm setup
Once you’ve filled out all of these fields, you should see Configured for each section:
Universal links
Be sure to fill out everything in the iOS configuration section before proceeding with this step.
Superwall can use universal links to help make Stripe checkout flows smoother. It allows Superwall to automatically redirect to, and open, your app when a purchase is made from web checkout. In addition, Superwall handles the associated domain file configuration. If you’ve setup everything in the iOS configuration section, you’re ready to follow these next steps to set up universal links.
If your Team ID value is incorrect, universal links won’t work. Please double check this before continuing.
Add a new capability in Xcode
Select your target in Xcode, then select the Signing & Capabilities tab. Click on the + Capability button and select Associated Domains. This will add a new capability to your app.
Set the domain
Next, enter in the domain using the format applinks:[your-web-checkout-url]
. This is the domain that Superwall will use to handle universal links. Your your-web-checkout-url
value should match what’s under the “Web Paywall Domain” section.
Add Universal Link Handling
This will require different logic than the Deep Link handling for In-App Previews (except for SwiftUI).
You can verify that your universal links are working a few different ways. Keep in mind that it usually takes a few minutes for the associated domain file to propagate:
- Use Branch’s online validator: If you visit branch.io’s online validator and enter in your web checkout URL, it’ll run a similar check and provide the same output.
2 . Test opening a universal link: If the validation passes from either of the two steps above, make sure visiting a universal link opens your app. Your link should be formatted as https://[your web checkout link]/app-link/
— which is simply your web checkout link with /app-link/
at the end. This is easiest to test on device, since you have to tap an actual link instead of visiting one directly in Safari or another browser. In the iOS simulator, adding the link in the Reminders app works too:
Next, you’ll need to create some products in Stripe.