Recurring Payments Service Payment Plans

Payment Plan Controller

Search Plans

get
Query parameters
customer-keyanyOptional

customer key

customer-nameanyOptional

customer name

isDescendinganyOptional

list results in descending order, default is true

order-byanyOptional

order list by

pageanyOptional

page number

page-sizeanyOptional

page-size

payment-amountanyOptional

payment amount

plan-keyanyOptional

plan key

plan-nameanyOptional

plan name

statusanyOptional

status

token-idanyOptional

token associated with the plan

Header parameters
api-keyanyRequired

api-key-value

Responses
200
OK
get
GET //rest/v2/payment-plans HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
  "code": 200,
  "emvUrl": "text",
  "exchange-id": "ID_38839393-3938383-484848484",
  "gatewayUrl": "text",
  "links": [
    {
      "href": "/rest/v2/transactions?id=846512",
      "id": 846512,
      "rel": "transaction"
    }
  ],
  "page": {
    "first": false,
    "last": false,
    "number": 4,
    "number-of-elements": 102,
    "size": 4,
    "sort": {
      "field": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "total-elements": 102,
    "total-pages": 4
  },
  "payload": {
    "payloadType": "text"
  },
  "signature": "text",
  "status": "SUCCESS",
  "urls": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "vaultUrl": "text"
}

Create a Plan

post
Header parameters
api-keyanyRequired

api-key-value

Body
ach-payment-typestringOptional
customer-keystringRequired

customer assigned to the plan

Example: cust_3bf809d2-b74d-4354-bbf9-a4af6328e6e0
customer-namestringOptional

customer assigned to the plan

Example: John Doe
email-addressstringOptional

email address to associate to the payment

Example: [email protected]
email-receiptstringOptional

pass in if you would like to email a receipt when payment fires. If true, email-address is required for the customer or must be passed in when creating the payment plan.

end-datestringRequired

day the plan will end. Max of 10 years to 1 plan

Example: 2021-08-10
frequencystring · enumRequired

How often the plan will run

Example: MONTHLYPossible values:
frequency-daystringOptional

day the plan will run. For monthly and yearly (day of month). For weekly day of week(1-7)

Example: 3
frequency-monthstringOptional

Month the plan will fire.

Example: 5
frequency-weekstringOptional

Only used in weekly plans. Week the plan will fire.

Example: 3
payment-amountstringRequired

amount that will be charged to the card for EACH payment

Example: 200
plan-keystringOptional

unique identifier of a plan

Example: plan_8383-38833-3333
plan-namestringOptional

name of plan

Example: Test plan
start-datestringRequired

Day the payment will start. If you pick a different day than the frequency day the plan will start on the next frequency day. For example If your frequency-day is 3 and your start date is 9/17/2016. It will start on 10/3/2016 as that is then next frequency day

Example: 2019-05-10
statusstring · enumOptional

status of the plan

Example: ActivePossible values:
status-datestringOptional

Date the status was updated

Example: 09/19/2016
token-idstringRequired

Token represents the card or ACH data that will be used for this plan

Example: 11000393985851112
Responses
200
OK
post
POST //rest/v2/payment-plans HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 589

{
  "ach-payment-type": "text",
  "customer-key": "cust_3bf809d2-b74d-4354-bbf9-a4af6328e6e0",
  "customer-name": "John Doe",
  "email-address": "[email protected]",
  "email-receipt": false,
  "end-date": "2021-08-10",
  "frequency": "MONTHLY",
  "frequency-day": 3,
  "frequency-month": 5,
  "frequency-week": 3,
  "links": {
    "link": [
      {
        "href": "/rest/v2/transactions?id=846512",
        "id": 846512,
        "rel": "transaction"
      }
    ]
  },
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "payment-amount": 200,
  "plan-key": "plan_8383-38833-3333",
  "plan-name": "Test plan",
  "start-date": "2019-05-10",
  "status": "Active",
  "status-date": "09/19/2016",
  "token-id": 11000393985851112
}
{
  "payloadType": "text",
  "payment": {
    "amount": 9,
    "completed-time": "09/19/2016 04:11:3333",
    "customer-key": "cust_e333-93994-33838388938933",
    "fired-time": "09/19/2016 04:11:3333",
    "last-four": 3345,
    "links": {
      "link": [
        {
          "href": "/rest/v2/transactions?id=846512",
          "id": 846512,
          "rel": "transaction"
        }
      ]
    },
    "original-exchange-id": "exchange-93994-33838388938933",
    "payment-result": "APPROVED",
    "payment-status": "APPROVED",
    "payment-type": "Card",
    "plan-key": "plan_8383-38833-3333",
    "plan-name": "My Plan",
    "transaction-id": "id",
    "transaction-key": "id",
    "transaction-type": "SALE"
  }
}

Get a Plan's Info

get
Path parameters
paymentPlanKeyanyRequired

paymentPlanKey

Header parameters
api-keyanyRequired

api-key-value

Responses
200
OK
get
GET //rest/v2/payment-plans/{paymentPlanKey} HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
  "code": 200,
  "emvUrl": "text",
  "exchange-id": "ID_38839393-3938383-484848484",
  "gatewayUrl": "text",
  "links": [
    {
      "href": "/rest/v2/transactions?id=846512",
      "id": 846512,
      "rel": "transaction"
    }
  ],
  "page": {
    "first": false,
    "last": false,
    "number": 4,
    "number-of-elements": 102,
    "size": 4,
    "sort": {
      "field": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "total-elements": 102,
    "total-pages": 4
  },
  "payload": {
    "payloadType": "text"
  },
  "signature": "text",
  "status": "SUCCESS",
  "urls": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "vaultUrl": "text"
}

Update a Plan

put
Path parameters
paymentPlanKeyanyRequired

paymentPlanKey

Header parameters
api-keyanyRequired

api-key-value

Body
ach-payment-typestringOptional
customer-keystringRequired

customer assigned to the plan

Example: cust_3bf809d2-b74d-4354-bbf9-a4af6328e6e0
customer-namestringOptional

customer assigned to the plan

Example: John Doe
email-addressstringOptional

email address to associate to the payment

Example: [email protected]
email-receiptstringOptional

pass in if you would like to email a receipt when payment fires. If true, email-address is required for the customer or must be passed in when creating the payment plan.

end-datestringRequired

day the plan will end. Max of 10 years to 1 plan

Example: 2021-08-10
frequencystring · enumRequired

How often the plan will run

Example: MONTHLYPossible values:
frequency-daystringOptional

day the plan will run. For monthly and yearly (day of month). For weekly day of week(1-7)

Example: 3
frequency-monthstringOptional

Month the plan will fire.

Example: 5
frequency-weekstringOptional

Only used in weekly plans. Week the plan will fire.

Example: 3
payment-amountstringRequired

amount that will be charged to the card for EACH payment

Example: 200
plan-keystringOptional

unique identifier of a plan

Example: plan_8383-38833-3333
plan-namestringOptional

name of plan

Example: Test plan
start-datestringRequired

Day the payment will start. If you pick a different day than the frequency day the plan will start on the next frequency day. For example If your frequency-day is 3 and your start date is 9/17/2016. It will start on 10/3/2016 as that is then next frequency day

Example: 2019-05-10
statusstring · enumOptional

status of the plan

Example: ActivePossible values:
status-datestringOptional

Date the status was updated

Example: 09/19/2016
token-idstringRequired

Token represents the card or ACH data that will be used for this plan

Example: 11000393985851112
Responses
200
OK
put
PUT //rest/v2/payment-plans/{paymentPlanKey} HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 589

{
  "ach-payment-type": "text",
  "customer-key": "cust_3bf809d2-b74d-4354-bbf9-a4af6328e6e0",
  "customer-name": "John Doe",
  "email-address": "[email protected]",
  "email-receipt": false,
  "end-date": "2021-08-10",
  "frequency": "MONTHLY",
  "frequency-day": 3,
  "frequency-month": 5,
  "frequency-week": 3,
  "links": {
    "link": [
      {
        "href": "/rest/v2/transactions?id=846512",
        "id": 846512,
        "rel": "transaction"
      }
    ]
  },
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "payment-amount": 200,
  "plan-key": "plan_8383-38833-3333",
  "plan-name": "Test plan",
  "start-date": "2019-05-10",
  "status": "Active",
  "status-date": "09/19/2016",
  "token-id": 11000393985851112
}
{
  "payloadType": "text",
  "payment": {
    "amount": 9,
    "completed-time": "09/19/2016 04:11:3333",
    "customer-key": "cust_e333-93994-33838388938933",
    "fired-time": "09/19/2016 04:11:3333",
    "last-four": 3345,
    "links": {
      "link": [
        {
          "href": "/rest/v2/transactions?id=846512",
          "id": 846512,
          "rel": "transaction"
        }
      ]
    },
    "original-exchange-id": "exchange-93994-33838388938933",
    "payment-result": "APPROVED",
    "payment-status": "APPROVED",
    "payment-type": "Card",
    "plan-key": "plan_8383-38833-3333",
    "plan-name": "My Plan",
    "transaction-id": "id",
    "transaction-key": "id",
    "transaction-type": "SALE"
  }
}

Get a Plan's Expected Runs

get
Path parameters
paymentPlanKeyanyRequired

paymentPlanKey

Query parameters
endanyRequired

end

startanyRequired

start

Header parameters
api-keyanyRequired

api-key-value

Responses
200
OK
get
GET //rest/v2/payment-plans/{paymentPlanKey}/expected-runs HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
  "code": 200,
  "emvUrl": "text",
  "exchange-id": "ID_38839393-3938383-484848484",
  "gatewayUrl": "text",
  "links": [
    {
      "href": "/rest/v2/transactions?id=846512",
      "id": 846512,
      "rel": "transaction"
    }
  ],
  "page": {
    "first": false,
    "last": false,
    "number": 4,
    "number-of-elements": 102,
    "size": 4,
    "sort": {
      "field": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "total-elements": 102,
    "total-pages": 4
  },
  "payload": {
    "payloadType": "text"
  },
  "signature": "text",
  "status": "SUCCESS",
  "urls": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "vaultUrl": "text"
}

Delete a Plan

delete
Path parameters
planKeyanyRequired

planKey

Header parameters
api-keyanyRequired

api-key-value

Responses
200
OK
delete
DELETE //rest/v2/payment-plans/{planKey} HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
  "code": 200,
  "emvUrl": "text",
  "exchange-id": "ID_38839393-3938383-484848484",
  "gatewayUrl": "text",
  "links": [
    {
      "href": "/rest/v2/transactions?id=846512",
      "id": 846512,
      "rel": "transaction"
    }
  ],
  "page": {
    "first": false,
    "last": false,
    "number": 4,
    "number-of-elements": 102,
    "size": 4,
    "sort": {
      "field": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "total-elements": 102,
    "total-pages": 4
  },
  "payload": {
    "payloadType": "text"
  },
  "signature": "text",
  "status": "SUCCESS",
  "urls": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "vaultUrl": "text"
}

Was this helpful?