riverty logo

Docs

Creating a Subscription Period

After creating a subscription, the next step is to add a subscription period. Each period is financed and invoiced individually and can be customized to match any subscription model. Using the partner API, the partner/merchant is responsible for creating the individual periods and triggering the invoice process for the individual periods using the Create an invoice request.

When a subscription period is created, Riverty purchases this period and settles the period price minus the product fee towards the merchant. For more information see Subscription Financing

PUT /v1/clients/{{ClientID}}/partner-subscriptions/{{PartnerSubscriptionID}}/periods/{{SubscriptionPeriodID}}

  • ClientID = Your Riverty client_id
  • PartnerSubscriptionID = The subscription ID
  • SubscriptionPeriodID = Assign your internal reference to this period. When left blank Riverty will assign an id

Subscription Period Call Example

    
        {
 "start": "{{StartDate}}",
 "end": "{{EndDate}}",
 "price": {
  "grossAmount": 10,
  "vatPercentage": 50
 }
}
    

Subscription Period Response Example

    
        {
 "status": "NOT_INVOICED",
 "start": "2023-09-01",
 "end": "2023-09-30",
 "price": {
  "grossAmount": 39.99,
  "vatPercentage": 20,
  "currencyCode": "NOK"
 },
 "_links": [
  {
   "method": "GET",
   "href": "https://api.riverty.io/partner-financing/v1/clients/1234/partner-subscriptions/subscription-id-1/periods/period-id-1",
   "rel": "self",
   "target": "API"
  },
  {
   "method": "GET",
   "href": "https://consumer.riverty.io/f/apgD/24G7eVlYeEnEB7Q1UkLBNvNx3Zh8Q3ArrVOGh7aYXD5j9gFdaewAGADGF51ZJgXgn7",
   "rel": "manage-payments",
   "target": "BROWSER"
  }
 ]
}