Billing APIs

Introduction
Billing API is a RESTful API that allows setting up customers, collecting payments and maintaining balances for these customers, as well as creating recurring billing subscriptions.

Billing API documentation includes the following sections:

Objects - lists all recurring billing objects. The purpose of this section is to describe all object fields, their format and usage, provide the links to the corresponding database tables.

Type Enumerations – lists possible values that can be used in the respective fields within Billing API requests and responses. The purpose of this section is to provide an explanation of all enumerations used for API calls.

Actions - lists all actions that can be performed with key recurring billing objects. The purpose of this section is to describe the methods and format of API requests and the format of responses.

Integration Notes – lists integration notes associated with the Billing API objects and actions. The purpose of this section is to provide explicit information about the peculiarities of specific actions and object fields.

Code samples - provides examples of recurring billing use cases (creating billing plans, subscriptions, freeing or canceling subscriptions, reversing transactions, etc) and their implementation in JSON, XML formats. The purpose of this section is to provide examples that can be used for testing of the integration with the gateway.

To learn how to work with the Billing API, we recommend reviewing the integration notes first. Key recurring billing module terms are available here. For more detailed information about the recurring billing configurations and management, check the Recurring Billing Guide.

Subscription

Type:  
Abstract:  no
Status:  Active
Java Class:  PaymentPlan
Information about the subscription transaction.

Available Fields:

# Name Type Pattern Format Mode Usage Description
1 pendingAdjustmentType Enum R O Type of the pending payment plan adjustment.
2 firstInvoicingDate Date O Date when the invoicing will occur for the first time.
For more information see integration notes.
3 nextInvoicingDate Date O
4 taxAmount Integer O Tax amount (in cents) associated with the transaction processing.
5 planName String(255) R O Name of the plan.
6 billingCycleType Enum C O Type of billing cycle used.
For more information see Billing Cycle Classifier.
7 code String(60) CODE C O Unique Subscription ID supplied by external/user's system.
Note: Optional secondary identifier. Typically this field is a reference to an ID in your own system to cross-reference it within our system. If not provided, the system will use the object 'id' generated at the time of object creation.
For more information see Reference Field Type.
8 createDate Datetime R O Date when the Subscription was created.
Note: Date format: yyyy-MM-dd.
9 firstBillingDate Date C R Date when the first billing occured.
For more information see integration notes.
10 id Long R O Unique Subscription ID generated by the system.
11 lastBillingDate Date R O Date when the last billing occured.
12 lastUpdateDate Datetime R O Date when the last update was made to the Subscription.
13 pendingAdjustmentEffectiveDate Date O Date when the pending adjustment for the Subscription become effective.
14 pendingAdjustmentLength Integer R O Number of times that the pending adjustment for the Subscription will generate an invoice.
15 pendingAdjustmentNote String(255) TEXT R Any additional details associated with the pending adjustment for the Subscription.
16 planId Reference C O Reference to a Plan that a Subscription is associated with.
Note: Reference to the Plan that the Customer is subscribing.
17 status Enum R O Status of the record in the system.
For more information see Payment Plan Status.
18 id Long R O
19 accountId Integer O
20 amount Integer O
21 createDate Datetime R O In API request, the date must be submitted in yyyy-MM-dd format.
In API response, the date is returned in yyyy-MM-dd HH:mm:ss format.
22 customerId Long O
23 firstBillingDate Date C R
24 lastBillingDate Date R O In API request, the date must be submitted in yyyy-MM-dd format.
In API response, the date is returned in yyyy-MM-dd HH:mm:ss format.
25 lastUpdateDate Datetime R O In API request, the date must be submitted in yyyy-MM-dd format.
In API response, the date is returned in yyyy-MM-dd HH:mm:ss format.
26 length Integer C O
Length parameter is required for Fixed Subscriptions and cannot exceed 3 years. For subscriptions longer than 3 years, use Perpetual Subscription type, which does not require length parameter. Length maximum value correlated with the selected billingCycleType:
  • annually - 3,
  • semi-annually - 6,
  • quarterly - 12,
  • monthly - 36,
  • weekly - 153.
27 nextBillingDate Date O The date must be submitted in yyyy-MM-dd format.
28 note String(255) TEXT O
29 paymentOptionId Reference R
30 planId Reference O Identifier of the associated payment plan.
31 status Enum R O
32 type Enum C O
33 billingCycleType Enum C O Type of the applied billing cycle.
34 pendingAdjustmentEffectiveDate Date O Effective date of the pending payment plan adjustment. The date must be submitted in yyyy-MM-dd format.
35 pendingAdjustmentNote String(255) TEXT R Note associated with the pending payment plan adjustment.
36 pendingAdjustmentLength Integer R O Length of the pending payment plan adjustment.
37 code String(60) CODE C O
38 planName String R O Name of the associated payment plan.
39 nextInvoicingDate Date O
40 firstInvoicingDate Date O
41 taxAmount Integer O

XML Sample:

<subscription
    pendingAdjustmentType="" 
    firstInvoicingDate="" 
    nextInvoicingDate="" 
    taxAmount="" 
    planName="" 
    billingCycleType="" 
    code="" 
    createDate="" 
    firstBillingDate="" 
    id="" 
    lastBillingDate="" 
    lastUpdateDate="" 
    pendingAdjustmentEffectiveDate="" 
    pendingAdjustmentLength="" 
    pendingAdjustmentNote="" 
    planId="" 
    status="" 
    id="" 
    accountId="" 
    amount="" 
    createDate="" 
    customerId="" 
    firstBillingDate="" 
    lastBillingDate="" 
    lastUpdateDate="" 
    length="" 
    nextBillingDate="" 
    note="" 
    paymentOptionId="" 
    planId="" 
    status="" 
    type="" 
    billingCycleType="" 
    pendingAdjustmentEffectiveDate="" 
    pendingAdjustmentNote="" 
    pendingAdjustmentLength="" 
    code="" 
    planName="" 
    nextInvoicingDate="" 
    firstInvoicingDate="" 
    taxAmount="" />

JSON Sample:

{
  "pendingAdjustmentType": "",
  "firstInvoicingDate": "",
  "nextInvoicingDate": "",
  "taxAmount": "",
  "planName": "",
  "billingCycleType": "",
  "code": "",
  "createDate": "",
  "firstBillingDate": "",
  "id": "",
  "lastBillingDate": "",
  "lastUpdateDate": "",
  "pendingAdjustmentEffectiveDate": "",
  "pendingAdjustmentLength": "",
  "pendingAdjustmentNote": "",
  "planId": "",
  "status": "",
  "accountId": "",
  "amount": "",
  "customerId": "",
  "length": "",
  "nextBillingDate": "",
  "note": "",
  "paymentOptionId": "",
  "type": ""
}

XURL Sample:

?pendingAdjustmentType=&firstInvoicingDate=&nextInvoicingDate=&taxAmount=&planName=&billingCycleType=&code=&createDate=&firstBillingDate=&id=&lastBillingDate=&lastUpdateDate=&pendingAdjustmentEffectiveDate=&pendingAdjustmentLength=&pendingAdjustmentNote=&planId=&status=&id=&accountId=&amount=&createDate=&customerId=&firstBillingDate=&lastBillingDate=&lastUpdateDate=&length=&nextBillingDate=&note=&paymentOptionId=&planId=&status=&type=&billingCycleType=&pendingAdjustmentEffectiveDate=&pendingAdjustmentNote=&pendingAdjustmentLength=&code=&planName=&nextInvoicingDate=&firstInvoicingDate=&taxAmount=&
pendingAdjustmentType=
firstInvoicingDate=
nextInvoicingDate=
taxAmount=
planName=
billingCycleType=
code=
createDate=
firstBillingDate=
id=
lastBillingDate=
lastUpdateDate=
pendingAdjustmentEffectiveDate=
pendingAdjustmentLength=
pendingAdjustmentNote=
planId=
status=
id=
accountId=
amount=
createDate=
customerId=
firstBillingDate=
lastBillingDate=
lastUpdateDate=
length=
nextBillingDate=
note=
paymentOptionId=
planId=
status=
type=
billingCycleType=
pendingAdjustmentEffectiveDate=
pendingAdjustmentNote=
pendingAdjustmentLength=
code=
planName=
nextInvoicingDate=
firstInvoicingDate=
taxAmount=