POST /storefront/subscriptions
Creates a subscription order in a billing portal.
Servers
- https://api-sandbox.rebilly.com/organizations/{organizationId}
- https://api.rebilly.com/organizations/{organizationId}
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
deliveryAddress |
Object | No |
Delivery address details. |
items[] |
Array | Yes |
Details of items in the order. |
items[].usageLimits |
Object | No |
Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. This value is ignored when the plan is not metered. |
items[].usageLimits.softLimit |
Object | No |
Defines thresholds for notification purposes. For example, to notify the customer that their usage is near the hard limit of their metered billing plan. This notification informs the customer so that they can upgrade their plan before the hard limit is reached. When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is fired. To notify the customer, a webhook and notification can be configured for this event. This field is useful for accounting and customer success purposes. The usage of metered billing plans can still be reported if the soft limit is reached. |
items[].usageLimits.softLimit.amount |
Number | No |
Usage limit amount in the currency of the order. |
items[].usageLimits.softLimit.quantity |
Integer | No |
Usage limit quantity. |
items[].usageLimits.trialLimit |
No |
Defines a usage cap during the trial period of a subscription. This limit is enforced only while the subscription is in its trial phase. When the reported usage reaches the configured trial limit, an event called 'trial-usage-limit-reached' is triggered. To notify the customer or restrict access to the service, a webhook and notification can be configured for this event. Once the trial limit is reached, additional usage cannot be reported unless the trial ends. |
|
items[].usageLimits.hardLimit |
Object | No |
Defines a limit where the customer can no longer use the service. Hard limits are used in addition to soft limits. When a soft limit is reached, a customer may receive a notification but the service can still be provided up to the hard limit value so that the customer can upgrade their plan. When the reported usage reaches the configured limit, a specific event is triggered. To notify the customer in the merchant system, or block a service, a webhook and notification can be configured for this event. When the total usage reaches the hard limit quantity, or amount values, metered billing plan usages can no longer be reported. |
items[].usageLimits.hardLimit.amount |
Number | No |
Usage limit amount in the currency of the order. |
items[].usageLimits.hardLimit.quantity |
Integer | No |
Usage limit quantity. |
items[].planId |
String | Yes |
ID of the plan. |
items[].quantity |
Integer | No |
Number of units of the product on the given plan. |
billingPortalId |
String | Yes |
ID of the billing portal. |
billingAddress |
Object | No |
Billing address details. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.