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, XURL 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.


Transaction

Type:  
Abstract:  no
Status:  Active
Java Class:  Transaction
Represents a transaction associated with a particular merchant.
id
References: Account Activity.Id
XML Representation: attribute
Attributes:
Default Value
Identifier of the object used for references; auto-incremented integer value.
code
References: Account Activity.Reference Code
XML Representation: attribute
Attributes:
Default Value
See Reference Code definition for additional information.
accountId
References: Account Activity.Merchant Account Code
XML Representation: attribute
Attributes:
Default Value
Code of Merchant Account to which instance of this object is attributed to.
Depending on the context, Merchant Account Code field may contain either Merchant Code or Merchant Account Code.
The field is primarily used for data partitioning and data management, to make it easy to determine the ownership of a record within the database.
customerId
References: Account Activity.Customer Account FK
XML Representation: attribute
Attributes:
Default Value
createDate
References: Account Activity.Create Date
XML Representation: attribute
Attributes:
Default Value
Date when the record was created

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.
dueDate
Type: Datetime
XML Representation: attribute
Attributes:
Default Value
The date must be submitted in yyyy-MM-dd format.
type
References: Account Activity.Account Activity CL
XML Representation: attribute
Attributes:
Default Value
Represents the type of account activity.
accountType
References: Asset Transaction.Transaction CL
XML Representation: attribute
Attributes:
Default Value
Enumeration of possible asset transaction processing modes available in the system.
creatorCode
References: Account Transaction.Ref Creator Code
XML Representation: attribute
Attributes:
Default Value
Code of the user that created the account transaction.
amount
References: Account Transaction.Amount
XML Representation: attribute
Attributes: Required
Default Value
Amount of the transaction in cents (without a decimal point).
balance
References: Account Transaction.Balance
XML Representation: attribute
Attributes:
Default Value
Remaining balance of the transaction.
accountNumber
References: Asset Transaction.Masked Account Number
XML Representation: attribute
Attributes:
Default Value
Masked account number of the sutomer.
note
References: Account Transaction.Note
XML Representation: attribute
Attributes:
Default Value
Description of the transaction.
adjustmentId
References: Account Transaction.Adjustment Transaction FK
XML Representation: attribute
Attributes:
Default Value
Reference to the entity that represents account transaction.
processingInfo
XML Representation: element
Attributes:
Default Value
Reference to the entity that represents capture information.

XML Sample:

<transaction
    id="" 
    code="" 
    accountId="" 
    customerId="" 
    createDate="" 
    dueDate="" 
    type="" 
    accountType="" 
    creatorCode="" 
    amount="" 
    balance="" 
    accountNumber="" 
    note="" 
    adjustmentId="" >
    <processingInfo
        id="" 
        createDate="" 
        holderName="" 
        accountNumber="" 
        accountAccessory="" 
        token="" 
        street="" 
        city="" 
        state="" 
        zipCode="" 
        phone="" 
        email="" 
        gatewayTransactionId="" 
        approvalCode="" 
        responseDate="" 
        responseCode="" 
        responseMessage="" 
        address="" />
</transaction>

"<transaction id=\"\" code=\"\" accountId=\"\" customerId=\"\" createDate=\"\" dueDate=\"\" type=\"\" accountType=\"\" creatorCode=\"\" amount=\"\" balance=\"\" accountNumber=\"\" note=\"\" adjustmentId=\"\" > <processingInfo id=\"\" createDate=\"\" holderName=\"\" accountNumber=\"\" accountAccessory=\"\" token=\"\" street=\"\" city=\"\" state=\"\" zipCode=\"\" phone=\"\" email=\"\" gatewayTransactionId=\"\" approvalCode=\"\" responseDate=\"\" responseCode=\"\" responseMessage=\"\" address=\"\" /></transaction>"

JSON Sample:

{
  "id": "",
  "code": "",
  "accountId": "",
  "customerId": "",
  "createDate": "",
  "dueDate": "",
  "type": "",
  "accountType": "",
  "creatorCode": "",
  "amount": "",
  "balance": "",
  "accountNumber": "",
  "note": "",
  "adjustmentId": "",
  "processingInfo": {
    "id": "",
    "createDate": "",
    "holderName": "",
    "accountNumber": "",
    "accountAccessory": "",
    "token": "",
    "street": "",
    "city": "",
    "state": "",
    "zipCode": "",
    "phone": "",
    "email": "",
    "gatewayTransactionId": "",
    "approvalCode": "",
    "responseDate": "",
    "responseCode": "",
    "responseMessage": "",
    "address": ""
  }
}

Query String Sample:

?id=&code=&accountId=&customerId=&createDate=&dueDate=&type=&accountType=&creatorCode=&amount=&balance=&accountNumber=&note=&adjustmentId=&processingInfo.id=&processingInfo.createDate=&processingInfo.holderName=&processingInfo.accountNumber=&processingInfo.accountAccessory=&processingInfo.token=&processingInfo.street=&processingInfo.city=&processingInfo.state=&processingInfo.zipCode=&processingInfo.phone=&processingInfo.email=&processingInfo.gatewayTransactionId=&processingInfo.approvalCode=&processingInfo.responseDate=&processingInfo.responseCode=&processingInfo.responseMessage=&processingInfo.address=&
id=
code=
accountId=
customerId=
createDate=
dueDate=
type=
accountType=
creatorCode=
amount=
balance=
accountNumber=
note=
adjustmentId=
processingInfo.id=
processingInfo.createDate=
processingInfo.holderName=
processingInfo.accountNumber=
processingInfo.accountAccessory=
processingInfo.token=
processingInfo.street=
processingInfo.city=
processingInfo.state=
processingInfo.zipCode=
processingInfo.phone=
processingInfo.email=
processingInfo.gatewayTransactionId=
processingInfo.approvalCode=
processingInfo.responseDate=
processingInfo.responseCode=
processingInfo.responseMessage=
processingInfo.address=