Offer a trial period

DocsCurrentLast updated: June 20th 2023, @ 12:08:42 pm


Use a trial period to let subscribers try your product at a free or discounted price before regular billing cycles start. After the trial period ends, the regular billing period for the subscription begins. You can have up to 2 trial periods per plan.

The following sample requests show how to offer trial periods. Use these samples to adjust your code when you create a plan.

Example: Music service

The following example creates a trial period with the following characteristics:

  • $0 for the first month.
  • $15 per month following the trial period.

1curl -v –X POST https://api-m.sandbox.paypal.com/v1/billing/plans
2-H "PayPal-Auth-Assertion: AUTH-ASSERTION"
3-H "Accept: application/json"
4-H "Authorization: Bearer ACCESS-TOKEN"
5-H "Content-Type: application/json"
6-H "PayPal-Request-Id: PLAN-18062020-002"
7-d '{
8"name": "Premium Music Plus",
9"description": "A premium plan with music download feature",
10"product_id": "PROD-5RN21878H3527870P",
11"billing_cycles": [{
12 "frequency": {
13 "interval_unit": "MONTH",
14 "interval_count": 1
15 },
16 "tenure_type": "TRIAL",
17 "sequence": 1,
18 "total_cycles": 1,
19 "pricing_scheme": {
20 "fixed_price": {
21 "value": "0",
22 "currency_code": "USD"
23 }
24 }
25}, {
26 "frequency": {
27 "interval_unit": "MONTH",
28 "interval_count": 1
29 },
30 "tenure_type": "REGULAR",
31 "sequence": 2,
32 "total_cycles": 0,
33 "pricing_scheme": {
34 "fixed_price": {
35 "value": "15",
36 "currency_code": "USD"
37 }
38 }
39}], "payment_preferences": {
40 "auto_bill_outstanding": true,
41 "payment_failure_threshold": 1
42 }
43}'

Example: Online tutorial service

The following example creates a trial period with the following characteristics:

  • $0 free trial for the first week.
  • $5 per week discounted trial for the next 3 weeks.
  • $10 per week following the trial period.

1curl -v –X POST https://api-m.sandbox.paypal.com/v1/billing/plans
2-H "PayPal-Auth-Assertion: AUTH-ASSERTION"
3-H "Accept: application/json"
4-H "Authorization: Bearer ACCESS-TOKEN"
5-H "Content-Type: application/json"
6-H "PayPal-Request-Id: PLAN-18062020-003"
7-d '{
8 "name": "Music Tutorial Premium Plus",
9 "description": "Offering a premium music tutorial with download feature",
10 "product_id": "PROD-5RN21878H3527870P",
11 "billing_cycles": [{
12 "frequency": {
13 "interval_unit": "WEEK",
14 "interval_count": 1
15 },
16 "tenure_type": "TRIAL",
17 "sequence": 1,
18 "total_cycles": 1,
19 "pricing_scheme": {
20 "fixed_price": {
21 "value": "0",
22 "currency_code": "USD"
23 }
24 }
25}, {
26 "frequency": {
27 "interval_unit": "WEEK",
28 "interval_count": 1
29 },
30 "tenure_type": "TRIAL",
31 "sequence": 2,
32 "total_cycles": 3,
33 "pricing_scheme": {
34 "fixed_price": {
35 "value": "5",
36 "currency_code": "USD"
37 }
38 }
39}, {
40 "frequency": {
41 "interval_unit": "WEEK",
42 "interval_count": 1
43 },
44 "tenure_type": "REGULAR",
45 "sequence": 3,
46 "total_cycles": 0,
47 "pricing_scheme": {
48 "fixed_price": {
49 "value": "10",
50 "currency_code": "USD"
51 }
52 }
53}], "payment_preferences": {
54 "auto_bill_outstanding": true,
55 "payment_failure_threshold": 1
56 }
57}'

See also