---
title: "Subscription details"
canonical_url: https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/subscription-details
---

1. [Home](https://docs.connect.worldline-solutions.com/)
2. [Developer tools](https://docs.connect.worldline-solutions.com/documentation.md)
3. [Hosted payment pages](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages.md)
4. Subscription details

Page topics  

# Subscription details

If you offer subscription services, the required API request fields vary by the subscription model you choose. Common models include:

* [No trial period](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/subscription-details.md#no-trial): The consumer is billed the total subscription cost at regular intervals (days, weeks, months, or years) starting from sign-up, with subsequent renewals unless canceled.
* [Free trial](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/subscription-details.md#free-trial): A predefined trial period during which charges are waived. After the trial, billing begins at the standard subscription rate.
* [Discount trial offer](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/subscription-details.md#discount-trial): A reduced rate for a defined trial period, then the regular price starts afterward.
* [Discounted trial paid upfront](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/subscription-details.md#discount-paid): The entire discounted trial period cost is paid upfront at signup; after the trial, billing proceeds at the standard rate.

Each model has its own data requirements and timing rules for when charges occur. All scenarios below cover the requirements to comply with [Mastercard recurring mandate](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/compliance-hosted-payment-pages.md#mastercard-recurring-payments-mandate).

## Scenarios

#### No trial period

A consumer initiates the subscription and pays the total amount every X number of days/weeks/months/quarters/years.

* isRecurring set to **true**.
* recurringPaymentsData.recurringInterval.intervalFrequency.
* recurringPaymentsData.recurringInterval.interval.
* order.amountOfMoney - the amount consumer will be paying.

POST HOSTEDCHECKOUTS REQUESTCopy code

```hljs javascript language-javascript
{
        "order": {
          "amountOfMoney": {
            "currencyCode": "EUR",
            "amount": 2345
          },
          "customer": {
              "merchantCustomerId":89769876,
            "billingAddress": {
                 
              "countryCode": "NL"
            }
          }
        },
        "hostedCheckoutSpecificInput": {
          "isRecurring": true,
          "recurringPaymentsData": {
              "recurringInterval":{
                  "intervalFrequency": "1",
                  "interval": "weeks"
              }
          },
          "variant": "testVariant",
          "locale": "en_GB"
        }
      }
      
```

![no-trial-period-checkout-page-details](https://docs.connect.worldline-solutions.com/dA/51541e3a19/fileAsset/No trial period.png)

#### Free trial

A consumer initiates the subscription and pays the total amount every X number of days/weeks/months/quarters/years.

* isRecurring set to **true**.
* recurringPaymentsData.recurringInterval.intervalFrequency.
* recurringPaymentsData.recurringInterval.interval order.amountOfMoney set to zero.
* recurringPaymentsData.trialInformation.amountOfMoneyAfterTrial - the amount that the cardholder will be paying after the free trial.
* recurringPaymentsData.trialInformation.endDate **OR** recurringPaymentsData.trialInformation.trialPeriod.

TRIAL END DATE REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 0
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
           
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "endDate": "20300201",
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    },
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
```

![free-trial-with-end-date-checkout-screen](https://docs.connect.worldline-solutions.com/dA/b0d417b4a7/fileAsset/Free trial 1.png)  
TRIAL PERIOD REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 0
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
          
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "trialPeriod": {
            "duration":20,
            "interval":"days"
        },
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    }, 
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
```

![free-trial-with-trial-period-checkout-screen](https://docs.connect.worldline-solutions.com/dA/7a8bf6266e/fileAsset/Free trial 2.png)

#### Discount trial offer

Subscription starts with a discount applied to X period of time.

* isRecurring set to **true**.
* recurringPaymentsData.recurringInterval.intervalFrequency.
* recurringPaymentsData.recurringInterval.interval.
* order.amountOfMoney should be populated with the discounted amount.
* recurringPaymentsData.trialInformation.amountOfMoneyAfterTrial - the amount cardholder will be paying after the discount trial.
* recurringPaymentsData.trialInformation.endDate **OR** recurringPaymentsData.trialInformation.trialPeriod.
* recurringPaymentsData.trialInformation.isRecurring set to **true**.

Optionally, you can set recurringPaymentsData.trialInformation.trialPeriodRecurringInterval if the billing frequency during the trial period is different from the main subscription period.  
TRIAL PERIOD REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 500
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
          
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "isRecurring": true,
        "trialPeriod": {
            "duration":2,
            "interval":"weeks"
        },
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    }, 
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
    
```

![discount-trial-offer-with-trial-period-checkout-page](https://docs.connect.worldline-solutions.com/dA/a80fb45cc5/fileAsset/Discount trial offer 1.png)  
TRIAL END DATE REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 500
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
          
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "isRecurring": true,
        "endDate": "20300201", 
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    }, 
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
        
```

![discount-trial-offer-with-trial-end-date-checkout-screen](https://docs.connect.worldline-solutions.com/dA/9d423cf6a2/fileAsset/Discount trial offer 2.png)

#### Discount trial offer, paid fully upfront

A consumer initiates the subscription and pays the discounted price for the trial period upfront.

* isRecurring set to **true**.
* recurringPaymentsData.recurringInterval.intervalFrequency.
* recurringPaymentsData.recurringInterval.interval.
* order.amountOfMoney - the amount to be paid once.
* recurringPaymentsData.trialInformation.amountOfMoneyAfterTrial - the amount consumer will be paying after the discount trial.
* recurringPaymentsData.trialInformation.endDate **OR** recurringPaymentsData.trialInformation.trialPeriod - discount period for X amount of days/quarters/months/years **OR** until X-date.

TRIAL PERIOD REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 5000
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
          
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "isRecurring": false,
        "trialPeriod": {
            "duration": 10,
            "interval": "weeks"
        },
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    }, 
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
```

![discount-trial-paid-upfront-with-trial-preiod-checkout-screen](https://docs.connect.worldline-solutions.com/dA/f9a65e190b/fileAsset/Discount trial paid upfront 1.png)  
TRIAL END DATE REQUESTCopy code

```hljs javascript language-javascript

    {
  "order": {
    "amountOfMoney": {
      "currencyCode": "EUR",
      "amount": 5000
    },
    "customer": {
        "merchantCustomerId":89769876,
      "billingAddress": {
          
        "countryCode": "NL"
      }
    }
  },
  "hostedCheckoutSpecificInput": {
    "isRecurring": true,
    "recurringPaymentsData": {
        "trialInformation":{
        "isRecurring": false,
        "endDate": "20300201", 
        "amountOfMoneyAfterTrial":{
            "currencyCode": "EUR",
            "amount": 1000
        }
    },
        "recurringInterval":{
            "intervalFrequency": "1",
            "interval": "weeks"
        }
    }, 
    "variant": "testVariant",
    "locale": "en_GB"
  }
}
```

![discount-trial-paid-upfront-with-trial-end-date-checkout-screen](https://docs.connect.worldline-solutions.com/dA/c38a61b641/fileAsset/Discount trial paid upfront 2.png)
