TAG LINE
SMALL TITLE

Payment Method

(API Version v2)


Defines a configured payment method for an account.


What can you do with PaymentMethod?


Properties

Property Details
identity
READ-ONLY
"identity": 23
Type: Number
This is the unique numeric identifier for the PaymentMethod
ownerId
READ-ONLY
"ownerId": 26
Type: Number
Unique identifier for the associated Owner object.
ownerName
READ-ONLY
"ownerName": "Sample Name"
Type: String
The name of the object associated with the ownerId property.
name
"name": "Corporate AMEX"
Type: String
User defined name for the Payment Method.
paymentTypeId
"paymentTypeId": 5
Type: Number
Unique identifier for the associated PaymentType object.
paymentTypeName
"paymentTypeName": "Sample Name"
Type: String
The name of the object associated with the paymentTypeId property.
accountId
"accountId": 6
Type: Number
Unique identifier for the associated Account object.
accountName
"accountName": "Sample Name"
Type: String
The name of the object associated with the accountId property.
description
"description": "This is the main corporate credit card"
Type: String
Descripton for the Payment Method.
paymentMethodToken
"paymentMethodToken": "127dfh72y3gg"
Type: String
Token for registered payment method with the payment gateway
paymentMethodIdentifier
"paymentMethodIdentifier": "Hello World"
Type: String
isActive
"isActive": true
Type: Boolean
Whether or not this payment method is available for use
autopay
"autopay": true
Type: Boolean
Whether or not this payment method should be used for automatic payments through a payment processor.
transactionToken
"transactionToken": "Hello World"
Type: String


Update Request Filters

Update Request Filters are no longer required starting with v4 of the LogiSense Billing API.

When updating an object you use the update request header with the list of properties to update. Then you need only supply the new values in the body of your request. Please note, this header can only be used with PUT or PATCH requests.

Field List:

  • name
  • paymentTypeId
  • accountId
  • description
  • paymentMethodToken
  • paymentMethodIdentifier
  • isActive
  • autopay
  • transactionToken

End Points

DELETEapi/v2/PaymentMethod/{id}
Delete an instance of the PaymentMethod object. Upon successful delete, this API will return a record of all of the reelated objects deleted with this operation. The specifics on which objects have been deleted will depend on which related objects have been populated in the system.
{id}Unique identifier for the PaymentMethod object.
Delete an instance of the PaymentMethod object.
DELETE api/v2/PaymentMethod/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "delete",
    "results": {
        "totalCount": 4,
        "items": [
            {
                "identity": 1,
                "action": "deleted",
                "dtoTypeKey": "paymentMethod"
            },
            {
                "lhsId": 2,
                "rhsId": 2,
                "action": "detached",
                "dtoTypeKey": "sampleObjectConnector"
            },
            {
                "foreignKeyIdentity": 2,
                "action": "deleted",
                "dtoTypeKey": "sampleObject"
            }
        ]
    }
}
GETapi/v2/PaymentMethod/
Retrieve all of the PaymentMethod objects.
Retrieve all of the PaymentMethod objects.
GET api/v2/PaymentMethod/
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "totalCount": 1,
    "items": [
        {
            "identity": 1,
            "ownerId": 24,
            "ownerName": "Sample Text Data",
            "name": "Corporate AMEX",
            "paymentTypeId": 24,
            "paymentTypeName": "Sample Text Data",
            "accountId": 21,
            "accountName": "Sample Text Data",
            "description": "This is the main corporate credit card",
            "paymentMethodToken": "127dfh72y3gg",
            "paymentMethodIdentifier": "Sample Text Data",
            "isActive": true,
            "autopay": true,
            "transactionToken": "Sample Text Data"
        }
    ]
}
GETapi/v2/PaymentMethod/Paged
Retrieve all of the PaymentMethod objects in a paged fashion. This endpoint implements pagination for its results. Individual pages can be requested to return a particular paged set in the list of results. To learn more, see details on working with paginated endpoints.
Retrieve all of the PaymentMethod objects in a paged fashion.
GET api/v2/PaymentMethod/Paged
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "pagination": {
        "pageNumber": 1,
        "pageSize": 20,
        "excludeTotalCount": false
    },
    "pagedResults": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "ownerId": 15,
                "ownerName": "Sample Text Data",
                "name": "Corporate AMEX",
                "paymentTypeId": 11,
                "paymentTypeName": "Sample Text Data",
                "accountId": 6,
                "accountName": "Sample Text Data",
                "description": "This is the main corporate credit card",
                "paymentMethodToken": "127dfh72y3gg",
                "paymentMethodIdentifier": "Sample Text Data",
                "isActive": true,
                "autopay": true,
                "transactionToken": "Sample Text Data"
            }
        ]
    }
}
GETapi/v2/PaymentMethod/{id}
Retrieve an instance of the PaymentMethod object by its ID.
{id}Unique identifier for the PaymentMethod object.
Retrieve an instance of the PaymentMethod object by its ID.
GET api/v2/PaymentMethod/{id}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "instance": {
        "identity": 1,
        "ownerId": 17,
        "ownerName": "Sample Text Data",
        "name": "Corporate AMEX",
        "paymentTypeId": 7,
        "paymentTypeName": "Sample Text Data",
        "accountId": 23,
        "accountName": "Sample Text Data",
        "description": "This is the main corporate credit card",
        "paymentMethodToken": "127dfh72y3gg",
        "paymentMethodIdentifier": "Sample Text Data",
        "isActive": true,
        "autopay": true,
        "transactionToken": "Sample Text Data"
    }
}
POSTapi/v2/PaymentMethod/BankAccount
Create a Debit type of PaymentMethod.
POSTapi/v2/PaymentMethod/CreditCard
Create a Credit Card type of Payment Method. Used in conjunction with the Spreedly Hosted Payment Page that will tokenize the card info for PCI compliance.
POSTapi/v2/PaymentMethod/Import
Used to Import PaymentMethod objects that have already been created and persisted in Spreedly.
POSTapi/v2/PaymentMethod/{id}/SetAsDefault
Sets the 'AutoPay' to be true for the specified Payment Method. This will automatically turn off 'AutoPay' on any other PaymentMethod for the account. Setting the 'Default' enables AutoPay for the account during billing. It will also present itself as a default payment method in the dropdown list in the Customer Portal.
{id}Unique identifier for the PaymentMethod object.
PUTapi/v2/PaymentMethod/{id}
Update an existing instance of the PaymentMethod object.
Update an existing instance of the PaymentMethod object.
PUT api/v2/PaymentMethod/{id}

{
    "identity": 1,
    "name": "Corporate AMEX",
    "paymentTypeId": 5,
    "accountId": 16,
    "description": "This is the main corporate credit card",
    "paymentMethodToken": "127dfh72y3gg",
    "paymentMethodIdentifier": "Sample Text Data",
    "isActive": true,
    "autopay": true,
    "transactionToken": "Sample Text Data"
}
View Sample Response
HTTP/1.1 200 OK
{
    "trackingId": "d2ae5304-2355-44eb-a328-272f02935f8b",
    "type": "update",
    "results": {
        "totalCount": 1,
        "items": [
            {
                "identity": 1,
                "ownerId": 12,
                "ownerName": "Sample Text Data",
                "name": "Corporate AMEX",
                "paymentTypeId": 22,
                "paymentTypeName": "Sample Text Data",
                "accountId": 14,
                "accountName": "Sample Text Data",
                "description": "This is the main corporate credit card",
                "paymentMethodToken": "127dfh72y3gg",
                "paymentMethodIdentifier": "Sample Text Data",
                "isActive": true,
                "autopay": true,
                "transactionToken": "Sample Text Data"
            }
        ]
    }
}