Helcim Logo Support & Tutorials

© Copyright 2006-2018 Helcim Inc.

All Rights Reserved.

Helcim Commerce API » Recurring »

View a Recurring Plan

This API call let's you retrieve the details of a specific recurring plan. The response is an XML of the available recurring plan information.

Request Fields

Field Name Type Required Description
action String Yes recurringPlanView
accountId Integer Yes The Helcim Commerce account ID.
apiToken String Yes API token used for authentication and access control. 
recurringPlanId Integer Yes The recurring plan ID.

Response Fields (XML)

Field Name Type Description
recurringPlans - XML structure
recurringPlan - XML structure
dateCreated String The date the plan was created.
dateLastBilled String The date of the last billing.
dateStarted String The date the recurring plan started.
dateNextBilling String The date the next payment is billed.
status Integer 1 or 0. Whether or not the recurring plan is active or not. 
name String The recurring plan name.
code String The recurring plan code.
token String The recurring plan token
description String The recurring plan description.
cyclesCount Integer The number of cycles billed.
period String The recurring plan billing period.
trialPeriodDays String The recurring plan trial period.
trialAutoSubscribe Integer 1 or 0. Whether the trial auto subscribes the customer.
amountInitial Decimal The initial amount due.
amountRecurring Decimal The recurring cost of the plan.
taxable Integer 1 or 0. Whether or not taxes apply.
proRataBilling Integer 1 or 0. Whether or not pro-rated billing applies to this plan.
showInCustomerPortal Integer 1 or 0. Whether or not the details will be shown in the customer portal.
editable Integer 1 or 0. Whether or not the recurring plan can be edited.
cancelable Integer 1 or 0. Whether or not the recurring plan can be cancelled.
automaticRecurring Integer 1 or 0. Whether the plan auto subscribes the customer.
subscriptions - XML structure
subscription - XML structure
id Integer The subscription ID.
customer - XML structure
customerCode String The customer code.
businessName String The business name.
contactName String The contact name.
customer - XML structure
dateCreated String The date the subscription was created.
dateStarted String The date the subscription started.
dateRemoved String The date the subscription was removed.
status String  Active/Inactive.
amountRecurring Decimal The recurring cost of the subscription.
cyclesBilled Integer The number of billing cycles occured.
cyclesTotal Integer The total number of cycles.

Errors

For all API requests, there are also generic API authentication and user access restriction errors.
Response Code Error Code Message Description
0 - Invalid Recurring Plan ID The plan ID provided was invalid, or not entered.

Code Samples

Sample Recurring Plan View Response XML

<?xml version="1.0"?>
<recurringPlans>
    <recurringPlan>
        <dateCreated>2017-03-30 13:16:09</dateCreated>
        <dateLastBilled>2017-06-01 03:00:05</dateLastBilled>
        <dateStarted>2017-03-01 00:00:00</dateStarted>
        <dateNextBilling>2017-07-01 00:00:00</dateNextBilling>
        <status>1</status>
        <name>$20.00 Donation </name>
        <code>DNTE20</code>
        <token>a99559ae4776235eb4aaa6</token>
        <description></description>
        <cyclesCount>2</cyclesCount>
        <period>1 months</period>
        <trialPeriodDays>0</trialPeriodDays>
        <trialAutoSubscribe>1</trialAutoSubscribe>
        <amountInitial>0.00</amountInitial>
        <amountRecurring>20.00</amountRecurring>
        <taxable>1</taxable>
        <proRataBilling>0</proRataBilling>
        <showInCustomerPortal>1</showInCustomerPortal>
        <editable>1</editable>
        <cancelable>1</cancelable>
        <automaticRecurring>1</automaticRecurring>
        <subscriptions>
            <subscription>
                <id>3776</id>
                <customer>
                    <customerCode>Aaron Hamilton</customerCode>
                    <businessName>Testing Test Inc</businessName>
                    <contactName>12A1064</contactName>
                </customer>
                <dateCreated>2017-05-01 10:09:02</dateCreated>
                <dateStarted>2017-05-01 00:00:00</dateStarted>
                <dateRemoved>0000-00-00 00:00:00</dateRemoved>
                <status>ACTIVE</status>
                <amountRecurring>20.00</amountRecurring>
                <cyclesBilled>1</cyclesBilled>
                <cyclesTotal>0</cyclesTotal>
            </subscription>
            <subscription>
                <id>3215</id>
                <customer>
                    <customerCode>SVETLANA LEVINA</customerCode>
                    <businessName>SVETLANA LEVINA</businessName>
                    <contactName>12A1009</contactName>
                </customer>
                <dateCreated>2017-04-15 16:33:27</dateCreated>
                <dateStarted>2017-04-15 00:00:00</dateStarted>
                <dateRemoved>0000-00-00 00:00:00</dateRemoved>
                <status>ACTIVE</status>
                <amountRecurring>20.00</amountRecurring>
                <cyclesBilled>2</cyclesBilled>
                <cyclesTotal>0</cyclesTotal>
            </subscription>
        </subscriptions>
    </recurringPlan>
</recurringPlans>

HTML Form Sample HTML

<input type="hidden" name="accountId" value="YOUR-ACCOUNT-ID">
<input type="hidden" name="apiToken" value="YOUR-API-TOKEN">
<input type="hidden" name="action" value="recurringPlanView">
<input type="hidden" name="recurringPlanId" value="500">