Subscription/List

List existing subscriptions. Maximum resuts is 100 subscriptions.

Coupons that are no longer compatible with the subscription (either because their status, because they've expired, because they are one-time coupons, or because this product is restricted) will be returned in the coupon namespace with an attribute named "qualification_status" which will be set to "disqualified".

Parameters
Parameter Type Required Description
subscription_id string optional To list the details of a specific subscription.
customer_account_id string optional The 'customer_account_id' of an active customer if you want to search using it.
status string optional Provide a status to search for subscriptions in a specific state. For example; '1' for active.
custom_field_1 string optional The value of your first custom field.
custom_field_2 string optional The value of your first custom field.
GET https://api.recurringstack.com/{format}/Subscription/List
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "",'customer_account_id' => "",'status' => "",'custom_field_1' => "",'custom_field_2' => "");
try { $response = $rstack->request('Subscription/List','GET',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Estimate

Estimate the cost of creating a new subscription for a customer. This endpoint allows you to calculate and optionally display the up-front and future cost of a subscription to a customer.

To subscribe the customer to one or more components format the components in JSON format, being sure to provide the number of 'units'. For 'traditional' components the 'units' must be 1.

Example JSON:
[{"component_id":"16b9873a-0e40-4240-8875-60637ae24511","units":"5"},{"component_id":"85EReh89H-0B40-5858-EE33-6063EUB3882S","units":"1"}]
Tax calculations have not been implemented into this API yet.

Parameters
Parameter Type Required Description
customer_account_id string required The 'customer_account_id' of the customer starting the new subscription.
product_id string required The 'product_id' the customer wants to subscribe to.
attached_components string optional A JSON formatted list of components with the appropriate options; see above example. Components must be from the same product group as the product.
coupon_code string optional One or more coupon codes in comma seperated format. To use multiple coupons all coupons provided must be stackable.
pay_method_id string optional The 'pay_method_id' of the payment method the customer will use to pay for the subscription. Only provide if you want to confirm the pay methods status before charging.
override_initial_billing string optional Provide a 'Y' to skip the initial billing of the subscription and mark the invoice as PAID. Useful if you've already charged the customer via PayPal or other payment method.
GET https://api.recurringstack.com/{format}/Subscription/Estimate
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('customer_account_id' => "",'product_id' => "",'attached_components' => "",'coupon_code' => "",'pay_method_id' => "",'override_initial_billing' => "");
try { $response = $rstack->request('Subscription/Estimate','GET',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Create

Create a new subscription for a customer.

When creating a subscription, you must specify a product (product_id) and a customer (customer_account_id). One or more components can be attached to the subscription at the time of it's creation or you can attach components at any time in the future.

To subscribe the customer to one or more components format the components in JSON format, being sure to provide the number of 'units'. For 'traditional' components the 'units' must be 1.

Example JSON:
[{"component_id":"16b9873a-0e40-4240-8875-60637ae24511","units":"5"},{"component_id":"85EReh89H-0B40-5858-EE33-6063EUB3882S","units":"1"}]
This service will attempt to charge the customers 'pay_method_id' for the initial charges due (utilize the 'Subscription/Estimate' service to determine and display intial charges). Unverified pay methods cannot be utilized. To use/add a new pay method call the 'PayMethod/Create' service first, being sure to provide a 'N' for the 'require_verification' parameter if you want the customer to utilize the pay method instantly.

To skip real-time billing and use a third party payment service (eg. BitPay or PayPal) provide a 'Y' for the 'override_initial_billing' parameter.

Parameters
Parameter Type Required Description
customer_account_id string required The 'customer_account_id' of the customer starting the new subscription.
product_id string required The 'product_id' the customer wants to subscribe to.
attached_components string optional A JSON formatted list of components with the appropriate options; see above example. Components must be from the same product group as the product.
coupon_code string optional One or more coupon codes in comma seperated format. To use multiple coupons all coupons provided must be stackable.
pay_method_id string optional The 'pay_method_id' of the payment method the customer will use to pay for the initial cost of the subscription. If the subscription charge is $0.00 the payment method wont be charged but will be utilized for future billing if 'auto_pay' is set to 'Y'.
override_initial_billing string required Provide a 'Y' to skip the initial billing of the subscription and mark the invoice as PAID. Useful if you've already charged the customer via PayPal or other payment method.
payment_gateway string optional Provide a payment gateway name (ie. PayPal) if using a third party payment gatway; 'override_initial_billing' must be set to 'Y'.
payment_transaction_id string optional You can provide a payment transaction id if a thrid party payment service (ie. PayPal) was used to bill the customer; 'override_initial_billing' must be 'Y'.
auto_pay string required Provide a 'Y' to automatically charge the 'pay_method_id' for any invoices related to the subscription on the renewal date (invoices are automatically generated 72 hours prior to the renewal date). Provide an 'N' to disable auto pay. If no 'pay_method_id' is specified on the subscription the customers default 'pay_method_id' will be utiilized if set (PayMethod/SetDefault).
custom_field_1 string optional A custom field of your choice.
custom_field_2 string optional A custom field of your choice.
VAR1 string optional The value of VAR1 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR2 string optional The value of VAR2 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR3 string optional The value of VAR3 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR4 string optional The value of VAR4 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR5 string optional The value of VAR5 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR6 string optional The value of VAR6 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR7 string optional The value of VAR7 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR8 string optional The value of VAR8 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR9 string optional The value of VAR9 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR10 string optional The value of VAR10 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
POST https://api.recurringstack.com/{format}/Subscription/Create
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('customer_account_id' => "",'product_id' => "",'attached_components' => "",'coupon_code' => "",'pay_method_id' => "",'override_initial_billing' => "",'payment_gateway' => "",'payment_transaction_id' => "",'auto_pay' => "",'custom_field_1' => "",'custom_field_2' => "",'VAR1' => "",'VAR2' => "",'VAR3' => "",'VAR4' => "",'VAR5' => "",'VAR6' => "",'VAR7' => "",'VAR8' => "",'VAR9' => "",'VAR10' => "");
try { $response = $rstack->request('Subscription/Create','POST',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Update

Update an existing subscription.

Changes made to a subscription will take effect immediately. If changes are made before the billing cycle renewal date the next payment will be calculated using the updated data (after the change), not the old data (before the change).

Because a subscription contains a large amount of information and parameters, unlike other 'update' services, certain parameters will not be updated if a value is not provided. This prevents you from having to provide information about a subscription that doesn't need updating.

Exempt parameters (exempt meaning they will not be updated or validated if not provided) include:

payment_transaction_id
renewal_date

All other parameters work like every other service and will update to the value you provide or if you provide no value will be cleared.
This service is NOT used to update the usage for a metered or quantitative component, instead use the 'Subscription/ReportUsage' service.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription you want to update.
customer_account_id string required The 'customer_account_id' of the subscribed customer. Although not required on most 'Update' services; the 'customer_account_id' is required to update a subscriptiption to ensure data validity.
attached_components string optional A JSON formatted list of components with the appropriate options; see above example. Components must be from the same product group as the product.
coupon_code string optional One or more coupon codes in comma seperated format. To use multiple coupons all coupons provided must be stackable.
payment_transaction_id string optional You can provide a payment transaction id if a thrid party payment service (ie. PayPal) was used to bill the customer; 'override_initial_billing' must have been 'Y' at the time the subscription was created.
renewal_date string optional To change the next renewal date for the subscription provide a new renewal date in the 'm/d/yyyy' format.
pay_method_id string optional The 'pay_method_id' of the payment method the customer will use to pay for the subscription on a recurring basis. Only utilized if 'auto-pay' is set to 'Y'. If no 'pay_method_id' is specified on the subscription the customers default 'pay_method_id' will be utiilized if set (PayMethod/SetDefault).
auto_pay string required Provide a 'Y' to automatically charge the 'pay_method_id' for any invoices related to the subscription on the renewal date (invoices are automatically generated 72 hours prior to the renewal date). Provide an 'N' to disable auto pay. If no 'pay_method_id' is specified on the subscription the customers default 'pay_method_id' will be utiilized if set (PayMethod/SetDefault).
custom_field_1 string optional A custom field of your choice.
custom_field_2 string optional A custom field of your choice.
VAR1 string optional The value of VAR1 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR2 string optional The value of VAR2 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR3 string optional The value of VAR3 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR4 string optional The value of VAR4 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR5 string optional The value of VAR5 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR6 string optional The value of VAR6 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR7 string optional The value of VAR7 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR8 string optional The value of VAR8 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR9 string optional The value of VAR9 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
VAR10 string optional The value of VAR10 that corresponds to the variable on the product group. If the variable type is 'Options' the value must be one of those options.
POST https://api.recurringstack.com/{format}/Subscription/Update
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "",'customer_account_id' => "",'attached_components' => "",'coupon_code' => "",'payment_transaction_id' => "",'renewal_date' => "",'pay_method_id' => "",'auto_pay' => "",'custom_field_1' => "",'custom_field_2' => "",'VAR1' => "",'VAR2' => "",'VAR3' => "",'VAR4' => "",'VAR5' => "",'VAR6' => "",'VAR7' => "",'VAR8' => "",'VAR9' => "",'VAR10' => "");
try { $response = $rstack->request('Subscription/Update','POST',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/ChangeProduct

Change the product associated with an existing subscription.

If the new product ('product_id') is not from the same product group as the existing product existing components associated with the subscription will not be valid and a error will be returned. To remove all components from the subscription provide a 'Y' for 'remove_components'. To remove all coupon codes from a subscription provide a 'Y' for 'remove_coupons'.

Should you need to update the components or the coupon(s) at a later time you should use the 'Subscription/Update' service.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription you want to update.
customer_account_id string required The 'customer_account_id' of the subscribed customer.
product_id string required The id of the product you want associated with the subscription.
remove_components string optional Provide a 'Y' to remove all existing components assoiated with the subscription.
remove_coupons string optional Provide a 'Y' to remove all existing coupons assoiated with the subscription.
POST https://api.recurringstack.com/{format}/Subscription/ChangeProduct
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "",'customer_account_id' => "",'product_id' => "",'remove_components' => "",'remove_coupons' => "");
try { $response = $rstack->request('Subscription/ChangeProduct','POST',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Suspend

Place a active subscription in a suspended state.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription you want to suspend.
PATCH https://api.recurringstack.com/{format}/Subscription/Suspend
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "");
try { $response = $rstack->request('Subscription/Suspend','PATCH',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Delete

Cancel/delete a subscription.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription you want to delete.
DELETE https://api.recurringstack.com/{format}/Subscription/Delete
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "");
try { $response = $rstack->request('Subscription/Delete','DELETE',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/ReportUsage

This service allows you to report usage for a compnent already attached to a subscription.

You may choose to report metered or prepaid usage as you wish. If usage events occur in your system very frequently (hundreads of times an hour or more), it is best to accumulate usage into batches on your side, and then report those batches less frequently, such as daily. This will ensure you remain below any API throttling limits.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription with the component you wish to report usage for.
customer_account_id string required The 'customer_account_id' of the subscribed customer.
component_id string required The id of the component you want to update.
units string required The amount of units to update on the component.
expression_type string required Choices are 'additive' ('units' are added to the existing 'unit' total) and 'cumulative' ('units' is the entirety of the unit total).
PATCH https://api.recurringstack.com/{format}/Subscription/ReportUsage
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "",'customer_account_id' => "",'component_id' => "",'units' => "",'expression_type' => "");
try { $response = $rstack->request('Subscription/ReportUsage','PATCH',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/Restore

If you suspended or paused a subscription for any reason you can utilize this service to restore it.

RecurringStackā„¢ may also suspend a subscription in accordance with your dunning rules (usually when a customer has unpaid invoices), this service may be used to override these kind of suspension as well.

Deleted subscriptions cannot be restored.
If the subscription was suspended automatically by RecurringStackā„¢ in accordance with your dunning rules it's important to keep in mind that RecurringStackā„¢ will likely suspend the subscription again if the customer has any outstanding invoices connected to the subscription. To avoid this situation you may need to cure any outstanding invoices.

Parameters
Parameter Type Required Description
subscription_id string required The 'subscription_id' of the subscription you want to restore.
PATCH https://api.recurringstack.com/{format}/Subscription/Restore
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "");
try { $response = $rstack->request('Subscription/Restore','PATCH',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Subscription/UpdateAutoPay

Updtae the auto pay status and pay method for a subscription.

Parameters
Parameter Type Required Description
subscription_id string required The id of the subscription you want to update.
customer_account_id string required The 'customer_account_id' of the subscribed customer. Although not required on most 'Update' services; the 'customer_account_id' is required to update a subscriptiption to ensure data validity.
auto_pay string required Provide a 'Y' to automatically charge the 'pay_method_id' for any invoices related to the subscription on the renewal date (invoices are automatically generated 72 hours prior to the renewal date). Provide an 'N' to disable auto pay. If no 'pay_method_id' is specified on the subscription the customers default 'pay_method_id' will be utiilized if set (PayMethod/SetDefault).
pay_method_id string optional The 'pay_method_id' of the payment method the customer will use to pay for the subscription on a recurring basis. Only utilized if 'auto-pay' is set to 'Y'. If no 'pay_method_id' is specified on the subscription the customers default 'pay_method_id' will be utiilized if set (PayMethod/SetDefault).
PATCH https://api.recurringstack.com/{format}/Subscription/UpdateAutoPay
//key,user_key,brand_id,response_format (xml or json),return (clean = return object, leave blank to return raw)
$rstack = new recurringstack('','','','xml','clean'); 

$params = array('subscription_id' => "",'customer_account_id' => "",'auto_pay' => "",'pay_method_id' => "");
try { $response = $rstack->request('Subscription/UpdateAutoPay','PATCH',$params); } catch(Exception $e) { $error =  $e->getMessage(); echo "Error: $error"; }
print_r($response);
Response

Your content here

Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui, natus temporibus voluptate corporis possimus ab aut cumque.

Homepage

Quick Tips

You may remove all ID or Class names which contain _dm-, they are only used for demonstration.


Boxed Layout

Fluid Layout Remove the .boxed-layout and .centered-layout classes from the body.
Centered Layout Add a class .centered-layout to the body.
Boxed Layout Add a class .boxed-layout to the body.
Boxed Layout with background image

Add background image to the body.

<body class="boxed-layout" style='background-image: url("path_to_img/image.jpg");'>
    ..
    ..
</body>

Or it could be in your own class.

.bg-img {
background-image: url("path_to_img/image.jpg");
}
<body class="boxed-layout bg-img">
    ..
    ..
</body>

Color Schemes

Replace the current Bootstrap CSS and Nifty CSS path with the new path of the CSS color schemes you wish to use.

This is where you can change the color scheme of your app / website.

<head>
    ...
    <title>My Project</title>
    ...

    <!-- STYLESHEETS -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- -->

    <!-- Bootstrap CSS [ REQUIRED ] -->
    <link rel="stylesheet" href="documentation/assets/css/color-schemes/SELECTED-SCEHEMS/bootstrap.min.css">

    <!-- Nifty CSS [ REQUIRED ] -->
    <link rel="stylesheet" href="documentation/assets/css/color-schemes/SELECTED-SCEHEMS/nifty.min.css">

</head>

Header

Sticky header Add a class .hd--sticky to the #root.
Expanded header Add a class .hd--expanded to the #root.
Expanded header with overlapping content. Add a class .overlapping to the #content > .content__header.
Disable rounded header. Add a class .rounded-0 to the #content > .content__header.

Animations

Add the following class to the body to change the animation transition.

Transition function name Class name
In Quart .in-quart
Out Quart .out-quart
In Back .in-back
Out Back .out-back
In Out Back .in-out-back
easeInOutBack .easeInOutBack
steps .steps
jumping .jumping
rubber .rubber
RecurringStack Documentation
RecurringStack Docs
Sign In

Background Images

Add an image to replace the solid background color
Layouts
Layouts
Transitions
Header
Additional Offcanvas New in BS v.5.0

Select the offcanvas placement.

Sidebars
Navigation
Right sidebar
Color Schemes
Light Completely bright color themes.
Dark Completely dark color themes.
Expanded Header
Fair Header
Full Header
Primary Nav
Brand
Tall Header New in v3.0
Scrollbars

Hides native scrollbars and creates custom styleable overlay scrollbars.

Offcanvas Header
Content Here

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente eos nihil earum aliquam quod in dolor, aspernatur obcaecati et at. Dicta, ipsum aut, fugit nam dolore porro non est totam sapiente animi recusandae obcaecati dolorum, rem ullam cumque. Illum quidem reiciendis autem neque excepturi odit est accusantium, facilis provident molestias, dicta obcaecati itaque ducimus fuga iure in distinctio voluptate nesciunt dignissimos rem error a. Expedita officiis nam dolore dolores ea. Soluta repellendus delectus culpa quo. Ea tenetur impedit error quod exercitationem ut ad provident quisquam omnis! Nostrum quasi ex delectus vero, facilis aut recusandae deleniti beatae. Qui velit commodi inventore.