This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Payment methods in Kill Bill


Overview

The following operations allow you to work with payment methods. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with payment methods, see Sample configuration

OperationDescription
deletePaymentMethodDeletes a payment method.
getPaymentMethodByIdRetrieve a payment method by id.
searchPaymentMethodSearch a payment method.

Operation details

This section provides further details on the operations related to payment methods.

Deleting a payment method 

The deletePaymentMethod operation deletes a payment method specified by the id.

deletePaymentMethod
<killbill.deletePaymentMethod>
    <paymentMethodId>{$ctx:paymentMethodId}</paymentMethodId>
    <deleteDefaultPmWithAutoPayOff>{$ctx:deleteDefaultPmWithAutoPayOff}</deleteDefaultPmWithAutoPayOff>
    <pluginProperty>{$ctx:pluginProperty}</pluginProperty>
    <createdBy>{$ctx:createdBy}</createdBy>
    <reason>{$ctx:reason}</reason>
    <comment>{$ctx:comment}</comment>
</killbill.deletePaymentMethod>
Properties
  • paymentMethodId: The id of the payment method.
  • deleteDefaultPmWithAutoPayOff: Set true/false to delete default payment method with auto payoff.
  • pluginProperty:  The plugin property of the payment method.
  • createdBy:  The creator of this payment method call.
  • reason: The reason for deleting the payment method.
  • comment:  The comment for the payment method.
  Sample request

Following is a sample REST/JSON request that can be handled by the deletePaymentMethod operation.

Sample Request for deletePaymentMethod
{
    "apiUrl":"http://127.0.0.1:8080",
    "apiVersion":"1.0",
    "username":"admin",
    "password":"password",
    "apiKey":"bob",
    "apiSecret":"lazar",
    "paymentMethodId": "33ca98be-2e86-4861-89df-31cd1f7207ef"
}

Related Kill Bill documentation

http://killbill.io/api/#!/paymentMethods/deletePaymentMethod

Retrieving a Payment Method by the id

The getPaymentMethodById operation retrieves a single payment method by the id.

getPaymentMethodById
<killbill.getPaymentMethodById>
    <paymentMethodId>{$ctx:paymentMethodId}</paymentMethodId>
    <pluginProperty>{$ctx:pluginProperty}</pluginProperty>
    <withPluginInfo>{$ctx:withPluginInfo}</withPluginInfo>
    <audit>{$ctx:audit}</audit>
</killbill.getPaymentMethodById>
Properties
  • paymentMethodId: The id of the payment method.
  • pluginProperty: The plugin property .
  • withPluginInfo: Specify true/false to get plugin info.
  • audit: The audit level for the search.
   Sample request

Following is a sample REST/JSON request that can be handled by the getPaymentMethodById operation.

Sample Request for getPaymentMethodById
{
    "apiUrl":"http://127.0.0.1:8080",
    "apiVersion":"1.0",
    "username":"admin",
    "password":"password",
    "apiKey":"bob",
    "apiSecret":"lazar",
    "paymentMethodId": "33ca98be-2e86-4861-89df-31cd1f7207ef"
}
Related Kill Bill documentation

http://killbill.io/api/#!/paymentMethods/getPaymentMethod

Search payment method 

The searchPaymentMethod operation retrieves payment  methods for the given search key.

searchPaymentMethod
<killbill.searchPaymentMethod>
    <searchKey>{$ctx:searchKey}</searchKey>
    <pluginName>{$ctx:pluginName}</pluginName>
    <pluginProperty>{$ctx:pluginProperty}</pluginProperty>
    <withPluginInfo>{$ctx:withPluginInfo}</withPluginInfo>
    <offset>{$ctx:offset}</offset>
    <limit>{$ctx:limit}</limit>
    <audit>{$ctx:audit}</audit>
</killbill.searchPaymentMethod>
Properties
  • searchKey: The key for the search.
  • pluginName: The plugin name.
  • pluginProperty: The plugin property .
  • withPluginInfo: Specify true/false to get plugin info.
  • offset: The offset for the search.
  • limit: The limit for the search.
  • audit: The audit level for the search.
  Sample request

Following is a sample REST/JSON request that can be handled by the searchPaymentMethod operation.

Sample Request for searchPaymentMethod
{
    "apiUrl":"http://127.0.0.1:8080",
    "apiVersion":"1.0",
    "username":"admin",
    "password":"password",
    "apiKey":"bob",
    "apiSecret":"lazar",
    "searchKey": "33ca98be-2e86-4861-89df-31cd1f7207ef"
}
Related Kill Bill documentation

http://killbill.io/api/#!/paymentMethods/searchPaymentMethods

Sample configuration

Following is a sample proxy service that illustrates how to connect to Kill Bill with the init operation and use the getPaymentMethodById operation. The sample request for this proxy can be found in the getPaymentMethodById sample request.

Sample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="getPaymentMethodById" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="username" expression="json-eval($.username)"/>
         <property name="password" expression="json-eval($.password)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="apiVersion" expression="json-eval($.apiVersion)"/>
         <property name="apiSecret" expression="json-eval($.apiSecret)"/>
         <property name="blocking" expression="json-eval($.blocking)"/>
         <property name="paymentMethodId" expression="json-eval($.paymentMethodId)"/>
         <property name="pluginProperty" expression="json-eval($.pluginProperty)"/>
         <property name="withPluginInfo" expression="json-eval($.withPluginInfo)"/>
         <property name="audit" expression="json-eval($.audit)"/>
         <killbill.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <username>{$ctx:username}</username>
            <password>{$ctx:password}</password>
            <apiKey>{$ctx:apiKey}</apiKey>
            <apiSecret>{$ctx:apiSecret}</apiSecret>
            <apiVersion>{$ctx:apiVersion}</apiVersion>
            <blocking>{$ctx:blocking}</blocking>
         </killbill.init>
         <killbill.getPaymentMethodById>
             <paymentMethodId>{$ctx:paymentMethodId}</paymentMethodId>
             <pluginProperty>{$ctx:pluginProperty}</pluginProperty>
             <withPluginInfo>{$ctx:withPluginInfo}</withPluginInfo>
             <audit>{$ctx:audit}</audit>
         </killbill.getPaymentMethodById>
         <respond />
      </inSequence>
      <outSequence>
         <send />
      </outSequence>
   </target>
   <description />
</proxy>