Skip to content

Commit

Permalink
Web Billing Accelerated Sandbox (#586)
Browse files Browse the repository at this point in the history
* Revert "Revert "Document renewal sandbox durations (#584)" (#585)"

This reverts commit e31eb93.

* Add sandbox period mapping

---------

Co-authored-by: Antonio Borrero Granell <[email protected]>
  • Loading branch information
polmiro and antoniobg authored Jan 30, 2025
1 parent 09c18f5 commit 8e37a7f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
38 changes: 34 additions & 4 deletions docs/web/revenuecat-billing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,40 @@ In contrast to mobile app stores, there is no intermediary between you and the c

If you use the RevenueCat 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.

## Current limitations
### Renewals in Sandbox

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.

The following table lists the sandbox renewal periods for subscriptions of various durations. These times are approximate, and you may see small variations. To ensure accuracy, check the current status after each subscription expiration.

#### Subscription Renewal Periods

| Production Subscription Period | Sandbox Subscription Period |
| ------------------------------ | ---------------------------- |
| 1 day (P1D) | 5 minutes |
| 3 days (P3D) | 5 minutes |
| 1 week (P1W) | 5 minutes |
| 2 weeks (P2W) | 5 minutes |
| 1 month (P1M) | 5 minutes |
| 2 months (P2M) | 10 minutes |
| 3 months (P3M) | 15 minutes |
| 6 months (P6M) | 30 minutes |
| 1 year (P1Y) | 60 minutes |

#### Time-based Subscription Features

Time-based subscription features such as free trials are also shortened for sandbox testing. The following table identifies the sandbox time periods associated with these features:

| Feature | Sandbox Period |
| --------------------- | ------------------------------------ |
| Trial duration | 5 minutes |
| Grace period duration | 3 minutes |
| Billing retries | Every 3 minutes and up to 5 attempts |

## Current Limitations

RevenueCat Billing currently has a number of known limitations. Most notably:

- There is no support for sales tax or VAT calculation
- There is no support for discounts or other offers
- There is no support for our Paywall templates yet
- There is no support for sales tax or VAT calculation.
- There is no support for discounts or other offers.
- There is no support for our Paywall templates yet.
6 changes: 3 additions & 3 deletions docs/web/revenuecat-billing/product-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ In the "new product" screen, you can set up the following properties of the prod
- *Auto-renewing subscription*: A recurring subscription purchase, that continues on a given interval until canceled.
- *Consumable*: A non-recurring purchase that can be purchased one or more times (repeated).
- *Non-consumable*: A non-recurring purchase that can only be purchased once.
- **Duration**: The billing cycle (period length) of the subscription.
- **Free trial period**: The duration of a free trial
- **Duration**: The billing cycle (period length) of the subscription. *See [Sandbox testing](/web/revenuecat-billing#renewals-in-sandbox) for more information about durations in sandbox mode.*
- **Free trial period**: The duration of a free trial. *See [Sandbox testing](/web/revenuecat-billing#renewals-in-sandbox) for more information about durations in sandbox mode.*
- **Trial eligibility**: Which customers have access to the free trial:
- *Everyone*: Every customer will start a subscription to this product with a trial, even if they had a trial before. *Please note:* If you choose this option, it means that customers could continuously cancel their trial and start another trial to keep getting free access.
- *Has never made any purchase*: Only customers that have never made any purchase in this Project (including non-subscription purchases and purchases in other Apps of this project) are eligible for a trial.
- *Didn't have any subscription yet*: Only customers that have never had any subscription in this Project (including in other Apps of the project) are eligible for a trial.
- *Didn't have this subscription yet*: Only customers that have never subscribed to this product are eligible for a trial.
- **Grace period**: Length of the subscription access retention after a billing issue.
- **Grace period**: Length of the subscription access retention after a billing issue. *See [Sandbox testing](/web/revenuecat-billing#renewals-in-sandbox) for more information about durations in sandbox mode.*
- **Price**: The price that will be charged for every period of the subscription in each currency. You can add prices in additional currencies by clicking "Add price". Only one price can be set per currency. [Read more about multi-currency support in RevenueCat Billing](/web/revenuecat-billing/multi-currency-support).

![New product configuration page](/images/rc-billing/new-product-configuration.png)

0 comments on commit 8e37a7f

Please sign in to comment.