Skip to content

Commit cd2acfe

Browse files
MrEdwardovicfergar
andauthored
Update Stripe documentation to account for sandboxes (#978)
* Update Stripe documentation to account for sandboxes * Update docs/web/connect-stripe-account.mdx Co-authored-by: Víctor Ferrer García <[email protected]> * Add clearer instructions for working with sandboxes * add note about sandboxes to testing doc * Update docs/web/connect-stripe-account.mdx Co-authored-by: Víctor Ferrer García <[email protected]> --------- Co-authored-by: Víctor Ferrer García <[email protected]>
1 parent 5f93774 commit cd2acfe

File tree

3 files changed

+62
-13
lines changed

3 files changed

+62
-13
lines changed

docs/web/connect-stripe-account.mdx

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,83 @@ excerpt: Instructions to connect your apps to one or more Stripe accounts
66
hidden: false
77
---
88

9-
In order to configure [Web Billing](/web/web-billing/overview) or [Stripe](/web/integrations/stripe) apps, you will need to connect to your Stripe account first.
9+
In order to configure [RevenueCat Web Billing](/web/web-billing/overview) or the [Stripe Billing integration](/web/integrations/stripe), you will need to connect to your Stripe account first.
1010

11-
Log into [RevenueCat](https://app.revenuecat.com/settings/account) and click the _Connect Stripe account_ button in your account settings.
11+
:::info Project owner must connect with Stripe
12+
Only the owner of the RevenueCat project can connect a Stripe account. [Collaborator](/projects/collaborators) roles aren't able to add or remove a Stripe connection.
13+
:::
14+
15+
### Install the RevenueCat Stripe App from the Stripe App Marketplace
1216

13-
Install the RevenueCat Stripe App either by creating a new account with Stripe or sign in with your existing one. Make sure that the correct account is selected at the top right corner of the screen.
17+
Log into the RevenueCat dashboard and click the _Connect Stripe account_ button in your [account settings](https://app.revenuecat.com/settings/account).
18+
19+
Install the RevenueCat App, either by creating a new account with Stripe or sign in with your existing one. Make sure that the correct account is selected at the top right corner of the screen.
1420

1521
![](/docs_images/web/connect-stripe-account/stripe-account-selection.png)
1622

1723
![](/docs_images/web/connect-stripe-account/stripe-app-install.png)
1824

19-
Finalize setting up the connection between Stripe and RevenueCat in the RevenueCat Stripe App.
25+
### Connect your RevenueCat account to the RevenueCat Stripe app
26+
27+
Click on _View Stripe app settings_ and sign in with RevenueCat, from within the Stripe App:
2028

2129
![](/docs_images/web/connect-stripe-account/stripe-app-settings.png)
2230

2331
![](/docs_images/web/connect-stripe-account/stripe-app-sign-in-to-rc.png)
2432

25-
After this you should be able to see the connected account listed in your RevenueCat account page (you may need to refresh the page).
33+
After this, the connected Stripe account should be listed in your RevenueCat account settings page (you may need to refresh the page):
2634

2735
![](/docs_images/web/connect-stripe-account/stripe-account-connected.png)
2836

2937
:::info Stripe app permissions
30-
RevenueCat only requests the permissions from Stripe found [here](https://marketplace.stripe.com/apps/revenuecat). These permissions are necessary for RevenueCat to interact with Stripe and track the purchases of your app. If the RevenueCat Stripe App is uninstalled, all the permissions are revoked and RevenueCat will not be able to track your app's purchases any more.
31-
:::
32-
33-
:::info Project owner must connect with Stripe
34-
Only the owner of the RevenueCat project can connect a Stripe account for their apps - no [collaborators](/projects/collaborators) will be able to add or remove a Stripe connection.
38+
RevenueCat only requests the permissions from Stripe found [here](https://marketplace.stripe.com/apps/revenuecat). These permissions are necessary for RevenueCat to interact with Stripe and track the purchases of your app. If the RevenueCat Stripe App is uninstalled, all permissions are revoked and RevenueCat will no longer be able to track your app's purchases or interact with your Stripe account.
3539
:::
3640

37-
After you connect to your Stripe account, make sure that you select the account in your app configuration page:
41+
After you connect your Stripe account, make sure that you select the correct account in the platform configuration page:
3842

3943
![](/docs_images/web/connect-stripe-account/configure-stripe-account-in-app-config.png)
4044

4145
:::info Connect to more than one Stripe Account
4246
You can connect to multiple Stripe Accounts by repeating the steps described above. Make sure that you are signed in to the correct account in Stripe dashboard every time you follow the steps. Then you can assign different accounts to each of your Stripe or Web Billing apps in the apps' configuration pages.
4347
:::
4448

49+
## Working with Stripe Test Mode & Sandboxes
50+
51+
Stripe currently has two options for testing in a sandbox environment:
52+
53+
1. Test mode
54+
2. [Sandboxes](https://docs.stripe.com/sandboxes)
55+
56+
Sandboxes are newer and generally more flexible, and work as completely isolated test environments. You can see comparisons between the two [here](https://docs.stripe.com/testing-use-cases).
57+
58+
:::info access to test mode limited
59+
If your Stripe account is new and you have not yet completed your account verification, you may only have access to sandbox mode. We anticipate that test mode will eventually be deprecated, with sandboxes being the only test environments in the future.
60+
:::
61+
62+
### Stripe test mode in RevenueCat
63+
64+
If you're connecting Stripe to use with RevenueCat Web Billing, and you have access to test mode in your Stripe account:
65+
66+
- RevenueCat will automatically use Stripe's test mode for sandbox web purchase links and web SDK purchases
67+
- You only need to create a single Web Billing platform in the RevenueCat dashboard
68+
- You should use Stripe's [test cards](https://docs.stripe.com/testing) in any RevenueCat sandbox purchase
69+
70+
:::info Accounts without live mode access
71+
If your connected Stripe account doesn't have access to live mode, only RevenueCat sandbox purchases can be made (only sandbox API keys and web purchase links will be available)
72+
:::
73+
74+
### Stripe sandboxes in RevenueCat
75+
76+
You can connect Stripe sandbox accounts to RevenueCat and use them to test purchases. Since sandboxes function as standalone accounts, you'll need to install the RevenueCat Stripe app in each sandbox you wish to use.
77+
78+
To use a Stripe sandbox for testing in RevenueCat Web Billing:
79+
80+
1. Switch to the sandbox you wish to connect to RevenueCat
81+
1. Install the [RevenueCat app](https://marketplace.stripe.com/apps/revenuecat) from the Stripe Marketplace
82+
1. After installation, go to the app settings and connect your RevenueCat account
83+
1. You will need to **create two Web Billing platforms** in the RevenueCat dashboard — one for production, and one for the sandbox connection (we recommend naming them accordingly)
84+
1. In the billing settings for each platform, make sure the correct Stripe account connection is selected for each one
85+
4586
## Next steps
4687

4788
[Continue with configuring the Web SDK](web-billing/web-sdk#app-configuration)

docs/web/web-billing/testing.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ In contrast to mobile app stores, there is no intermediary between you and the c
1111

1212
## Testing a Web SDK integration
1313

14-
You can use Stripe's [Test Mode](https://stripe.com/docs/test-mode) to test your Web Billing integration.
14+
You can use Stripe's [Test Mode](https://stripe.com/docs/test-mode) or [Sandboxes](https://docs.stripe.com/sandboxes) to test your Web Billing integration.
1515

16-
If you use the Web Billing sandbox API key, Stripe's test mode will be used automatically, and you can use one of Stripe's [test cards](https://docs.stripe.com/testing) to make purchases.
16+
:::warning Stripe's test mode and sandboxes behave differently
17+
See how to use a sandbox to RevenueCat Web Billing [here](../connect-stripe-account#working-with-stripe-test-mode--sandboxes).
18+
:::
1719

1820
## Testing Web Purchase Links
1921

@@ -27,6 +29,8 @@ The sandbox URL is automatically configured to use Stripe's test mode, and shoul
2729

2830
For both **Apple Pay** & **Google Pay**, you can use real payment cards in sandbox. Stripe configures both payment methods in a test mode, no real transactions are made.
2931

32+
You can use one of Stripe's [test cards](https://docs.stripe.com/testing) to make credit card purchases.
33+
3034
## Subscription Schedules in Sandbox
3135

3236
Sandbox subscriptions renew faster than actual subscriptions to facilitate testing. They can renew a maximum of six times. At that point, the subscription will be automatically cancelled.

docs/web/web-billing/web-purchase-links.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Use Web Purchase Links to enable customers to purchase a web subscription direct
1111

1212
Web Purchase Links support a range of use cases, with both identified and anonymous purchases. For identified users, append the customer's App User ID to the provided URL. For anonymous purchases, utilize [Redemption Links](/web/web-billing/redemption-links), which allow customers to buy subscriptions without an App User ID and later associate the purchase with their account in your app.
1313

14+
## Prerequisites
15+
16+
Before getting started, you first need to [connect your Stripe account with RevenueCat](/web/connect-stripe-account), if you haven't already done so.
17+
1418
## Get Started
1519

1620
1. Create a [Web Billing App](/web/web-billing/web-sdk#app-configuration)

0 commit comments

Comments
 (0)