MENU
PHP CSharp Perl Ruby

Schedule Service API

The Schedule and Recurring service allows easy integration for creating, modifying, and retrieving of Schedule and Recurring information. Schedules are retrieved, created and modified through GET, POST, PATCH, and PUT requests.

Authentication and authorization for the ScheduleService will be done by JWT in the HTTP Authorization Header. This JWT can be obtained by passing a valid username and password to the AuthenticationService.

In general, fields will only be returned if their value is not null or empty.

All requests that fail validation will return an HTTP response code 403 - Bad Request and a RequestErrorList containing details pertaining to the error(s).

Request Error List

Request Error List Object:

{
  "requestErrorList": [
    {
      "code": "10028",
      "description": "Missing required field",
      "apiFieldNameList": [
        {
          "apiFieldName": "firstName"
        }
      ]
    },
    {
      "code": "10028",
      "description": "Missing required field",
      "apiFieldNameList": [
        {
          "apiFieldName": "owedAmount"
        }
      ]
    }
  ]
}
Attribute Description
requestErrorList
ListN/A
A list of RequestError objects containing validation errors.
Details
 
code
Numeric5
The code for the validation error.
description
Alphanumeric255
The description of the validation error.
apiFieldNameList
ListN/A
List of ApiFieldName objects that specify which api field this error relates to.
Details
 
apiFieldName
Alphanumeric255
The name of the Api Field that the error relates to.

The first step will be to save some settings that will be used in schedule creation.

Schedule Settings

POST to save new schedule setting.
PUT to overwrite a single schedule setting by settingId.
GET to retrieve list of schedule settings.
GET to retrieve single schedule setting by settingId.
GET to retrieve single schedule setting by name.
DELETE to delete single schedule setting by settingId.

ScheduleSetting Object

Full Setting Object

Setting Object:

{
  "settingId": 3,
  "companyId": 1234,
  "name": "MySettingName",
  "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  "date": "2018-01-01 12:00:00",
  "user": "testUser"
}
Attribute Description
settingId
Numeric 8
The id of the schedule setting.
companyId
Numeric 8
The company id of the company the setting belongs to.
name
Alpha 75
The name of the schedule setting.
description
Alphanumeric 255
Description of the schedule setting.
recurSetting
JSON65000
The recurring schedule settings.
date
Date19
The date the setting was updated.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
user
Alphanumeric75
The user that last updated the schedule setting.

–Setting Creation

POST :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings


Sample Response:

{
  "settingId": 4,
  "companyId": 1234,
  "name": "MySettingName",
  "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  "date": "2020-01-01 17:00:00",
  "user": "testUser"
}
Attribute Description
name
Alpha 75
Required
The name of the schedule setting. This must be unique.
description
Alphanumeric 255
Description of the schedule setting.
recurSetting
JSON
Required
The recurring schedule settings. This value must be a JSON encoded string.
Expected JSON fields
paymentTypes
ListN/A
Required
The schedule payment types in a list.
Valid value(s):
CARD - schedules with card transactions will be allowed
CHECK - schedules with check transactions will be allowed
PAYPAL - schedules with PayPal transactions will be allowed
minimumPaymentAmount
Numeric8
Required
The minimum payment allowed per payment on a schedule. This value must be between 1 and 10000.
allowedFrequencies
AlphaN/A
Required
The allowed payment frequencies, in a list.
Valid value(s):
MONTHLY - once per month
BI_MONTHLY - 2 times per month
BI_WEEKLY - once every 2 weeks
WEEKLY - once per week
DAILY - once per day
checkReminderDays
Numeric2
Required
The number of days prior to a Check payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
cardReminderDays
Numeric2
Required
The number of days prior to a Card payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
payPalReminderDays
Numeric2
Conditional
The number of days prior to a PayPal payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
recurrenceRule
Alphanumeric255
Required
This is the recurrence rule that you want the schedules using this setting to calculate the payments against. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. There is also no need to start a rule with “RRULE=” Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31.

See note about Schedule Payment Processing.
maxDaysToStart
Numeric3
The number of days in the future that a schedule must start when providing DTSTART in the Schedule recurrenceRule. Defaults to 13 months if not provided.
user
Alphanumeric75
Required
The user that is creating the schedule setting.

–Setting Modification

PUT :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/{settingId}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/{settingId}


Sample Response:

{
  "settingId": 4,
  "companyId": 1234,
  "name": "MySettingNameUpdated",
  "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  "date": "2020-01-02 17:00:00",
  "user": "updatingUser"
}

PUT requests will completely override the existing specified (by settingId in the URL) setting. As such, the request object the same as the setting creation.

Setting Modification
Attribute Description
name
Alpha 75
Required
The name of the schedule setting. This must be unique.
description
Alphanumeric 255
Description of the schedule setting.
recurSetting
JSON65000
Required
The recurring schedule settings. This value must be a JSON encoded string.
Expected JSON fields
paymentTypes
ListN/A
Required
The schedule payment types in a list.
Valid value(s):
CARD - schedules with card transactions will be allowed
CHECK - schedules with check transactions will be allowed
PAYPAL - schedules with PayPal transactions will be allowed
minimumPaymentAmount
Numeric8
Required
The minimum payment allowed per payment on a schedule. This value must be between 1 and 10000.
allowedFrequencies
AlphaN/A
Required
The allowed payment frequencies, in a list.
Valid value(s):
MONTHLY - once per month
BI_MONTHLY - 2 times per month
BI_WEEKLY - once every 2 weeks
WEEKLY - once per week
DAILY - once per day
checkReminderDays
Numeric2
Required
The number of days prior to a Check payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
cardReminderDays
Numeric2
Required
The number of days prior to a Card payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
payPalReminderDays
Numeric2
Conditional
The number of days prior to a PayPal payment date to send a reminder. The reminder will be sent to the associated email address. If the schedule has no email address, reminders will NOT be sent.
This value must be between 3 and 14.
recurrenceRule
Alphanumeric255
Required
This is the recurrence rule that you want the schedules using this setting to calculate the payments against. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. There is also no need to start a rule with “RRULE=” Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31.

See note about Schedule Payment Processing.
maxDaysToStart
Numeric3
The number of days in the future that a schedule must start when providing DTSTART in the Schedule recurrenceRule. Defaults to 13 months if not provided.
user
Alphanumeric75
Required
The user that is creating the schedule setting.

–Setting Retrieval List

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings


Sample Response:

[
  {
    "settingId": 2,
    "companyId": 1234,
    "name": "Name of a setting",
    "recurSetting": "{\"recurrenceRule\":\"FREQ=WEEKLY;INTERVAL=1;\",\"paymentTypes\":[\"CARD\"],\"minimumPaymentAmount\":\"100\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
    "date": "2019-11-09 01:01:01",
    "user": "betterTester"
  },
  {
    "settingId": 3,
    "companyId": 1234,
    "name": "Another setting",
    "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=15;\",\"paymentTypes\":[\"CHECK\"],\"minimumPaymentAmount\":\"1000\",\"allowedFrequencies\":[\"MONTHLY\"],\"checkReminderDays\":\"13\",\"cardReminderDays\":\"13\"}",
    "date": "2019-11-19 12:00:00",
    "user": "anotherTester@test.com"
  },
  {
    "settingId": 4,
    "companyId": 1234,
    "name": "MySettingName",
    "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
    "date": "2020-01-01 17:00:00",
    "user": "testUser"
  }
]

Retrieve a list of all previously saved schedule settings. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings

–Setting Retrieval Individual

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/{id}


Sample Response:

{
  "settingId": 4,
  "companyId": 1234,
  "name": "MySettingName",
  "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  "date": "2020-01-01 17:00:00",
  "user": "testUser"
}

Retrieve an individual schedule setting by settingId. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/4

–Setting Retrieval Name

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/names/{name}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/names/{name}


Sample Response:

{
  "settingId": 4,
  "companyId": 1234,
  "name": "MySettingName",
  "recurSetting": "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  "date": "2020-01-01 17:00:00",
  "user": "testUser"
}

Retrieve an individual schedule setting by name. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/names/MySettingName

–Setting Deletion

DELETE :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/{id}

Delete an individual schedule setting by settingId. A setting cannot be deleted if it is associated with a schedule. This request will return no response body, rather just a standard HTTP status code 200 for successful deletion. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/4

Recurring Term

POST to create a new recurring term record.
PUT to modify an existing recurring term.
DELETE to delete an exiting recurring term.
GET to get a list of recurring terms or an individual term.

Recurring Terms can be used to restrict the run length of schedules within a specific owed amount range. For example, you can specify that schedules with an owed amount less than $1,000 can have a maximum length of 36 months. Specifying multiple recurring terms allows for different lengths of schedules for different amounts. Specifying a recurring term with no maximum amount would allow a maximum schedule duration to be specified for any schedule amount.

Recurring Term Object

Full Recurring Term Object

Recurring Term Object:

{
  "id": 3,
  "maximumAmount": 1000,
  "termMonth": 36,
  "date": "2020-01-01 12:00:00",
  "maximumPayments": 23,
  "user": "testUser"
}

Attribute Description
id
Numeric20
Id for the recurring term.
maximumAmount
Numeric12
Maximum amount for the term.
termMonth
AlphaNumeric3
The maximum amount of months a schedule with an owedAmount within the maximumAmount can run.
date
Date19
Date the term was last modified
Format: URL Encoded ISO-8601
user
AlphaNumeric75
User creating or modifying the record.
maximumPayments
Numeric
READONLY
The maximum amount of payments that can be created with this term and the recurrenceRule from the specified setting. Only returns when an amount and settingId are specified in the URL.

–Recurring Term Creation

POST :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms


Sample Response:

{
  "id": 3,
  "maximumAmount": 1000,
  "termMonth": 36,
  "date": "2020-01-01 12:00:00",
  "user": "testUser"
}
Attribute Description
maximumAmount
Numeric12
Maximum amount for the term. Leaving the amount blank will make the record unbounded. This value must be unique.
termMonth
AlphaNumeric3
Required
The maximum amount of months a schedule with an owedAmount within the maximumAmount can run.
user
AlphaNumeric75
Required
User creating or modifying the record.

–Recurring Term Modification

PUT :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{recurringTermId}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{recurringTermId}


Sample Response:

{
  "id": 3,
  "maximumAmount": 1000,
  "termMonth": 36,
  "date": "2020-01-01 12:00:00",
  "user": "testUser"
}

PUT requests will completely override the existing specified (by recurringTermId in the URL) recurring term. As such, the request object is the same as the recurring term creation.

Schedule Modification
Attribute Description
maximumAmount
Numeric12
Maximum amount for the term. Leaving the amount blank will make the record unbounded. This value must be unique.
termMonth
AlphaNumeric3
Required
The maximum amount of months a schedule with an owedAmount within the maximumAmount can run.
user
AlphaNumeric75
Required
User creating or modifying the record.

–Recurring Term Retrieval (List)

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/


Sample Response:

{
  "recurringTerms": [
    {
      "id": 3,
      "maximumAmount": 1000,
      "termMonth": 36,
      "date": "2020-01-01 12:00:00",
      "user": "testUser"
    },
    {
      "id": 4,
      "termMonth": 48,
      "date": "2019-01-01 12:00:00",
      "user": "testUserHere"
    },
    {
      "id": 9,
      "maximumAmount": 20000,
      "termMonth": 36,
      "date": "2019-01-06 12:00:00",
      "user": "oneMoreUser"
    }
  ]
}

Retrieve an object with a list of all previously saved recurring terms. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms

–Recurring Term Retrieval (Individual)

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{id}


Sample Response:

{
  "id": 9,
  "maximumAmount": 20000,
  "termMonth": 36,
  "date": "2019-01-06 12:00:00",
  "user": "oneMoreUser"
}

Retrieve an individual recurring term by recurringTermId. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringTerms/9

–Recurring Term Retrieval (By Amount)

GET :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/


Sample Response:

{
  "id": 3,
  "maximumAmount": 1000,
  "termMonth": 36,
  "date": "2020-01-01 12:00:00",
  "maximumPayments": "20",
  "user": "testUser"
}

Retrieve a recurring term based on a specified amount. This will return the term that would be used if a schedule with a specified amount were to be created. The maximumPayments is the maximum amount of payments that would be allowed for a schedule of the specified amount, based on the Setting specified. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms?amount=850

Attribute Description
amount
Numeric12
The amount to retrieve the recurring term for.
settingId
Numeric8
The setting that will be used for schedule creation. Passing this value, along with the amount, will allow the service to return the correct recurringTerm for the amount, and also the maximum number of payments possible for a schedule created using this settingId and this amount.
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedules using this setting to calculate the payments against. Providing this in this request will allow overriding of the recurrenceRule specified by the settingId and will calculate the maximum number of payments based on the amount and this recurrenceRule.
This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. There is also no need to start a rule with “RRULE=” Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31.

See note about Schedule Payment Processing.

–Recurring Term Deletion

DELETE :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringTerms/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringTerms/{id}

Delete an individual recurring term by recurringTermId. This request will return no response body, rather just a standard HTTP status code 200 for successful deletion. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringTerms/9

Schedule Preview

POST to create a preview of a schedule. This preview will not be saved until the schedules endpoint is called with a POST or a PUT request to save the schedule.

Schedule Preview Object

Complete Schedule Preview Object

Schedule Preview Object

{
  "owedAmount": 1500,
  "settingId": 14434,
  "initialPaymentAmount": 500,
  "adjustmentAmount": 500,
  "paymentAmount": 100,
  "numberOfPayments": 5,
  "payments": [
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-02-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-03-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-04-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-05-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-06-01"
    }
  ]
}

Attribute Description
owedAmount
Numeric11
The original amount, or the amount owed by the debtor.
settingId
Numeric 8
The id of the schedule setting to be used to generate the schedule preview.
initialPaymentAmount
Numeric11
Conditional
An amount processed before the schedule is started. This will be deducted from the owedAmount. If processInitialPaymentOnActivation is true this amount is required and will be processed. Otherwise this amount will not be processed, and is on the schedule for reference only.
processInitialPaymentOnActivation
Boolean5
If this is true, the initialPaymentAmount is required. The initialPaymentAmount will be inserted as the first payment and will be processed when the schedule goes ACTIVE.

See note about Schedule Payment Processing.
adjustmentAmount
Numeric11
An amount to be deducted from the owedAmount. This amount will not be processed by the schedule, but is on the schedule for reference only.
numberOfPayments
Numeric3
The number of payments desired for the schedule. If this is provided the paymentAmount cannot be provided. If the number of payments requested is too great, causing each payment to be less than the minimumPaymentAmount as specified by the ScheduleSetting, an error message will be provided that indicates the maximum number of payments.
paymentAmount
Numeric11
This is the amount that will be charged for each scheduled payment. If this is provided the numberOfPayments cannot be provided. If the payment amount is too small, causing the schedule length to exceed the termMonth for this amount, an error message will be provided that indicates the minimum value.
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedule to calculate the payments against. Passing in a recurrence rule here will override the recurrence that was saved as part of the ScheduleSetting referenced by the settingId. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. Restrictions on which frequencies are allowed are stored in the ScheduleSetting object. There is no need to start a rule with “RRULE=”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31. Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”.

See note about Schedule Payment Processing.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
feeAmount
Numeric11
The fee which will apply to each scheduled payment
feePercent
Decimal4
The fee percent which will be used to calculate the fee on to each scheduled payment
initialFeeAmount
Numeric11
The fee which will apply to the initial payment if processInitialPaymentOnActivation is true
initialFeePercent
Decimal4
The fee percent which will be used to calculate the initial payment fee if processInitialPaymentOnActivation is true
billingCard
ObjectN/A
BillingCard object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which card merchant account to use for processing the schedule payments.
billingCheck
ObjectN/A
BillingCheck object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which check merchant account to use for processing the schedule payments.
billingPayPal
ObjectN/A
BillingPayPal object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which PayPal merchant account to use for processing the schedule payments.
payments
ListN/A
List of SchedulePayment objects. Each SchedulePayment will include only a paymentAmount and paymentDate.

See note about Schedule Payment Processing.

–Schedule Preview Creation

POST :
test urls:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews
live urls:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/previews


Sample Response:

{
  "owedAmount": 1500,
  "settingId": 14434,
  "initialPaymentAmount": 500,
  "adjustmentAmount": 500,
  "paymentAmount": 100,
  "numberOfPayments": 5,
  "payments": [
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-02-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-03-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-04-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100,
      "paymentDate": "2020-05-01"
    },
    {
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-06-01"
    }
  ]
}
Attribute Description
owedAmount
Numeric11
Required
The original amount, or the amount owed by the debtor.
settingId
Numeric 8
Required
The id of the ScheduleSetting to be used to generate the schedule preview.
initialPaymentAmount
Numeric11
Conditional
An amount processed before the schedule is started. This will be deducted from the owedAmount. If processInitialPaymentOnActivation is true this amount is required and will be processed. Otherwise this amount will not be processed, and is on the schedule for reference only.
processInitialPaymentOnActivation
Boolean5
If this is true, the initialPaymentAmount is required. The initialPaymentAmount will be inserted as the first payment and will be processed when the schedule goes ACTIVE.

See note about Schedule Payment Processing.
adjustmentAmount
Numeric11
An amount to be deducted from the owedAmount. This amount will not be processed by the schedule, but is on the schedule for reference only.
numberOfPayments
Numeric3
The number of payments desired for the schedule. If this is provided the paymentAmount cannot be provided. If the number of payments requested is too great, causing each payment to be less than the minimumPaymentAmount specified in the ScheduleSetting, an error message will be provided that indicates the maximum number of payments.
paymentAmount
Numeric11
This is the amount that will be charged for each scheduled payment. If this is provided the numberOfPayments cannot be provided. If the payment amount is too small, causing the schedule length to exceed the termMonth for this amount, an error message will be provided that indicates the minimum value.
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedule to calculate the payments against. Passing in a recurrence rule here will override the recurrence that was saved as part of the ScheduleSetting referenced by the settingId. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. Restrictions on which frequencies are allowed are stored in the ScheduleSetting object. There is no need to start a rule with “RRULE=”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31. Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”.

See note about Schedule Payment Processing.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
feeAmount
Numeric11
The fee which will apply to each scheduled payment
feePercent
Decimal4
The fee percent which will be used to calculate the fee on to each scheduled payment
initialFeeAmount
Numeric11
The fee which will apply to the initial payment if processInitialPaymentOnActivation is true
initialFeePercent
Decimal4
The fee percent which will be used to calculate the initial payment fee if processInitialPaymentOnActivation is true
billingCard
ObjectN/A
BillingCard object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which card merchant account to use for processing the schedule payments.
billingCheck
ObjectN/A
BillingCheck object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which check merchant account to use for processing the schedule payments.
billingPayPal
ObjectN/A
BillingPayPal object. The accountDirective field is validated to determine if the directive is set up with a Zero Cost Fee so the payment feeAmount is automatically calculated
Details
accountDirective
Alphanumeric 10
The account directive that defines which PayPal merchant account to use for processing the schedule payments.

Schedule

POST to create a new schedule.
PUT to modify an existing schedule. This will ALWAYS regenerate the payment list based on the updated request parameters. All original values will be overwritten with the updated parameters.
PATCH to modify an existing schedule. This will NEVER regenerate the payment list and will only modify specified parameters. Passing in an empty value for a parameter will remove the stored value for that parameter.
DELETE to delete an existing schedule. Schedules with a payment that has been attempted, either successful or failed, cannot be deleted.
GET to get a list of schedules. The READONLY fields will only be present on this endpoint.

Schedule Object

Complete Schedule Object

Schedule Object:

{
  "id": 9107,
  "companyId": 1234,
  "status": "ACTIVE",
  "settingId": 2,
  "paymentMethod": "CARD",
  "requestPaymentData": false,
  "firstName": "Test",
  "lastName": "McTester",
  "accountNumber": "4654",
  "numberOfPayments": 4,
  "paymentAmount": 100.00,
  "memo": "I am making a schedule",
  "emailAddress": "test@test.com",
  "sendReceiptToEmailAddress": true,
  "phoneNumber": "1234567890",
  "sendAuthorizationRequest": true,
  "processInitialPaymentOnActivation": false,
  "authorization": {
    "pinDescription": "Last four of card number",
    "verificationPin": "1234",
    "timeoutMinutes": 30,
    "eventRecipientList": [
        {
            "emailAddress": "someone@example.com"
        }
    ]
  },
  "flowId": 2,
  "addressOne": "234 Test Street",
  "addressTwo": "Suite 3",
  "city": "Ogden",
  "state": "UT",
  "zip": "84401",
  "zipPlusFour": "1234",
  "country": "US",
  "origin": "EXT",
  "locationId": "12",
  "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1",
  "username": "testUser",
  "createUser": "testUser",
  "updateUser": "testUser",
  "createDate": "2012-06-26 12:10:55",
  "updateDate": "2014-01-16 10:19:45",
  "owedAmount": 900,
  "initialPaymentAmount": 500,
  "adjustmentAmount": 100,
  "pendingAmount": 100.00,
  "nextPaymentAmount": 100,
  "collectedAmount": 200.00,
  "unsuccessfulAmount": 100.00,
  "totalExpectedAmount": 300.00,
  "nextPaymentDate": "2014-01-24",
  "pendingCount": 1,
  "collectedCount": 2,
  "unsuccessfulCount": 1,
  "totalExpectedCount": 4,
  "billingLastFour": "2224",
  "billingCard": {
      "cardToken": "aCardToken123456",
      "expirationMonth": 4,
      "expirationYear": 16,
      "accountDirective": "888-1"
  },
  "billingCheck": {
      "bankAccountNumber": "aBankToken123456",
      "routingNumber": "123456789",
      "bankAccountType": "CHECKING", 
      "accountDirective": "123-1"
  },
  "payments": [
    {
      "paymentId": 33,
      "status": "PAID",
      "paymentAmount": 100.00,
      "paymentDate": "2012-11-22",
      "arrivalId": 43,
      "transactionId": 12345,
      "paymentAttempts": [
        {
          "arrivalId": 43,
          "transactionId": 12345,
          "attemptDate": "2019-11-22T11:00:46.000+0000",
          "status": "PAID"
        }
      ]
    },
    {
      "paymentId": 90739,
      "status": "PAID",
      "paymentAmount": 100.00,
      "paymentDate": "2013-02-17",
      "arrivalId": 44,
      "transactionId": 12346,
      "paymentAttempts": [
        {
          "arrivalId": 44,
          "transactionId": 12346,
          "attemptDate": "2013-02-17T11:00:46.000+0000",
          "status": "PAID"
        }
      ]
    },
    {
      "paymentId": 90740,
      "status": "FAILED",
      "paymentAmount": 100.00,
      "paymentDate": "2014-01-17",
      "arrivalId": 45,
      "transactionId": 12347,
      "paymentAttempts": [
        {
          "arrivalId": 45,
          "transactionId": 12347,
          "attemptDate": "2014-01-17T11:00:46.000+0000",
          "status": "FAILED",
          "statusMessage": "Insufficient Funds"
        }
      ]
    },
    {
      "paymentId": 90741,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2014-04-24"
    }
  ],
  "customReceiptLabels": {
    "PAYMENT": "My new payment label",
    "ACCOUNT_NUMBER": "My new account number label",
    "MEMO": "My new memo label",
    "BANK_ACCOUNT_TYPE": "My new account type label"
  },
  "customRenderLabels": {
    "SCHEDULE_STATUS": "My new schedule status label"
  },
  "roundTripMap": {
    "myField1": "Custom Value 1",
    "myField2": "Custom Value 2"
  },
  "scheduleHistoryList": [
      {
          "date": "2019-11-22 11:00:46",
          "event": "PAYMENT_ATTEMPT",
          "user": "recurring"
      },
      {
          "date": "2013-02-17 11:00:46",
          "event": "PAYMENT_ATTEMPT",
          "user": "recurring"
      },
      {
          "date": "2014-01-17 11:00:46",
          "event": "PAYMENT_ATTEMPT",
          "user": "recurring"
      }
  ]
}

Attribute Description
scheduleId
Numeric10
READONLY
The id of the schedule. This can be used to retrieve the schedule by sending an HTTP GET request with this id in the url.
companyId
Numeric8
READONLY
The companyId for which the schedule was created.
status
AlphaN/A
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature request requesting payment data to be entered.
Default value: DRAFT
settingId
Numeric 10
The id of the schedule setting to be used with this schedule.
paymentMethod
Alpha5
The payment method to be used for processing payments on this schedule.
Valid value(s):
CARD
CHECK
PAYPAL
sendFlowRequest
Boolean
Flag to determine if Schedule Service should send the Flow request, or if it will be requested separately using the Flow Service API
The following 2 attributes sendAuthorizationRequest and requestPaymentData still need to be set to the proper value so the Signature Service API can build the Flow request correctly.
Default value: true
sendAuthorizationRequest
Boolean5
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
requestPaymentData
Boolean5
If this is true, a flow request will be sent to the emailAddress or phoneNumber requesting the payment information.
processInitialPaymentOnActivation
Boolean5
If this is true, the initialPaymentAmount is required. The initialPaymentAmount will be inserted as the first payment and will be processed when the schedule goes ACTIVE.

See note about Schedule Payment Processing.
firstName
Alphanumeric45
The first name of the person associated to this schedule.
lastName
Alphanumeric45
The last name of the person associated to this schedule.
accountNumber
Alphanumeric45
The accountNumber of the person associated to this schedule.
numberOfPayments
Numeric3
The number of payments used for creation of the schedule. If this is provided, the paymentAmount cannot be provided.
The number of payments, along with the minimum amount per payment, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the number of payments is too great, an error message will be provided that indicates the maximum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
paymentAmount
Numeric11
This is the amount that will be charged for each scheduled payment. If this is provided the numberOfPayments cannot be provided.
The paymentAmount, along with the term setting, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the payment amount is too small an error message will be provided that indicates the minimum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
feeAmount
Numeric11
The fee which will apply to each scheduled payment
feePercent
Decimal4
The fee percent which will be used to calculate the fee on to each scheduled payment
initialFeeAmount
Numeric11
The fee which will apply to the initial payment if processInitialPaymentOnActivation is true
initialFeePercent
Decimal4
The fee percent which will be used to calculate the initial payment fee if processInitialPaymentOnActivation is true
dialog
AlphaNumeric5000
Conditional
This dialog text comes from the Dialog Templates where each template placeholder variable has been replaced. The templates can either be generated in your system, or you can use the Generate Dialog Endpoint.
Some payment gateway processors, such as Pay N Seconds, require this.
memo
Alphanumeric50
The memo associated to the schedule.
emailAddress
Alphanumeric75
An email address to associate with the schedule. Reminders will be sent to this email address prior to payments being processed, according to the cardReminderDays or checkReminderDays or payPalReminderDays in the Setting for this schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this email address.
If requestPaymentData is true, the flow request will be sent to this email address.
sendReceiptToEmailAddress
Boolean5
Toggle the sending of email receipts on payment processing.
phoneNumber
Numeric10
A phone number to associate with the schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this phone number via text message.
If requestPaymentData is true, the flow request will be sent to this phone number via text message.
sendAuthorizationRequest
BooleanN/A
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
authorization
AuthorizationN/A
The data relating to an authorization request.
flowId
Numeric20
READONLY
The id of the last flow request associated with this schedule. This will only be present if sendAuthorizationRequest or requestPaymentData is true.
addressOne
Alphanumeric80
The address for the person associated with this schedule.
addressTwo
Alphanumeric45
The second part of the address for the person associated with this schedule.
city
Alphanumeric45
The city for the person associated with this schedule.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
zipPlusFour
Alphanumeric4
The four digit zip code extension for the person associated with this schedule.
country
Alphanumeric2
The country for the person associated with this schedule.
origin
Alpha3
The origin of this schedule. This should always be set to “EXT”.
locationId
Numeric10
The locationId for a branch of the company setting up the schedule (if configured, typically this will be blank).
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedule to calculate the payments against. Passing in a recurrence rule here will override the recurrence that was saved as part of the Setting referenced by the settingId. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. Restrictions on which frequencies are allowed are stored in the Setting object. There is no need to start a rule with “RRULE=”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31. Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. If this is changed during a PUT call, then the SchedulePayments will be regenerated.

See note about Schedule Payment Processing.
username
Alphanumeric75
The username for the employee creating the schedule. This value is used as the createUser and/or updateUser.
createUser
Alphanumeric75
READONLY
The user who created the Schedule.
updateUser
Alphanumeric75
READONLY
The user who last modified the Schedule.
createDate
Date19
READONLY
Date the Schedule was created.
Format: URL Encoded ISO-8601
updateDate
Date19
READONLY
Date the Schedule was last updated.
Format: URL Encoded ISO-8601
owedAmount
Numeric11
The original amount, or the amount owed by the debtor. If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
initialPaymentAmount
Numeric11
Conditional
An amount processed before the schedule is started. This will be deducted from the owedAmount.
If processInitialPaymentOnActivation is true this amount is required and will be processed. Otherwise this amount will not be processed, and is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
adjustmentAmount
Numeric11
An amount to be deducted from the owedAmount.
This amount will not be processed by the schedule, but is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
pendingFee
Numeric11
READONLY
The total fees still pending on the schedule.
pendingAmount
Numeric11
READONLY
The total amount still pending on the schedule.
nextPaymentFee
Numeric11
READONLY
The payment fee of the next scheduled payment.
nextPaymentAmount
Numeric11
READONLY
The payment amount of the next scheduled payment.
nextPaymentTotal
Numeric11
READONLY
The payment + fee amount of the next scheduled payment.
collectedFee
Numeric11
READONLY
The total fees that have been collected on the schedule.
collectedAmount
Numeric11
READONLY
The total amount that has been collected on the schedule.
unsuccessfulFee
Numeric11
READONLY
The sum of the payment fees of all failed payments on the schedule.
unsuccessfulAmount
Numeric11
READONLY
The sum of the payment amounts of all failed payments on the schedule.
totalExpectedFee
Numeric11
READONLY
The total fees of all payments on the schedule regardless of status, failed, successful or pending.
totalExpectedAmount
Numeric11
READONLY
The total amount of all payments on the schedule regardless of status, failed, successful or pending.
nextPaymentDate
DateTime19
READONLY
Date the next payment on the schedule is scheduled to process.
Format: URL Encoded ISO-8601
pendingCount
Numeric3
READONLY
The total number of payments that are still waiting to be collected on the schedule.
collectedCount
Numeric3
READONLY
The total number of payments that have been collected successfully on the schedule.
unsuccessfulCount
Numeric3
READONLY
The total number of payments that have been unsuccessful on the schedule.
totalExpectedCount
Numeric3
READONLY
The total number of payments associated with the schedule, regardless of current status.
billingLastFour
Alphanumeric 4
READONLY
The last four digits of the credit card number or the bank account number. From the active payment method.
billingCard
Object N/A
BillingCard object. This is ONLY returned when paymentMethod is CARD and when a single Schedule object is returned.
Description: See object definition below.
billingCheck
ObjectN/A
BillingCheck object. This is ONLY returned when paymentMethod is CHECK and when a single Schedule object is returned.
Description: See object definition below.
billingPayPal
ObjectN/A
BillingPayPal object. This is ONLY returned when paymentMethod is PAYPAL and when a single Schedule object is returned.
Description: See object definition below.
payments
ListN/A
List of SchedulePayment objects for the schedule. This cannot be modified through the schedules endpoint and will only be returned when a single schedule is requested, or when performing a search using the SearchParameters: paymentDateStart, paymentDateEnd, or paymentStatusList.
Description: See object definition below.


See note about Schedule Payment Processing.
customReceiptLabels
ObjectN/A
CustomReceiptLabels object that contains labels which will override the default labels used on receipts. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
customRenderLabels
ObjectN/A
customRenderLabels object that contains labels which will override the default labels used on a Schedule render. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
roundTripMap
ObjectN/A
An object with a custom set of key/value pairs to save and return with the Schedule.
Both the Key and Value are required and must be 75 characters or less.
notificationEvent
String15
Specify if a Notification Event should be sent when the Schedule is created.
If this field is not provided, no Notification Event will be sent. This field is not saved and will not be returned on a GET
Valid value(s):
SCHEDULE
flowRequestList
ListN/A
READONLY
List of FlowRequest objects for the schedule. This will be returned when a single Schedule is returned and cannot be modified through the schedules endpoint. A flow request will be generated any time sendAuthorizationRequest or requestPaymentData is true.
Description: See object definition below.
scheduleHistoryList
ListN/A
READONLY
List of ScheduleHistory objects. This will be returned when a single Schedule is returned and cannot be modified through the schedules endpoint.
Description: See object definition below.

–Schedule Creation

POST :
test urls:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules
live urls:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules


Sample Response:

{
    "id": 2,
    "companyId": 1234,
    "accountNumber": "123455",
    "status": "AUTHORIZE",
    "paymentMethod": "CHECK",
    "firstName": "Test",
    "lastName": "McTester",
    "settingId": 1,
    "emailAddress": "test@test.com",
    "sendReceiptToEmailAddress": false,
    "origin": "EXT",
    "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
    "createUser": "testUser",
    "updateUser": "testUser",
    "createDate": "2020-01-02 16:40:21",
    "updateDate": "2020-01-02 16:40:21",
    "requestPaymentData": false,
    "sendAuthorizationRequest": true,
    "processInitialPaymentOnActivation": false,
    "flowId": 1,
    "pendingAmount": 1000.00,
    "nextPaymentAmount": 100.00,
    "collectedAmount": 0.00,
    "unsuccessfulAmount": 0.00,
    "totalExpectedAmount": 1000.00,
    "nextPaymentDate": "2020-01-13",
    "pendingCount": 10,
    "collectedCount": 0,
    "unsuccessfulCount": 0,
    "totalExpectedCount": 10,
    "owedAmount": 1000,
    "paymentAmount": 100,
    "billingLastFour": "4321",
    "billingCheck": {
        "bankAccountNumber": "aBankToken123456",
        "routingNumber": "123456789",
        "bankAccountType": "CHECKING",
        "accountDirective": "1271-1"
    },
    "payments": [
        {
            "paymentId": 2,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-01-13"
        },
        {
            "paymentId": 3,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-02-13"
        },
        {
            "paymentId": 4,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-03-13"
        },
        {
            "paymentId": 5,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-04-13"
        },
        {
            "paymentId": 6,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-05-13"
        },
        {
            "paymentId": 7,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-06-13"
        },
        {
            "paymentId": 8,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-07-13"
        },
        {
            "paymentId": 9,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-08-13"
        },
        {
            "paymentId": 10,
            "status": "PENDING",
            "paymentAmount": 100,
            "paymentDate": "2020-09-13"
        },
        {
            "paymentId": 11,
            "status": "PENDING",
            "paymentAmount": 100.00,
            "paymentDate": "2020-10-13"
        }
    ],
    "flowRequestList": [
        {
            "flowId": 2,
            "status": "PENDING",
            "statusDate": "2020-01-02 16:40:22"
        }
    ],
    "scheduleHistoryList": [
        {
            "date": "2020-01-02 16:40:21",
            "event": "CREATE",
            "eventId": 14,
            "user": "testUser"
        },
        {
            "date": "2020-01-02 16:40:22",
            "event": "AUTHORIZATION_REQUEST",
            "eventId": 15,
            "user": "testUser",
            "data": "Authorization request HTTP response status: 200 OK"
        },
        {
            "date": "2020-01-02 16:40:22",
            "event": "SCHEDULE_STATUS",
            "eventId": 16,
            "user": "testUser",
            "data": "Status: {ACTIVE} -> {AUTHORIZE}"
        }
    ]
}
Attribute Description
owedAmount
Numeric11
Required
The original amount, or the amount owed by the debtor. If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
initialPaymentAmount
Numeric11
Conditional
An amount processed before the schedule is started. This will be deducted from the owedAmount. If processInitialPaymentOnActivation is true this amount is required and will be processed. Otherwise this amount will not be processed, and is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
adjustmentAmount
Numeric11
An amount to be deducted from the owedAmount. This amount will not be processed by the schedule, but is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
status
AlphaN/A
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature request requesting payment data to be entered.
Default value: DRAFT
settingId
Numeric 10
Required
The id of the schedule setting to be used with this schedule. The setting must first be saved.
sendFlowRequest
Boolean
Flag to determine if Schedule Service should send the Flow request, or if it will be requested separately using the Flow Service API
The following 2 attributes sendAuthorizationRequest and requestPaymentData still need to be set to the proper value so the Signature Service API can build the Flow request correctly.
Default value: true
sendAuthorizationRequest
Boolean5
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
If sendAuthorizationRequest is true, the Authorization object is required, along with either the emailAddress or phoneNumber.
requestPaymentData
Boolean5
If this is true, a flow request will be sent to the emailAddress or phoneNumber requesting the payment information.
The accountDirective for all allowed payment types is required if this is set to true.
A valid emailAddress or phoneNumber is required when set to true.
processInitialPaymentOnActivation
Boolean5
If this is true, the initialPaymentAmount is required. The initialPaymentAmount will be inserted as the first payment and will be processed when the schedule goes ACTIVE.

See note about Schedule Payment Processing.
paymentMethod
Alpha5
Conditional
The payment method to be used for processing payments on this schedule.
Valid value(s):
CARD
CHECK
PAYPAL
Required if requestPaymentData is false.
billingCard
ObjectN/A
Conditional
BillingCard object. This is ONLY returned when paymentMethod is CARD and when a single Schedule object is returned.
Required if paymentMethod is set to CARD. Only the accountDirective field in the billingCard object is required if requestPaymentData is true and CARD is an accepted payment type.
Details
cardToken
Alphanumeric 16
Required
The credit card token. This must be a token, and not a raw credit card number.
To create a token, see Secure Overlay API and/or TokenizationService.
cardType
Alpha50
Readonly
The type of card used for the schedule.
Possible values: AMERICAN_EXPRESS, DISCOVER, MASTERCARD, VISA, UNKNOWN
expirationMonth
Numeric 2
Conditional
The credit card expiration month.
This value will be retrieved from the cardToken if not provided. Required if expirationYear is provided.
expirationYear
Numeric 2
Conditional
The credit card expiration year.
This value will be retrieved from the cardToken if not provided. Required if expirationMonth is provided.
securityCode
Numeric4
The security code or cvv2 of the credit card to be used for verification or processing the first payment. This field is not returned.
accountDirective
Alphanumeric 10
Required
The account directive that defines which card merchant account to use for processing the schedule payments.
billingCheck
ObjectN/A
Conditional
BillingCheck object. This is ONLY returned when paymentMethod is CHECK and when a single Schedule object is returned.
Required if paymentMethod is set to CHECK. Only the accountDirective field in the billingCheck object is required if requestPaymentData is true and CHECK is an accepted payment type.
Details
routingNumber
Numeric 9
Conditional
The bank routing number for processing the schedule payments.
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
bankAccountNumber
Alphanumeric 20
Required
A bank Token or a raw bank account number to use for processing the schedule payments.
To create a token, see Secure Overlay API and/or TokenizationService.
NOTE: Providing a raw bank account number is deprecated. When a raw bank account number is provided, the bankAccountNumber, routingNumber, and bankAccountType will be Tokenized and the Token will be returned here as the bankAccountNumber
bankAccountType
AlphaN/A
Conditional
Valid values:
CHECKING
SAVINGS
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
accountDirective
Alphanumeric 10
Required
The account directive that defines which check merchant account to use for processing the schedule payments.
billingPayPal
ObjectN/A
Conditional
BillingPayPal object. This is ONLY returned when paymentMethod is PAYPAL and when a single Schedule object is returned.
Required if paymentMethod is set to PAYPAL. Only the accountDirective field in the billingPayPal object is required if requestPaymentData is true and PAYPAL is an accepted payment type.
Details
vaultId
Alphanumeric 16
Required
A reference for the PayPal payment information.
This can be generated by sending true for requestPaymentData which will use FlowService, or use TransactionService
accountDirective
Alphanumeric 10
Required
The account directive that defines which PayPal merchant account to use for processing the schedule payments.
firstName
Alphanumeric45
Required
The first name of the person associated to this schedule.
lastName
Alphanumeric45
Required
The last name of the person associated to this schedule.
accountNumber
Alphanumeric45
Required
The accountNumber of the person associated to this schedule.
numberOfPayments
Numeric3
The number of payments used for creation of the schedule. If this is provided, the paymentAmount cannot be provided.
The number of payments, along with the minimum amount per payment, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the number of payments is too great, an error message will be provided that indicates the maximum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
paymentAmount
Numeric11
This is the amount that will be charged for each scheduled payment. If this is provided the numberOfPayments cannot be provided.
The paymentAmount, along with the term setting, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the payment amount is too small an error message will be provided that indicates the minimum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
feeAmount
Numeric11
The fee which will apply to each scheduled payment
feePercent
Decimal4
The fee percent which will be used to calculate the fee on to each scheduled payment
initialFeeAmount
Numeric11
The fee which will apply to the initial payment if processInitialPaymentOnActivation is true
initialFeePercent
Decimal4
The fee percent which will be used to calculate the initial payment fee if processInitialPaymentOnActivation is true
dialog
AlphaNumeric5000
Conditional
This dialog text comes from the Dialog Templates where each template placeholder variable has been replaced. The templates can either be generated in your system, or you can use the Generate Dialog Endpoint.
Some payment gateway processors, such as Pay N Seconds, require this.
memo
Alphanumeric50
The memo associated to the schedule.
sendReceiptToEmailAddress
Boolean5
Required
Toggle the sending of email receipts on payment processing. A valid emailAddress is required when set to true.
sendAuthorizationRequest
BooleanN/A
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
If sendAuthorizationRequest is true, the Authorization object is required, along with either the emailAddress or phoneNumber.
emailAddress
Alphanumeric75
Conditional
An email address to associate with the schedule. Reminders will be sent to this email address prior to payments being processed, according to the cardReminderDays or checkReminderDays or payPalReminderDays in the Setting for this schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this email address.
If requestPaymentData is true, the flow request will be sent to this email address.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
phoneNumber
Numeric10
Conditional
A phone number to associate with the schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this phone number via text message.
If requestPaymentData is true, the flow request will be sent to this phone number via text message.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
authorization
AuthorizationN/A
Conditional
The data relating to an authorization request. Required if sendAuthorizationRequest or requestPaymentData is true.
Details
pinDescription
Alphanumeric50
Required
A description of the PIN the user will enter to access their authorization request. This cannot contain the verificationPin.
verificationPin
Numeric4-8
Required
The pin that the user will need to enter in order to access their authorization request.
verificationPageHeader
Alpha160
Text that will be displayed above the verification pin entry on the verification page.
pageFooter
Alpha1000
Text that will be displayed below the verification pin hint on the verification page.
timeoutMinutes
Numeric6
Required
The amount of minutes that the authorization request will be accessible for. The user must complete the authorization request before this timeout, or a new authorization request will need to be sent.
eventRecipientList
ListN/A
List of EventRecipient objects. These recipients will receive a notification for a final Flow status of COMPLETED, DISPUTED, EXPIRED, FAILED.
EventRecipient Object
emailAddress
Alphanumeric75
Required
An Email address to receive a Flow event notification.
addressOne
Alphanumeric80
The address for the person associated with this schedule.
addressTwo
Alphanumeric45
The second part of the address for the person associated with this schedule.
city
Alphanumeric45
The city for the person associated with this schedule.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
zipPlusFour
Alphanumeric4
The four digit zip code extension for the person associated with this schedule.
country
Alphanumeric2
The country for the person associated with this schedule.
origin
Alpha3
The origin of this schedule. This should always be set to “EXT”.
locationId
Numeric10
The locationId for a branch of the company setting up the schedule (if configured, typically this will be blank).
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedule to calculate the payments against. Passing in a recurrence rule here will override the recurrence that was saved as part of the Setting referenced by the settingId. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. Restrictions on which frequencies are allowed are stored in the Setting object. There is no need to start a rule with “RRULE=”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31. Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. If this is changed during a PUT call, then the SchedulePayments will be regenerated.

See note about Schedule Payment Processing.
username
Alphanumeric75
Required
The username for the employee creating the schedule. This value is used as the createUser and/or updateUser.
customReceiptLabels
ObjectN/A
CustomReceiptLabels object that contains labels which will override the default labels used on receipts. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
customRenderLabels
ObjectN/A
customRenderLabels object that contains labels which will override the default labels used on a Schedule render. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
roundTripMap
ObjectN/A
An object with a custom set of key/value pairs to save and return with the Schedule.
Both the Key and Value are required and must be 75 characters or less.
notificationEvent
String15
Specify if a Notification Event should be sent when the Schedule is created.
If this field is not provided, no Notification Event will be sent. This field is not saved and will not be returned on a GET
Valid value(s):
SCHEDULE
flowId
Numeric20
WRITEONLY
If provided, a History Event will be added to the schedule, linking this schedule to an existing Flow Request.
This value will NOT be returned in the READONLY flowId field of the schedule object.

–Schedule Override

PUT :
test urls:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}
live urls:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}


Sample Response:

{
  "id": 17381,
  "companyId": 1234,
  "accountNumber": "123455",
  "status": "ACTIVE",
  "paymentMethod": "CHECK",
  "firstName": "Test",
  "lastName": "McTester",
  "settingId": 5669,
  "emailAddress": "test@test.com",
  "sendReceiptToEmailAddress": false,
  "origin": "EXT",
  "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
  "createUser": "test@test.com",
  "updateUser": "testUser",
  "createDate": "2019-12-06 11:23:13",
  "updateDate": "2020-01-13 13:59:05",
  "requestPaymentData": false,
  "sendAuthorizationRequest": false,
  "processInitialPaymentOnActivation": false,
  "flowId": 3,
  "pendingAmount": 1000.00,
  "nextPaymentAmount": 100.00,
  "collectedAmount": 0.00,
  "unsuccessfulAmount": 0.00,
  "totalExpectedAmount": 1000.00,
  "nextPaymentDate": "2020-01-24",
  "pendingCount": 10,
  "collectedCount": 0,
  "unsuccessfulCount": 0,
  "totalExpectedCount": 10,
  "billingLastFour": "4321",
  "billingCheck": {
    "bankAccountNumber": "aBankToken123456",
    "routingNumber": "123456789",
    "bankAccountType": "CHECKING",
    "accountDirective": "1271-1"
  },
  "payments": [
    {
      "paymentId": 179361,
      "status": "PAID",
      "paymentAmount": 100.00,
      "paymentDate": "2019-12-07"
    },
    {
      "paymentId": 179362,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-02-24"
    },
    {
      "paymentId": 179363,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-03-24"
    },
    {
      "paymentId": 179364,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-04-24"
    },
    {
      "paymentId": 179365,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-05-24"
    },
    {
      "paymentId": 179366,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-06-24"
    },
    {
      "paymentId": 179367,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-07-24"
    },
    {
      "paymentId": 179368,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-08-24"
    },
    {
      "paymentId": 179369,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-09-24"
    },
    {
      "paymentId": 179370,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-10-24"
    }
  ],
  "customReceiptLabels": {
    "PAYMENT": "My new payment label",
    "ACCOUNT_NUMBER": "My new account number label",
    "MEMO": "My new memo label",
    "BANK_ACCOUNT_TYPE": "My new account type label"
  },
  "customRenderLabels": {
    "SCHEDULE_STATUS": "My new schedule status label"
  },
  "roundTripMap": {
    "myField1": "Custom Value 1",
    "myField2": "Custom Value 2"
  },
  "flowRequestList": [
    {
      "flowId": 29094,
      "status": "COMPLETED",
      "statusDate": "2019-12-06 11:23:47",
      "flowResultList": [
        {
          "flowId": 29094,
          "status": "BILLING_RECEIVE",
          "statusDate": "2019-12-06 11:23:47"
        },
        {
          "flowId": 29094,
          "status": "COMPLETED",
          "statusDate": "2019-12-06 11:23:47"
        }
      ]
    }
  ],
  "scheduleHistoryList": [
    {
      "date": "2019-12-06 11:23:13",
      "event": "CREATE",
      "eventId": 17381,
      "user": "test@test.com"
    },
    {
      "date": "2019-12-06 11:23:16",
      "event": "BILLING_REQUEST",
      "eventId": 29094,
      "user": "test@test.com",
      "data": "Authorization request HTTP response status: 200 OK"
    },
    {
      "date": "2019-12-06 11:23:17",
      "event": "SCHEDULE_STATUS",
      "eventId": 17381,
      "user": "test@test.com",
      "data": "Status: {ACTIVE} -> {BILLING_DATA}"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "BILLING_MODIFY",
      "eventId": 17381,
      "user": "signatureUI",
      "data": "Change Billing Card"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "FLOW_RESULT",
      "eventId": 3236,
      "user": "signatureUI",
      "data": "FlowId: 29094 Updated with status of BILLING_RECEIVE"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "SCHEDULE_STATUS",
      "eventId": 17381,
      "user": "signatureUI",
      "data": "Status: {BILLING_DATA} -> {ACTIVE}"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "FLOW_RESULT",
      "eventId": 3237,
      "user": "signatureUI",
      "data": "FlowId: 29094 Updated with status of COMPLETED"
    },
    {
      "date": "2019-12-07 04:00:50",
      "event": "PAYMENT_ATTEMPT",
      "eventId": 2229,
      "user": "recurring"
    },
    {
      "date": "2020-01-13 13:59:05",
      "event": "SCHEDULE_MODIFY",
      "eventId": 17381,
      "user": "testUser"
    }
  ]
}

PUT requests will completely override the existing specified (by scheduleId in the URL) schedule. As such, the request object the same as the schedule creation. Modifying a schedule will remove all PENDING payments from the existing schedule and will generate new payments based off the PUT request. Payments that have already been processed for this schedule will not be changed.

Schedule Modification
Attribute Description
scheduleId
Alpha8
The id of the Schedule to modify. Set in the URL.
status
AlphaN/A
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature request requesting payment data to be entered.
settingId
Numeric 10
Required
The id of the schedule setting to be used with this schedule. The setting must first be saved.
paymentMethod
Alpha5
Conditional
The payment method to be used for processing payments on this schedule.
Valid value(s):
CARD
CHECK
PAYPAL
Required if requestPaymentData is false.
requestPaymentData
Boolean5
If this is true, a flow request will be sent to the emailAddress or phoneNumber requesting the payment information.
The accountDirective for all allowed payment types is required if this is set to true.
A valid emailAddress or phoneNumber is required when set to true.
processInitialPaymentOnActivation
Boolean5
If this is true, the initialPaymentAmount is required. The initialPaymentAmount will be inserted as the first payment and will be processed when the schedule goes ACTIVE.

See note about Schedule Payment Processing.
firstName
Alphanumeric45
Required
The first name of the person associated to this schedule.
lastName
Alphanumeric45
Required
The last name of the person associated to this schedule.
accountNumber
Alphanumeric45
Required
The accountNumber of the person associated to this schedule.
numberOfPayments
Numeric3
The number of payments used for creation of the schedule. If this is provided, the paymentAmount cannot be provided.
The number of payments, along with the minimum amount per payment, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the number of payments is too great, an error message will be provided that indicates the maximum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
paymentAmount
Numeric11
This is the amount that will be charged for each scheduled payment. If this is provided the numberOfPayments cannot be provided.
The paymentAmount, along with the term setting, must generate a schedule with less payments than the maxTerm in the setting for this schedule. If the payment amount is too small an error message will be provided that indicates the minimum value.
If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
memo
Alphanumeric50
The memo associated to the schedule.
emailAddress
Alphanumeric75
Conditional
An email address to associate with the schedule. Reminders will be sent to this email address prior to payments being processed, according to the cardReminderDays or checkReminderDays or payPalReminderDays in the Setting for this schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this email address.
If requestPaymentData is true, the flow request will be sent to this email address.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
sendReceiptToEmailAddress
Boolean5
Required
Toggle the sending of email receipts on payment processing. A valid emailAddress is required when set to true.
phoneNumber
Numeric10
Conditional
A phone number to associate with the schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this phone number via text message.
If requestPaymentData is true, the flow request will be sent to this phone number via text message.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
sendAuthorizationRequest
BooleanN/A
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
If sendAuthorizationRequest is true, the Authorization object is required, along with either the emailAddress or phoneNumber.
authorization
AuthorizationN/A
Conditional
The data relating to an authorization request. Required if sendAuthorizationRequest or requestPaymentData is true.
Details
pinDescription
Alphanumeric50
Required
A description of the PIN the user will enter to access their authorization request. This cannot contain the verificationPin.
verificationPin
Numeric4-8
Required
The pin that the user will need to enter in order to access their authorization request.
timeoutMinutes
Numeric6
Required
The amount of minutes that the authorization request will be accessible for. The user must complete the authorization request before this timeout, or a new authorization request will need to be sent.
eventRecipientList
ListN/A
List of EventRecipient objects. These recipients will receive a notification for a final Flow status of COMPLETED, DISPUTED, EXPIRED, FAILED.
EventRecipient Object
emailAddress
Alphanumeric75
Required
An Email address to receive a Flow event notification.
addressOne
Alphanumeric80
The address for the person associated with this schedule.
addressTwo
Alphanumeric45
The second part of the address for the person associated with this schedule.
city
Alphanumeric45
The city for the person associated with this schedule.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
zipPlusFour
Alphanumeric4
The four digit zip code extension for the person associated with this schedule.
country
Alphanumeric2
The country for the person associated with this schedule.
origin
Alpha3
The origin of this schedule. This should always be set to “EXT”.
locationId
Numeric10
The locationId for a branch of the company setting up the schedule (if configured, typically this will be blank).
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedule to calculate the payments against. Passing in a recurrence rule here will override the recurrence that was saved as part of the Setting referenced by the settingId. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. Restrictions on which frequencies are allowed are stored in the Setting object. There is no need to start a rule with “RRULE=”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31. Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. If this is changed during a PUT call, then the SchedulePayments will be regenerated.

See note about Schedule Payment Processing.
username
Alphanumeric75
Required
The username for the employee creating the schedule. This value is used as the createUser and/or updateUser.
owedAmount
Numeric11
Required
The original amount, or the amount owed by the debtor. If this is changed during a PUT call, then the SchedulePayments will be regenerated. Only returns if not zero on POST or PUT requests.
initialPaymentAmount
Numeric11
Conditional
An amount processed before the schedule is started. This will be deducted from the owedAmount.
If processInitialPaymentOnActivation is true this amount is required and will be processed. Otherwise this amount will not be processed, and is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
adjustmentAmount
Numeric11
An amount to be deducted from the owedAmount.
This amount will not be processed by the schedule, but is on the schedule for reference only.
Only returns if not zero on POST or PUT requests.
billingCard
Object
N/A
Conditional
BillingCard object. This is ONLY returned when paymentMethod is CARD and when a single Schedule object is returned.
Required if paymentMethod is set to CARD. Only the accountDirective field in the billingCard object is required if requestPaymentData is true and CARD is an accepted payment type.
Details
cardToken
Alphanumeric 16
Required
The credit card token. This must be a token, and not a raw credit card number.
To create a token, see Secure Overlay API and/or TokenizationService.
cardType
Alpha50
Readonly
The type of card used for the schedule.
Possible values: AMERICAN_EXPRESS, DISCOVER, MASTERCARD, VISA, UNKNOWN
expirationMonth
Numeric 2
Conditional
The credit card expiration month.
This value will be retrieved from the cardToken if not provided. Required if expirationYear is provided.
expirationYear
Numeric 2
Conditional
The credit card expiration year.
This value will be retrieved from the cardToken if not provided. Required if expirationMonth is provided.
securityCode
Numeric4
The security code or cvv2 of the credit card to be used for verification or processing the first payment. This field is not returned.
accountDirective
Alphanumeric 10
Required
The account directive that defines which card merchant account to use for processing the schedule payments.
billingCheck
Object
N/A
Conditional
BillingCheck object. This is ONLY returned when paymentMethod is CHECK and when a single Schedule object is returned.
Required if paymentMethod is set to CHECK. Only the accountDirective field in the billingCheck object is required if requestPaymentData is true and CHECK is an accepted payment type.
Details
routingNumber
Numeric 9
Conditional
The bank routing number for processing the schedule payments.
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
bankAccountNumber
Alphanumeric 20
Required
A bank Token or a raw bank account number to use for processing the schedule payments.
To create a token, see Secure Overlay API and/or TokenizationService.
NOTE: Providing a raw bank account number is deprecated. When a raw bank account number is provided, the bankAccountNumber, routingNumber, and bankAccountType will be Tokenized and the Token will be returned here as the bankAccountNumber
bankAccountType
AlphaN/A
Conditional
Valid values:
CHECKING
SAVINGS
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
accountDirective
Alphanumeric 10
Required
The account directive that defines which check merchant account to use for processing the schedule payments.
billingPayPal
ObjectN/A
Conditional
BillingPayPal object. This is ONLY returned when paymentMethod is PAYPAL and when a single Schedule object is returned.
Required if paymentMethod is set to PAYPAL. Only the accountDirective field in the billingPayPal object is required if requestPaymentData is true and PAYPAL is an accepted payment type.
Details
vaultId
Alphanumeric 16
Required
A reference for the PayPal payment information.
This can be generated by sending true for requestPaymentData which will use FlowService, or use TransactionService
accountDirective
Alphanumeric 10
Required
The account directive that defines which PayPal merchant account to use for processing the schedule payments.
customReceiptLabels
ObjectN/A
CustomReceiptLabels object that contains labels which will override the default labels used on receipts. This will be returned when a single schedule returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
customRenderLabels
ObjectN/A
customRenderLabels object that contains labels which will override the default labels used on a Schedule render. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
roundTripMap
ObjectN/A
An object with a custom set of key/value pairs to save and return with the Schedule.
Both the Key and Value are required and must be 75 characters or less.
notificationEvent
String15
Specify if a Notification Event should be sent when the Schedule is created.
If this field is not provided, no Notification Event will be sent. This field is not saved and will not be returned on a GET
Valid value(s):
SCHEDULE

–Schedule Modification

PATCH :
test urls:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}
live urls:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}


Sample Response:

{
  "id": 17381,
  "companyId": 1234,
  "accountNumber": "123455",
  "status": "ACTIVE",
  "paymentMethod": "CHECK",
  "firstName": "Test",
  "lastName": "McTester",
  "settingId": 5669,
  "emailAddress": "test@test.com",
  "sendReceiptToEmailAddress": false,
  "origin": "EXT",
  "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
  "createUser": "test@test.com",
  "updateUser": "testUser",
  "createDate": "2019-12-06 11:23:13",
  "updateDate": "2020-01-13 13:59:05",
  "requestPaymentData": false,
  "sendAuthorizationRequest": false,
  "flowId": 3,
  "pendingAmount": 1000.00,
  "nextPaymentAmount": 100.00,
  "collectedAmount": 0.00,
  "unsuccessfulAmount": 0.00,
  "totalExpectedAmount": 1000.00,
  "nextPaymentDate": "2020-01-24",
  "pendingCount": 10,
  "collectedCount": 0,
  "unsuccessfulCount": 0,
  "totalExpectedCount": 10,
  "billingLastFour": "4321",
  "billingCheck": {
    "bankAccountNumber": "aBankToken123456",
    "routingNumber": "123456789",
    "bankAccountType": "CHECKING",
    "accountDirective": "1271-1"
  },
  "payments": [
    {
      "paymentId": 179361,
      "status": "PAID",
      "paymentAmount": 100.00,
      "paymentDate": "2019-12-07"
    },
    {
      "paymentId": 179362,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-02-24"
    },
    {
      "paymentId": 179363,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-03-24"
    },
    {
      "paymentId": 179364,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-04-24"
    },
    {
      "paymentId": 179365,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-05-24"
    },
    {
      "paymentId": 179366,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-06-24"
    },
    {
      "paymentId": 179367,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-07-24"
    },
    {
      "paymentId": 179368,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-08-24"
    },
    {
      "paymentId": 179369,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-09-24"
    },
    {
      "paymentId": 179370,
      "status": "PENDING",
      "paymentAmount": 100.00,
      "paymentDate": "2020-10-24"
    }
  ],
  "customReceiptLabels": {
      "PAYMENT": "My new payment label",
      "ACCOUNT_NUMBER": "My new account number label",
      "MEMO": "My new memo label",
      "BANK_ACCOUNT_TYPE": "My new account type label"
  },
  "customRenderLabels": {
      "SCHEDULE_STATUS": "My new schedule status label"
  },
  "roundTripMap": {
    "myField1": "Custom Value 1",
    "myField2": "Custom Value 2"
  },
  "flowRequestList": [
    {
      "flowId": 29094,
      "status": "COMPLETED",
      "statusDate": "2019-12-06 11:23:47",
      "flowResultList": [
        {
          "flowId": 29094,
          "status": "BILLING_RECEIVE",
          "statusDate": "2019-12-06 11:23:47"
        },
        {
          "flowId": 29094,
          "status": "COMPLETED",
          "statusDate": "2019-12-06 11:23:47"
        }
      ]
    }
  ],
  "scheduleHistoryList": [
    {
      "date": "2019-12-06 11:23:13",
      "event": "CREATE",
      "eventId": 17381,
      "user": "test@test.com"
    },
    {
      "date": "2019-12-06 11:23:16",
      "event": "BILLING_REQUEST",
      "eventId": 29094,
      "user": "test@test.com",
      "data": "Authorization request HTTP response status: 200 OK"
    },
    {
      "date": "2019-12-06 11:23:17",
      "event": "SCHEDULE_STATUS",
      "eventId": 17381,
      "user": "test@test.com",
      "data": "Status: {ACTIVE} -> {BILLING_DATA}"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "BILLING_MODIFY",
      "eventId": 17381,
      "user": "signatureUI",
      "data": "Change Billing Card"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "FLOW_RESULT",
      "eventId": 3236,
      "user": "signatureUI",
      "data": "FlowId: 29094 Updated with status of BILLING_RECEIVE"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "SCHEDULE_STATUS",
      "eventId": 17381,
      "user": "signatureUI",
      "data": "Status: {BILLING_DATA} -> {ACTIVE}"
    },
    {
      "date": "2019-12-06 11:23:47",
      "event": "FLOW_RESULT",
      "eventId": 3237,
      "user": "signatureUI",
      "data": "FlowId: 29094 Updated with status of COMPLETED"
    },
    {
      "date": "2019-12-07 04:00:50",
      "event": "PAYMENT_ATTEMPT",
      "eventId": 2229,
      "user": "recurring"
    },
    {
      "date": "2020-01-13 13:59:05",
      "event": "SCHEDULE_MODIFY",
      "eventId": 17381,
      "user": "testUser"
    }
  ]
}

PATCH requests will update the existing specified (by scheduleId in the URL) schedule. This is a soft update and will not regenerate the schedule payments. As such, fields which would require the payments to be regenerated will not be allowed in this request. Fields left null will not affect the schedule, while fields set to an empty string will remove the stored value from the schedule. As such, certain required fields cannot be set to empty.

Attribute Description
scheduleId
Alpha8
The id of the Schedule to modify. Set in the URL.
firstName
Alphanumeric45
Cannot be set empty. The first name of the person associated to this schedule.
lastName
Alphanumeric45
Cannot be set empty. The last name of the person associated to this schedule.
accountNumber
Alphanumeric45
Cannot be set empty. The accountNumber of the person associated to this schedule.
origin
Alpha3
The origin of this schedule. This should always be set to “EXT”.
status
AlphaN/A
Cannot be set empty.
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature request requesting payment data to be entered.
paymentMethod
Alpha5
The payment method to be used for processing payments on this schedule.
Valid value(s):
CARD
CHECK
PAYPAL
requestPaymentData
Boolean5
If this is true, a flow request will be sent to the emailAddress or phoneNumber requesting the payment information.
The accountDirective for all allowed payment types is required if this is set to true.
A valid emailAddress or phoneNumber is required when set to true.
dialog
AlphaNumeric5000
Conditional
This dialog text comes from the Dialog Templates where each template placeholder variable has been replaced. The templates can either be generated in your system, or you can use the Generate Dialog Endpoint.
Some payment gateway processors, such as Pay N Seconds, require this.
memo
Alphanumeric50
The memo associated to the schedule.
emailAddress
Alphanumeric75
An email address to associate with the schedule. Reminders will be sent to this email address prior to payments being processed, according to the cardReminderDays or checkReminderDays or payPalReminderDays in the Setting for this schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this email address.
If requestPaymentData is true, the flow request will be sent to this email address.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
sendReceiptToEmailAddress
Boolean5
Toggle the sending of email receipts on payment processing. A valid emailAddress is required when set to true.
phoneNumber
Numeric10
A phone number to associate with the schedule.
If sendAuthorizationRequest is true, the flow request will be sent to this phone number via text message.
If requestPaymentData is true, the flow request will be sent to this phone number via text message.
Either the emailAddress or phoneNumber is required if sendAuthorizationRequest or requestPaymentData is true.
sendAuthorizationRequest
BooleanN/A
Whether an authorization request will be sent to the included emailAddress and/or phoneNumber.
Default: false.
An authorization request will only be sent if the status of the schedule is ACTIVE, AUTHORIZE or UNAUTHORIZED. When an authorization request is sent, the schedule will be set to a status of AUTHORIZE until the account holder has completed the authorization request. When the authorization request is successfully completed, the status of the schedule will be set to ACTIVE.
If sendAuthorizationRequest is true, the Authorization object is required, along with either the emailAddress or phoneNumber.
authorization
AuthorizationN/A
Conditional
The data relating to an authorization request. Required if sendAuthorizationRequest or requestPaymentData is true.
Details
pinDescription
Alphanumeric50
Required
A description of the PIN the user will enter to access their authorization request. This cannot contain the verificationPin.
verificationPin
Numeric4-8
Required
The pin that the user will need to enter in order to access their authorization request.
timeoutMinutes
Numeric6
Required
The amount of minutes that the authorization request will be accessible for. The user must complete the authorization request before this timeout, or a new authorization request will need to be sent.
eventRecipientList
ListN/A
List of EventRecipient objects. These recipients will receive a notification for a final Flow status of COMPLETED, DISPUTED, EXPIRED, FAILED.
EventRecipient Object
emailAddress
Alphanumeric75
Required
An Email address to receive a Flow event notification.
addressOne
Alphanumeric80
The address for the person associated with this schedule.
addressTwo
Alphanumeric45
The second part of the address for the person associated with this schedule.
city
Alphanumeric45
The city for the person associated with this schedule.
state
Alpha2
Conditional
The state for the person associated with this schedule. Some payment gateway processors require this.
zip
NumericString5
Conditional
The zip code for the person associated with this schedule. Some payment gateway processors require this.
zipPlusFour
Alphanumeric4
The four digit zip code extension for the person associated with this schedule.
country
Alphanumeric2
The country for the person associated with this schedule.
locationId
Numeric10
The locationId for a branch of the company setting up the schedule (if configured. Typically this will be blank).
username
Alphanumeric75
Required
The username for the employee creating the schedule. This value is used as the createUser and/or updateUser.
billingCard
ObjectN/A
Conditional
BillingCard object. This is ONLY returned when paymentMethod is CARD and when a single Schedule object is returned.
Required if paymentMethod is set to CARD. Only the accountDirective field in the billingCard object is required if requestPaymentData is true and CARD is an accepted payment type.
Details
cardToken
Alphanumeric 16
Required
The credit card token. This must be a token, and not a raw credit card number.
To create a token, see Secure Overlay API and/or TokenizationService.
cardType
Alpha50
Readonly
The type of card used for the schedule.
Possible values: AMERICAN_EXPRESS, DISCOVER, MASTERCARD, VISA, UNKNOWN
expirationMonth
Numeric 2
Conditional
The credit card expiration month.
This value will be retrieved from the cardToken if not provided. Required if expirationYear is provided.
expirationYear
Numeric 2
Conditional
The credit card expiration year.
This value will be retrieved from the cardToken if not provided. Required if expirationMonth is provided.
securityCode
Numeric4
The security code or cvv2 of the credit card to be used for verification or processing the first payment. This field is not returned.
accountDirective
Alphanumeric 10
Required
The account directive that defines which card merchant account to use for processing the schedule payments.
billingCheck
ObjectN/A
Conditional
BillingCheck object. This is ONLY returned when paymentMethod is CHECK and when a single Schedule object is returned.
Required if paymentMethod is set to CHECK. Only the accountDirective field in the billingCheck object is required if requestPaymentData is true and CHECK is an accepted payment type.
Details
routingNumber
Numeric 9
Conditional
The bank routing number for processing the schedule payments.
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
bankAccountNumber
Alphanumeric 20
Required
A bank Token or a raw bank account number to use for processing the schedule payments.
To create a token, see Secure Overlay API and/or TokenizationService.
NOTE: Providing a raw bank account number is deprecated. When a raw bank account number is provided, the bankAccountNumber, routingNumber, and bankAccountType will be Tokenized and the Token will be returned here as the bankAccountNumber
bankAccountType
AlphaN/A
Conditional
Valid values:
CHECKING
SAVINGS
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
accountDirective
Alphanumeric 10
Required
The account directive that defines which check merchant account to use for processing the schedule payments.
billingPayPal
ObjectN/A
Conditional
BillingPayPal object. This is ONLY returned when paymentMethod is PAYPAL and when a single Schedule object is returned.
Required if paymentMethod is set to PAYPAL. Only the accountDirective field in the billingPayPal object is required if requestPaymentData is true and PAYPAL is an accepted payment type.
Details
vaultId
Alphanumeric 16
Required
A reference for the PayPal payment information.
This can be generated by sending true for requestPaymentData which will use FlowService, or use TransactionService
accountDirective
Alphanumeric 10
Required
The account directive that defines which PayPal merchant account to use for processing the schedule payments.
customReceiptLabels
ObjectN/A
CustomReceiptLabels object that contains labels which will override the default labels used on receipts. This will be returned when a single schedule returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
customRenderLabels
ObjectN/A
customRenderLabels object that contains labels which will override the default labels used on a Schedule render. This will be returned when a single schedule is returned and can be modified through the schedules endpoint. Invalid values will be ignored.
Description: See object definition below.
roundTripMap
ObjectN/A
An object with a custom set of key/value pairs to save and return with the Schedule.
Both the Key and Value are required and must be 75 characters or less.
notificationEvent
String15
Specify if a Notification Event should be sent when the Schedule is created.
If this field is not provided, no Notification Event will be sent. This field is not saved and will not be returned on a GET
Valid value(s):
SCHEDULE

–Account Directive Migration

PATCH :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/migrations/accountdirectives
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/migrations/accountdirectives

Sample Response:

{
  "response": "Account directive migration started for 15 schedules"
}

Send a PATCH request with a AccountDirectiveMigration body to migrate all schedules that aren’t in a COMPLETED status from one accountDirective to another. This will apply only to unprocessed new scheduled payments. Returns a MigrationResponse. This is an asynchronous process and realtime processing results will not be returned.

AccountDirectiveMigration

Attribute Description
oldAccountDirective
Alphanumeric String 10
Required
The accountDirective assigned to the targeted schedules.
newAccountDirective
Alphanumeric String 10
Required
The desired accountDirective to assign to the targeted schedules.
Constraint(s): Must be valid for the same payment method as the oldAccountDirective.
If the payment method is CARD, this field must allow at least the same card types as the oldAccountDirective.
If the payment method is CHECK, this field must be valid for the same SEC code as the oldAccountDirective

MigrationResponse

Attribute Description
response
String
A description of the processing status.
requestErrorList
List
A list of RequestError objects. Only returned on unsuccessful migrations.

–Schedule Retrieval (List)

POST :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/search
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/search


Sample Response:

{
  "scheduleList": [
    {
      "id": 23,
      "companyId": 1234,
      "accountNumber": "456465",
      "status": "COMPLETED",
      "paymentMethod": "CHECK",
      "firstName": "Cashier",
      "lastName": "test",
      "settingId": 2,
      "memo": "Cashier test",
      "addressOne": "3242 Street",
      "city": "myCity",
      "state": "UT",
      "zip": "12345",
      "origin": "EXT",
      "locationId": "2",
      "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
      "createUser": "test@test.com",
      "updateUser": "tester@test.com",
      "createDate": "2018-04-03 15:48:07",
      "updateDate": "2018-08-30 10:44:37",
      "requestPaymentData": false,
      "sendAuthorizationRequest": false,
      "pendingAmount": 0.00,
      "nextPaymentAmount": 0.00,
      "collectedAmount": 100.00,
      "unsuccessfulAmount": 400.00,
      "totalExpectedAmount": 580.00,
      "pendingCount": 0,
      "collectedCount": 4,
      "unsuccessfulCount": 1,
      "totalExpectedCount": 5,
      "initialPaymentAmount": 0,
      "adjustmentAmount": 0,
      "billingLastFour": "1212"
    },
    {
      "id": 24,
      "companyId": 1234,
      "accountNumber": "12344",
      "status": "COMPLETED",
      "paymentMethod": "CARD",
      "firstName": "Arthur",
      "lastName": "TestMan",
      "settingId": 3,
      "emailAddress": "tested@test.com",
      "origin": "EXT",
      "recurrenceRule": "FREQ=DAILY;INTERVAL=1;",
      "createUser": "test@test.com",
      "updateUser": "test@test.com",
      "createDate": "2018-04-05 12:17:28",
      "updateDate": "2018-04-26 17:15:55",
      "requestPaymentData": false,
      "sendAuthorizationRequest": false,
      "pendingAmount": 0.00,
      "collectedAmount": 10.01,
      "unsuccessfulAmount": 0.00,
      "totalExpectedAmount": 10.01,
      "pendingCount": 0,
      "collectedCount": 2,
      "unsuccessfulCount": 0,
      "totalExpectedCount": 2,
      "initialPaymentAmount": 0,
      "adjustmentAmount": 0,
      "billingLastFour": "2224"
    },
    {
      "id": 25,
      "companyId": 1234,
      "accountNumber": "8874",
      "status": "ACTIVE",
      "paymentMethod": "CARD",
      "firstName": "Keith",
      "lastName": "CardTester",
      "settingId": 1374,
      "emailAddress": "test@tests.com",
      "phoneNumber": "8017810199",
      "addressOne": "223 Round Ave",
      "city": "CityPlace",
      "state": "UT",
      "zip": "84421",
      "origin": "EXT",
      "locationId": "23",
      "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
      "createUser": "test@test.com",
      "updateUser": "test@test.com",
      "createDate": "2018-05-01 16:29:09",
      "updateDate": "2018-08-17 10:31:00",
      "requestPaymentData": false,
      "sendAuthorizationRequest": false,
      "pendingAmount": 28000.00,
      "nextPaymentAmount": 1000.00,
      "collectedAmount": 16080.00,
      "unsuccessfulAmount": 1005.00,
      "totalExpectedAmount": 45085.00,
      "nextPaymentDate": "2020-01-18",
      "pendingCount": 28,
      "collectedCount": 23,
      "unsuccessfulCount": 2,
      "totalExpectedCount": 53,
      "initialPaymentAmount": 0,
      "adjustmentAmount": 0,
      "billingLastFour": "1111"
    }
  ]
}

POST to retrieve a list of Schedule objects filtered on a SearchParameters object passed in.

SearchParameters

Attribute Description
createStartDate
DateTime19
Filters the records by looking for schedules with a createDate newer than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601
createEndDate
DateTime19
Filters the records by looking for schedules with a createDate older than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601
updateStartDate
DateTime19
Filters the records by looking for schedules with a updateDate newer than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601
updateEndDate
DateTime19
Filters the records by looking for schedules with a updateDate older than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601
paymentDateStart
DateTime19
Filters the records by looking for schedules with a SchedulePayment paymentDate newer than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601

NOTE: Using this search option, the matching Schedule payments will be provided and the Schedule summary calculated fields (pendingAmount, pendingCount, etc) will be based on the matching payments
paymentDateEnd
DateTime19
Filters the records by looking for schedules with a SchedulePayment paymentDate older than or equal to the date provided. Formatted “yyyy-MM-dd HH:mm:ss”.
Format: URL Encoded ISO-8601

NOTE: Using this search option, the matching Schedule payments will be provided and the Schedule summary calculated fields (pendingAmount, pendingCount, etc) will be based on the matching payments
firstName
Alphanumeric45
Filters the records by the first name on the schedule.
lastName
Alphanumeric45
Filters the records by the last name on the schedule.
accountNumber
45
Alphanumeric
Filters the records by the account number on the schedule.
paymentType
AlphanumericN/A
Filters the records by the payment type on the schedule. If empty then both values will be used.
Valid value(s):
CARD
CHECK
PAYPAL
origin
ListN/A
Filter the records by a list of origins. You can pass in an alphanumeric list of Origin values.
createUser
Alphanumeric75
Deprecated
This field has been deprecated in favor of using createUserList
createUserList
ListN/A
Filters the records by a list of alphanumeric users who created the record. Users cannot be longer than 75 characters.
updateUser
Alphanumeric75
Deprecated
This field has been deprecated in favor of using updateUserList.
updateUserList
ListN/A
Filters the records by a list of alphanumeric users who have updated the record. Users cannot be longer than 75 characters.
billingLastFour
Alphanumeric4
Filters the records by the last four of the card number or bank account number.
status
ListN/A
Filters the records by the current status of the Schedule. You can pass in a list of values.
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature request requesting payment data to be entered.
accountDirectiveList
ListN/A
Filters the records by a list of their associated account directives.
locationIdList
ListN/A
Filters the records by a list of numeric locationIds.
To search for schedules that do not have a locationId assigned, include 0 as one of the locationId’s to search for.
paymentStatusList
ListN/A
Filters the records by looking for schedules with a matching SchedulePayment status.
Valid value(s):
PENDING, WAITING, PULLED, ACKNOWLEDGED, REJECTED, SUBMITTED, VOID, PAID, FUNDED, NSF, RETURNED, NSF_DEDUCTION, DECLINED, CORRECTION, ERROR, RETRY, CANCELLED, SKIPPED

NOTE: Using this search option, the matching Schedule payments will be provided and the Schedule summary calculated fields (pendingAmount, pendingCount, etc) will be based on the matching payments
roundTripMapSearch
ListN/A
Filters the records by a list of SearchRoundTripMap objects. Those key/value pairs combined as a single object will perform an AND search for Schedules matching all those of the single object. A separate object of key/value pairs will perform an OR search for Schedules matching any pairs between the separate objects in the list.
see search example
recordStart
Numeric20
The record count to start on.
Default: 0
recordCount
Numeric4
How many records to return.
Default: 2000
Maximum: 5000

SearchRoundTripMap

Attribute Description
YOUR_KEY_NAME
Alphanumeric75
Required
The round trip name to filter by.
YOUR_VALUES
Alphanumeric ListN/A
Required
A list of values for the round trip name to filter by.
If the list contains a value of -1, the results will also be filtered to include schedules that do not contain a RoundTripMap with the specified name
Constraint(s): Each value must not exceed 75 characters

Example roundTripMapSearch

WHERE
((“Key 1” == “Key 1 Value 1” OR “Key 1” == “Key 1 Value 2”) AND (“Key 2” == “Key 2 Value 1” OR “Key 2” does not exist))
OR (“Key 3” == “Key 3 Value1”)
json [ { "Key 1": ["Key 1 Value 1", "Key 1 Value 2"], "Key 2": ["Key 2 Value 1", "-1"] }, { "Key 3" : ["Key 3 Value 1"] } ]

–Schedule Retrieval (Individual)

GET :
Test endpoint: [https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}]](https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId})
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}


Sample Response:

{
  "id": 23,
  "companyId": 1234,
  "accountNumber": "456465",
  "status": "COMPLETED",
  "paymentMethod": "CHECK",
  "firstName": "Cashier",
  "lastName": "test",
  "settingId": 2,
  "memo": "Cashier test",
  "addressOne": "3242 Street",
  "city": "myCity",
  "state": "UT",
  "zip": "12345",
  "origin": "EXT",
  "locationId": "2",
  "recurrenceRule": "FREQ=MONTHLY;INTERVAL=1;",
  "createUser": "test@test.com",
  "updateUser": "tester@test.com",
  "createDate": "2018-04-03 15:48:07",
  "updateDate": "2018-08-30 10:44:37",
  "requestPaymentData": false,
  "sendAuthorizationRequest": false,
  "pendingAmount": 0.00,
  "nextPaymentAmount": 0.00,
  "collectedAmount": 100.00,
  "unsuccessfulAmount": 400.00,
  "totalExpectedAmount": 580.00,
  "pendingCount": 0,
  "collectedCount": 4,
  "unsuccessfulCount": 1,
  "totalExpectedCount": 5,
  "initialPaymentAmount": 0,
  "adjustmentAmount": 0,
  "billingLastFour": "1212"
}

Retrieve an individual Schedule object based on the id passed in the URL. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/23

–Schedule Deletion

DELETE :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{id}

Delete an individual schedule by scheduleId. A schedule cannot be deleted if has payments that have been attempted, whether successfully or failed. A schedule that cannot be deleted should be set to INACTIVE with a PATCH request. This request will return no response body, rather just a standard HTTP status code 200 for successful deletion. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/4

–Schedule Render

POST :
Test endpoint: [https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render]](https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render)
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/render


Sample Response:

{
  "scheduleId": 17381,
  "includeSignatureImage": false,
  "scheduleHtml": "<!DOCTYPE html><html lang='en' xmlns='http://www.w3.org/1999/xhtml'><head>  <meta charset='utf-8'>  <meta name='viewport' content='width=device-width'>  <meta http-equiv='X-UA-Compatible' content='IE=edge'>  <meta name='x-apple-disable-message-reformatting'>  <title>Schedule Information</title>  <!-- Web Font / @font-face : BEGIN -->  <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->  <!--[if mso]>    <style>      * {        font-family: sans-serif !important;      }    </style>  <![endif]-->  <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. -->  <!--[if !mso]><!-->  <link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>  <!--<![endif]-->  <!-- Web Font / @font-face : END -->  <!-- CSS Reset : BEGIN -->  <style>    /* What it does: Remove spaces around the email design added by some email clients. */    /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */    html,    body {      margin: 0 auto !important;      padding: 0 !important;      height: 100% !important;      width: 100% !important;    }    /* What it does: Stops email clients resizing small text. */    * {      -ms-text-size-adjust: 100%;      -webkit-text-size-adjust: 100%;    }    .value { text-align: right; }    .title { text-align: left; }    /* What it does: Centers email on Android 4.4 */    div[style*='margin: 16px 0'] {      margin: 0 !important;    }    /* What it does: Stops Outlook from adding extra spacing to tables. */    table,    td {      mso-table-lspace: 0pt !important;      mso-table-rspace: 0pt !important;    }    /* What it does: Fixes webkit padding issue. */    table {      border-spacing: 0 !important;      border-collapse: collapse !important;      table-layout: fixed !important;      margin: 0 auto !important;    }    /* What it does: Uses a better rendering method when resizing images in IE. */    img {      -ms-interpolation-mode:bicubic;    }    /* What it does: Prevents Windows 10 Mail from underlining links despite inline CSS. Styles for underlined links should be inline. */    a {      text-decoration: none;    }    /* What it does: A work-around for email clients meddling in triggered links. */    *[x-apple-data-detectors],  /* iOS */    .unstyle-auto-detected-links *,    .aBn {      border-bottom: 0 !important;      cursor: default !important;      color: inherit !important;      text-decoration: none !important;      font-size: inherit !important;      font-family: inherit !important;      font-weight: inherit !important;      line-height: inherit !important;    }    a[href^=tel]{      color:#555;      text-decoration:none;    }    #footer a[href^=tel]{      color:#fef;      text-decoration:none;    }    /* What it does: Prevents Gmail from displaying a download button on large, non-linked images. */    .a6S {      display: none !important;      opacity: 0.01 !important;    }    /* What it does: Prevents Gmail from changing the text color in conversation threads. */    .im {      color: inherit !important;    }    /* If the above doesn't work, add a .g-img class to any image in question. */    img.g-img + div {      display: none !important;    }    /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89  */    /* Create one of these media queries for each additional viewport size you'd like to fix */    /* iPhone 4, 4S, 5, 5S, 5C, and 5SE */    @media only screen and (min-device-width: 320px) and (max-device-width: 374px) and (-webkit-min-device-pixel-ratio: 3) {      u ~ div .email-container {        min-width: 320px !important;      }    }    /* iPhone 6, 6S, 7, 8, and X */    @media only screen and (min-device-width: 375px) and (max-device-width: 413px) and (-webkit-min-device-pixel-ratio: 2) {      u ~ div .email-container {        min-width: 375px !important;      }    }    /* iPhone 6+, 7+, and 8+ */    @media only screen and (min-device-width: 414px) and (-webkit-min-device-pixel-ratio: 3) {      u ~ div .email-container {        min-width: 414px !important;      }    }    /* iPhone X */    @media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) {      u ~ div .email-container {        min-width: 414px !important;      }    }  </style>  <!-- What it does: Makes background images in 72ppi Outlook render at correct size. -->  <!--[if gte mso 9]>  <xml>    <o:OfficeDocumentSettings>      <o:AllowPNG/>      <o:PixelsPerInch>96</o:PixelsPerInch>    </o:OfficeDocumentSettings>  </xml>  <![endif]-->  <!-- CSS Reset : END -->  <!-- Progressive Enhancements : BEGIN -->  <style>    /* Media Queries */    @media screen and (min-width:380px) {    }    @media screen and (min-width:420px) {    }    @media screen and (min-width:460px) {      #scheduleInformation td, #paymentInformation td {        display:table-cell !important;      }      #scheduleInformation td.title, #paymentInformation td.title {        padding:0 5% 0 0 !important;        width:50% !important;      }      #scheduleInformation td.value, #paymentInformation td.value {        padding:0 0 0 5% !important;        text-align:right !important;        width:auto !important;      }      #scheduleInformation td.value h2, #paymentInformation td.value h2 {        font-weight:bold !important;      }    }    @media screen and (min-width:600px) {      #accountInformation table td table td {        display:table-cell !important;      }      #accountInformation table td table td.payee {        padding:0 5% 0 0 !important;        width:60% !important;      }      #accountInformation table td table td.account {        padding:0 0 0 5% !important;        text-align:right !important;        width:auto !important;      }      #accountInformation table td table td h2 {        margin:0 0 10px 0 !important;      }    }  </style>  <!-- Progressive Enhancements : END --></head><body width='100%' style='background-color:#fefefe; margin:0; padding:0 !important; width:100%; mso-line-height-rule:exactly;'><center style='background-color:#fefefe; width:100%;'>    <!--[if mso | IE]>    <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='100%' style='background-color:#fefefe;'>    <tr>    <td>    <![endif]-->      <div style='max-width:720px; margin:0 auto;' class='email-container'>        <!--[if mso]>        <table align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='720'>        <tr>        <td>        <![endif]-->        <!-- Email Body : BEGIN -->        <table align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style='margin:auto;'>          <tbody>            <!-- Header Bar : BEGIN -->            <tr>              <td id='header' style='background:#56565A; font-family:Lato,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif; padding:40px; text-align:center;'>              </td>            </tr>            <!-- Header Bar : END -->            <!-- Clear Spacer 40 : BEGIN -->            <tr>              <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                &nbsp;              </td>            </tr>            <!-- Clear Spacer 40 : END -->            <!-- Main Content : BEGIN -->            <tr>              <td id='content' style='color:#56565a; font-family:Lato,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; padding:0 40px;'>                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                  <tbody>                    <!-- Account Information : BEGIN -->                    <tr>                      <td id='accountInformation'>                        <h1 style='text-align:left; margin:0; font-size:24px; line-height:32px; font-weight:normal;'>Account Information</h1>                        <hr style='margin:20px 0;'>                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                            <tr>                              <td style='padding:0 20px;'>                                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                  <tbody>                                    <tr>                                      <td class='payee' style='text-align:left; padding:0 0 20px 0; vertical-align:top; width:100%;'>                                        <h2 style='font-size:20px; font-weight:bold; line-height:30px; margin:0;'>Test McTester</h2>                                        <div>                                          <span style='display:none'></span> <span style='display:display:none;'></span>                                        </div>                                        <div>                                          <span style='display:none;'></span>                                        </div>                                        <div>                                          <span style='display:none'></span>                                        </div>                                      </td>                                      <td class='account' style='text-align:right; padding:0; vertical-align:top; width:100%;'>                                        <h2 style='font-size:20px; font-weight:bold; line-height:30px; margin:0;'>Account Number</h2>                                        <div>                                          123455                                        </div>                                      </td>                                    </tr>                                  </tbody>                                </table>                              </td>                            </tr>                          </tbody>                        </table>                      </td>                    </tr>                    <!-- Account Information : END -->                    <!-- Clear Spacer 40 : BEGIN -->                    <tr>                      <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                        &nbsp;                      </td>                    </tr>                    <!-- Clear Spacer 40 : END -->                    <!-- Schedule Information : BEGIN -->                    <tr>                      <td id='scheduleInformation'>                        <h1 style='text-align:left; margin:0; font-size:24px; line-height:32px; font-weight:normal;'>Schedule Information</h1>                        <hr style='margin:20px 0;'>                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                            <tr>                              <td style='padding:0 20px;'>                                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                  <tbody>                                    <tr>                                      <td style='padding:0 5% 0 0; text-align:left; vertical-align:top;'>                                        Amount Owed                                      </td>                                      <td style='padding:0 0 0 5%; text-align:right; vertical-align:top;'>                                        $1,000.00                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : BEGIN -->                                    <tr>                                      <td class='spacerTwenty' colspan='2' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                        &nbsp;                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : END -->                                    <tr>                                      <td style='padding:0 5% 0 0; text-align:left; vertical-align:top;'>                                        Amount Paid                                      </td>                                      <td style='padding:0 0 0 5%; text-align:right; vertical-align:top;'>                                        $0.00                                      </td>                                    </tr>                                    <tr>                                      <td colspan='2' style=''>                                        <hr style='margin:20px 0;'>                                      </td>                                    </tr>                                    <tr>                                      <td style='padding:0 5% 0 0; text-align:left; vertical-align:top;'>                                        <h2 style='font-size:20px; font-weight:bold; line-height:30px; margin:0;'>Amount Remaining</h2>                                      </td>                                      <td style='padding:0 0 0 5%; text-align:right; vertical-align:top;'>                                        <h2 style='font-size:20px; font-weight:bold; line-height:30px; margin:0;'>$1,000.00</h2>                                      </td>                                    </tr>                                  </tbody>                                </table>                              </td>                            </tr>                            <!-- Clear Spacer 40 : BEGIN -->                            <tr>                              <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                                &nbsp;                              </td>                            </tr>                            <!-- Clear Spacer 40 : END -->                            <tr>                              <td style='padding:0 20px;'>                                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                  <tbody>                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                          <tr>                                            <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                              Schedule Status                                            </td>                                            <td class='value' style='padding:0; text-align:right; vertical-align:top; width:100%;'>                                              Active                                            </td>                                          </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : BEGIN -->                                    <tr>                                      <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                        &nbsp;                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : END -->                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                          <tr>                                            <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                              Next Payment                                            </td>                                            <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                              $100.00 on 01/24/2020                                            </td>                                          </tr>                                          <!-- Clear Spacer 20 : BEGIN -->                                          <tr>                                            <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                              &nbsp;                                            </td>                                            <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                              &nbsp;                                            </td>                                          </tr>                                          <!-- Clear Spacer 20 : END -->                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                          <tr>                                            <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                              Schedule Frequency                                            </td>                                            <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                              Once per month                                            </td>                                          </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : BEGIN -->                                    <tr>                                      <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                        &nbsp;                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : END -->                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                          <tr>                                            <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                              Remaining Payments                                            </td>                                            <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                              10                                            </td>                                          </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <tr style='display:none'>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                          <!-- Clear Spacer 20 : BEGIN -->                                          <tr>                                            <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                              &nbsp;                                            </td>                                          </tr>                                          <!-- Clear Spacer 20 : END -->                                          <tr>                                            <td>                                              <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                                <tbody>                                                  <tr>                                                    <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                                      Memo                                                    </td>                                                    <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                                      <p style='line-height:20px; margin:0;'></p>                                                    </td>                                                  </tr>                                                </tbody>                                              </table>                                            </td>                                          </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                  </tbody>                                </table>                              </td>                            </tr>                          </tbody>                        </table>                      </td>                    </tr>                    <!-- Schedule Information : END -->                    <!-- Clear Spacer 40 : BEGIN -->                    <tr>                      <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                        &nbsp;                      </td>                    </tr>                    <!-- Clear Spacer 40 : END -->                    <!-- Payment Information : BEGIN -->                    <tr>                      <td id='paymentInformation'>                        <h1 style='text-align:left; margin:0; font-size:24px; line-height:32px; font-weight:normal;'>Payment Information</h1>                        <hr style='margin:20px 0;'>                        <!-- Card Payment : Begin -->                        <table id='cardPayment' style='display:none' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                            <tr>                              <td style='padding:0 20px;'>                                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                  <tbody>                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                            <tr>                                              <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                                Card Number                                              </td>                                              <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                                ************                                              </td>                                            </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                  </tbody>                                </table>                              </td>                            </tr>                          </tbody>                        </table>                        <!-- Card Payment : END -->                        <!-- Check Payment : BEGIN -->                        <table id='checkPayment' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                            <tr>                              <td style='padding:0 20px;'>                                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                  <tbody>                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                            <tr>                                              <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                                Bank Account Number                                              </td>                                              <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                                ******4321                                              </td>                                            </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : BEGIN -->                                    <tr>                                      <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                        &nbsp;                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : END -->                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                            <tr>                                              <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                                Bank Routing Number                                              </td>                                              <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                                123456789                                              </td>                                            </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : BEGIN -->                                    <tr>                                      <td class='spacerTwenty' aria-hidden='true' height='20' style='font-size:0px; line-height:0px;'>                                        &nbsp;                                      </td>                                    </tr>                                    <!-- Clear Spacer 20 : END -->                                    <tr>                                      <td>                                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                          <tbody>                                            <tr>                                              <td class='title' style='font-weight:bold; padding:0; vertical-align:top; width:100%;'>                                                Bank Account Type                                              </td>                                              <td class='value' style='padding:0; vertical-align:top; width:100%;'>                                                Checking                                              </td>                                            </tr>                                          </tbody>                                        </table>                                      </td>                                    </tr>                                  </tbody>                                </table>                              </td>                            </tr>                          </tbody>                        </table>                        <!-- Check Payment : END -->                      </td>                    </tr>                    <!-- Payment Information : END -->                    <!-- Clear Spacer 40 : BEGIN -->                    <tr>                      <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                        &nbsp;                      </td>                    </tr>                    <!-- Clear Spacer 40 : END -->                    <!-- Payment Schedule : BEGIN -->                    <tr>                      <td id='paymentSchedule'>                        <h1 style='text-align:left; margin:0; font-size:24px; line-height:32px; font-weight:normal;'>Payment Schedule</h1>                        <hr style='margin:20px 0;'>                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                            <tr>                              <td style='padding:0 20px;'>                                <div style='border:1px solid #cacaca; overflow-x:auto; width:100%;'>                                  <table style='table-layout:initial !important;' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                    <thead>                                      <tr style='background:#cacaca;'>                                        <th style='padding:10px 10px 10px 20px; text-align:left;'>                                          Date                                        </th>                                        <th style='padding:10px 20px; text-align:right;'>                                          Amount                                        </th>                                        <th style='padding:10px 20px 10px 10px; text-align:left;'>                                          Status                                        </th>                                      </tr>                                    </thead>                                    <tbody>                                      <tr class='oddRow' style='background:#fefefe;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    01/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='evenRow' style='background:#f1f1f1;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    02/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='oddRow' style='background:#fefefe;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    03/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='evenRow' style='background:#f1f1f1;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    04/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='oddRow' style='background:#fefefe;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    05/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='evenRow' style='background:#f1f1f1;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    06/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='oddRow' style='background:#fefefe;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    07/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='evenRow' style='background:#f1f1f1;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    08/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='oddRow' style='background:#fefefe;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    09/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr><tr class='evenRow' style='background:#f1f1f1;'>  <td style='padding:10px 10px 10px 20px; text-align:left; vertical-align:top;'>    10/24/2020  </td>  <td style='padding:10px 20px; text-align:right; vertical-align:top;'>    $100.00  </td>  <td style='padding:10px 20px 10px 10px; text-align:left; vertical-align:top;'>    Pending  </td></tr>                                    </tbody>                                  </table>                                </div>                              </td>                            </tr>                          </tbody>                        </table>                      </td>                    </tr>                    <!-- Payment Schedule : END -->                    <!-- Clear Spacer 40 : BEGIN -->                    <tr>                      <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                        &nbsp;                      </td>                    </tr>                    <!-- Clear Spacer 40 : END -->                    <!-- Signature Image : BEGIN -->                    <tr style='display:none'>                      <td id='signatureConfirmation'>                        <h1 style='margin:0; font-size:24px; line-height:32px; font-weight:normal;'>Signature                          Confirmation</h1>                        <hr style='margin:20px 0;'>                        <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                          <tbody>                          <tr>                            <td style='padding:0 20px;'>                              <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                                <tbody>                                <tr>                                  <td style='text-align:center; vertical-align:top; width:100%;'>                                    <div id='signatureConfirmationContainer'                                         style='border:1px solid #cacaca; box-sizing:border-box; padding:2%; position:relative; width:100%;'>                                      <div id='signatureConfirmationImage'                                           style='margin:0 auto; position:relative; max-width:535px; width:100%; z-index:4;'>                                        <img src='data:image/png;base64,'                                             alt='Signature Confirmation' style='max-width:100%;'>                                      </div>                                      <div id='signatureConfirmationLine'                                           style='background:#cacaca; height:2px; position:absolute; top:70%; width:96%; z-index:1;'></div>                                      <div class='signatureConfirmationX'                                           style='background:#cacaca; height:30%; left:6%; position:absolute; top:35%; transform:rotate(34deg); -webkit-transform-style: preserve-3d; -webkit-transform: rotateZ(34deg); width:1%; z-index:2;'></div>                                      <div class='signatureConfirmationX'                                           style='background:#cacaca; height:30%; left:6%; position:absolute; top:35%; transform:rotate(-34deg); -webkit-transform-style: preserve-3d; -webkit-transform: rotateZ(-34deg); width:1%; z-index:2;'></div>                                    </div>                                  </td>                                </tr>                                </tbody>                              </table>                            </td>                          </tr>                          <!-- Clear Spacer 40 : BEGIN -->                          <tr>                            <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                              &nbsp;                            </td>                          </tr>                          <!-- Clear Spacer 40 : END -->                          </tbody>                        </table>                      </td>                    </tr>                    <!-- Signature Image : END -->                  </tbody>                </table>              </td>            </tr>            <!-- Main Content : END -->            <!-- Custom Text : BEGIN -->            <tr>              <td id='customText'>                <hr style='margin:0 0 40px 0;'>                <table role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%'>                  <tbody>                  <tr>                    <td style='color:#56565a; font-family:Lato,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; padding:0 40px;'>                      <table>                        <tbody>                        <!-- Custom Text : BEGIN -->                        <tr>                          <td style='text-align:center;'>                            After this schedule text                          </td>                        </tr>                        <!-- Custom Text : END -->                        <!-- Clear Spacer 40 : BEGIN -->                        <tr>                          <td class='spacerForty' aria-hidden='true' height='40' style='font-size:0px; line-height:0px;'>                            &nbsp;                          </td>                        </tr>                        <!-- Clear Spacer 40 : END -->                        </tbody>                      </table>                    </td>                  </tr>                  </tbody>                </table>              </td>            </tr>            <!-- Custom Text : END -->            <!-- Footer Bar : BEGIN -->            <tr id='footer'>              <td style='background:#56565a; color:#fefefe; font-family:Lato,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; padding:40px; text-align:center;'>              <h2 style='font-size:20px; font-weight:normal; line-height:30px; margin:0 0 20px 0;'>Demonstration Company</h2>                <div>                  Just an address                 </div>                <div>                  OKLAHOMA CITY, OK 73119                </div>                <div style='display:none'>                  <span style='margin:20px 0 0 0;'>Customer Support : <a style='color:#fefefe;'></a></span>                </div>                <div style='margin:40px 0 0 0;'>                  <small><i>01/13/2020 14:48 PM</i></small>                </div>              </td>            </tr>            <!-- Footer Bar : END -->          </tbody>        </table>        <!-- Email Body : END -->        <!--[if mso]>        </td>        </tr>        </table>        <![endif]-->      </div>    <!--[if mso | IE]>    </td>    </tr>    </table>    <![endif]-->  </center></body></html>"
}

Retrieve an HTML representation of an individual Schedule object based on the id passed in the request. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render

Attribute Description
scheduleId
Numeric10
The id of the schedule for which to generate the render.
emailTo
ListN/A
A list of email addresses to send the HTML render to.
emailCC
ListN/A
A list of email addresses to CC send the HTML render to.
emailBCC
ListN/A
A list of email addresses to BCC send the HTML render to.
scheduleHtml
AlphanumericN/A
The HTML render of the schedule.
includeSignatureImage
BooleanN/A
Whether to include the signature image on the schedule render. A signature image will only be present if sendAuthorizationRequest was originally set to true and the signature request was completed successfully.

Schedule Payments

Use this endpoint to add, edit or remove payments from an existing schedule.
POST to add a new payment.
PUT to overwrite an existing payment by paymentId.
GET to retrieve list of schedule payments.
GET to retrieve single schedule payments by paymentId.
DELETE to delete single schedule payment by paymentId.

See note about Schedule Payment Processing.

Schedule Payment Object

Full Payment Object

Payment Object:

{
  "paymentId": 2,
  "status": "ERROR",
  "paymentAmount": 300.00,
  "paymentDate": "2019-12-08",
  "arrivalId": 4,
  "paymentAttempts": [
    {
      "arrivalId": 4,
      "attemptDate": "2019-12-08T11:01:23.000+0000",
      "status": "ERROR",
      "statusMessage": "Request error: Field can only contain numeric and dash characters. "
    }
  ]
}
Attribute Description
paymentId
Numeric20
Id for the payment record.
scheduleId
Numeric10
Id for the parent schedule object.
status
AlphaN/A
The current status of the payment.
Valid value(s):
PENDING - The payment is waiting to be processed.
WAITING - The ACH payment wil be submitted with the current day’s batch.
PULLED - The ACH payment has been pulled from the account.
ACKNOWLEDGED - The ACH payment has been submitted to the bank and acknowledged by the bank as received.
REJECTED - The payment was rejected.
SUBMITTED - The ACH payment has been submitted to the bank.
VOID - The payment has been voided.
PAID - The payment has processed successfully.
FUNDED - The ACH payment has funded successfully.
NSF - The ACH payment was rejected by the bank due to non-sufficient funds.
RETURNED - The ACH payment was returned.
NSF_DEDUCTION - The ACH payment was deducted due to non-sufficient funds.
DECLINED - The card payment was declined.
CORRECTION - The ACH payment funded successfully but has a corrected bank account or routing number.
ERROR - The payment failed to process.
RETRY - The payment failed to submit for processing, but will be tried again.
CANCELLED - The payment was marked as cancelled and will not be processed.
SKIPPED - No successful attempt to process the payment was made and it is past due. This would happen if a schedule was INACTIVE then later activated.
DEDUCTION - Payment was returned after being funded.
paymentAmount
Numeric11
Payment amount for this payment.
feeAmount
Numeric11
Fee amount for this payment.
totalAmount
Numeric11
Payment + Fee amount for this payment.
paymentDate
Date19
Date the payment is scheduled to post, formatted “yyyy-MM-dd”.
Format: URL Encoded ISO-8601
arrivalId
Numeric11
The arrivalId of the last payment attempt. This will only exist if a payment has been attempted.
transactionId
Numeric20
The transaction id of the last payment. This will only exist if a payment has been processed successfully.
paymentAttempts
List
READONLY
This is a list of attempts to process this payment, and the results of those attempts.
Details
Attribute Description
paymentAttemptId
Numeric20
The id of the payment attempt.
paymentId
Numeric20
The id of the payment the attempt was made for.
arrivalId
Numeric11
The arrival id of the attempted transaction.
transactionId
Numeric20
The transaction id of the payment. This will only be present on a successful transaction.
attemptDate
Date19
The date that the attempt to post this payment was made.
status
AlphaN/A
The status of the payment attempt.
Valid value(s):
PENDING, WAITING, PULLED, ACKNOWLEDGED, REJECTED, SUBMITTED, VOID, PAID, FUNDED, NSF, RETURNED, NSF_DEDUCTION, DECLINED, CORRECTION, ERROR, RETRY, CANCELLED, SKIPPED
statusMessage
Alphanumeric255
Any messages that are a result of the payment attempt.

–Payment Processing

The payments for an ACTIVE schedule will process automatically on their paymentDate. However, it is important to note that when either the processInitialPaymentOnActivation is true OR the recurrenceRule.DTSTART is today and there is a first payment due it will attempt to process immediately when the Schedule is attempting to go ACTIVE. If that attempt is successful, the schedule will go ACTIVE, otherwise the schedule status will be changed to PAYMENT_FAILED.

Here are some example situations:

–Payment Creation

POST :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedulepayments


Sample Response:

{
  "paymentId": 6,
  "status": "PENDING",
  "paymentAmount": 300.00,
  "paymentDate": "2019-12-08"
}

POST to create a new payment on a schedule.

Attribute Description
scheduleId
Numeric10
Id for the parent schedule object.
paymentAmount
Numeric11
Payment amount for this payment.
feeAmount
Numeric11
Fee amount for this payment.
totalAmount
Numeric11
Readonly
Payment + Fee amount for this payment.
paymentDate
Date19
Date the payment is scheduled to post, formatted “yyyy-MM-dd”.
Format: URL Encoded ISO-8601

–Payment Modification

PUT :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{schedulepaymentId}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{schedulepaymentId}


Sample Response:

{
  "paymentId": 6,
  "status": "PENDING",
  "paymentAmount": 300.00,
  "paymentDate": "2019-12-08"
}

PUT requests will completely override the existing specified (by schedulePaymentId payment in the URL) setting. As such, the request object the same as the payment creation.

Payment Modification
Attribute Description
scheduleId
Numeric10
Id for the parent schedule object.
paymentAmount
Numeric11
Payment amount for this payment.
feeAmount
Numeric11
Fee amount for this payment.
totalAmount
Numeric11
Readonly
Payment + Fee amount for this payment.
paymentDate
Date19
Date the payment is scheduled to post, formatted “yyyy-MM-dd”.
Format: URL Encoded ISO-8601

–Payment Retrieval (Individual)

GET :
Test endpoint: [https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{schedulepaymentId}]](https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{schedulepaymentId})
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{schedulepaymentId}


Sample Response:

{
  "paymentId": 2,
  "status": "ERROR",
  "paymentAmount": 300.00,
  "paymentDate": "2019-12-08",
  "arrivalId": 4,
  "paymentAttempts": [
    {
      "arrivalId": 4,
      "attemptDate": "2019-12-08T11:01:23.000+0000",
      "status": "ERROR",
      "statusMessage": "Request error: Field can only contain numeric and dash characters. "
    }
  ]
}

Retrieve an individual Payment object based on the id passed in the URL. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/2

–Payment Deletion

DELETE :
Test endpoint: https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{id}
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/{id}

Delete an individual payment by schedulePaymentId. A payment can only be deleted if it is in PENDING status. This request will return no response body, rather just a standard HTTP status code 200 for successful deletion. https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedulepayments/4

Schedule History

GET to retrieve list of histories for a schedule.

Schedule History Object

Full History Object

History Object:

{
  "date": "2020-01-08 04:01:22",
  "event": "PAYMENT_ATTEMPT",
  "eventId": 7,
  "user": "recurring",
  "data": "Request error: Field can only contain numeric and dash characters. "
}
Attribute Description
event
AlphaN/A
Valid value(s):
CREATE
SCHEDULE_MODIFY
SCHEDULE_STATUS
BILLING_MODIFY
PAYMENT_ATTEMPT
FLOW_RESULT
AUTHORIZATION_REQUEST
BILLING_REQUEST
eventId
Numeric
The id of the related EVENT.
data
Alphanumeric 255
Free form text description of the event.
date
Date19
The date the history was added.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
user
Alphanumeric75
User that added the history.
isNew
Boolean5
Returned with a schedule POST, PUT, or PATCH request to show which history elements were added during that request. Only returned if the value is true.

–History Retrieval (List)

GET :
Test endpoint: [https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}/histories]](https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}/histories)
Live endpoint: https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}/histories


Sample Response:

{
  "scheduleHistoryList": [
    {
      "date": "2019-11-07 12:49:52",
      "event": "CREATE",
      "eventId": 3,
      "user": "test"
    },
    {
      "date": "2019-11-07 12:49:53",
      "event": "AUTHORIZATION_REQUEST",
      "eventId": 4,
      "user": "test",
      "data": "Authorization request HTTP response status: 200 OK"
    },
    {
      "date": "2019-11-07 12:49:52",
      "event": "FLOW_REQUEST",
      "eventId": 5,
      "user": "test"
    },
    {
      "date": "2019-11-07 12:56:08",
      "event": "FLOW_RESULT",
      "user": "signatureUI",
      "data": "FlowId: 5 Updated with status of AUTHORIZED"
    },
    {
      "date": "2019-11-07 12:56:11",
      "event": "FLOW_RESULT",
      "user": "signatureUI",
      "data": "FlowId: 5 Updated with status of COMPLETED"
    },
    {
      "date": "2019-12-08 04:01:23",
      "event": "PAYMENT_ATTEMPT",
      "eventId": 6,
      "user": "recurring",
      "data": "Request error: Field can only contain numeric and dash characters. "
    },
    {
      "date": "2020-01-08 04:01:22",
      "event": "PAYMENT_ATTEMPT",
      "eventId": 7,
      "user": "recurring",
      "data": "Request error: Field can only contain numeric and dash characters. "
    }
  ]
}

Retrieve an list of ScheduleHistory objects for the schedule id passed in the URL. Optional Parameter: eventType - Type of history event to search for
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/2/histories?eventType=

Attribute Description
eventType
AlphaN/A
Valid value(s):
CREATE - The schedule was created.
SCHEDULE_MODIFY - The schedule was modified.
SCHEDULE_STATUS - The schedule status was changed.
BILLING_MODIFY - The billing data on the schedule was modified.
PAYMENT_ATTEMPT - An attempt to process a payment was made.
FLOW_RESULT - The status of an attached flow was changed.
AUTHORIZATION_REQUEST - An authorization request was sent.
BILLING_REQUEST - Billing data was updated from an flow request.

For Reference

These objects are used or returned in the requests and responses above. They are listed here for quick reference.

–Billing Card

Billing Card Object


cardToken
Alphanumeric 16
Required
The credit card token. This must be a token, and not a raw credit card number.
To create a token, see Secure Overlay API and/or TokenizationService.
cardType
Alpha50
Readonly
The type of card used for the schedule.
Possible values: AMERICAN_EXPRESS, DISCOVER, MASTERCARD, VISA, UNKNOWN
expirationMonth
Numeric 2
Conditional
The credit card expiration month.
This value will be retrieved from the cardToken if not provided. Required if expirationYear is provided.
expirationYear
Numeric 2
Conditional
The credit card expiration year.
This value will be retrieved from the cardToken if not provided. Required if expirationMonth is provided.
securityCode
Numeric4
The security code or cvv2 of the credit card to be used for verification or processing the first payment. This field is not returned.
accountDirective
Alphanumeric 10
Required
The account directive that defines which card merchant account to use for processing the schedule payments.

–Billing Check

Billing Check Object


routingNumber
Numeric 9
Conditional
The bank routing number for processing the schedule payments.
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
bankAccountNumber
Alphanumeric 20
Required
A bank Token or a raw bank account number to use for processing the schedule payments.
To create a token, see Secure Overlay API and/or TokenizationService.
NOTE: Providing a raw bank account number is deprecated. When a raw bank account number is provided, the bankAccountNumber, routingNumber, and bankAccountType will be Tokenized and the Token will be returned here as the bankAccountNumber
bankAccountType
Alpha
N/A
Conditional
Valid values:
CHECKING
SAVINGS
Required if a raw bankAccountNumber is provided. Otherwise it is retrieved from a token bankAccountNumber if not provided.
accountDirective
Alphanumeric 10
Required
The account directive that defines which check merchant account to use for processing the schedule payments.

–Billing PayPal

Billing PayPal Object


vaultId
Alphanumeric 16
Required
A reference for the PayPal payment information.
This can be generated by sending true for requestPaymentData which will use FlowService, or use TransactionService
accountDirective
Alphanumeric 10
Required
The account directive that defines which PayPal merchant account to use for processing the schedule payments.

–Custom Receipt Labels

Custom Receipt Labels Object


Attribute Description
PAYMENT
Alphanumeric30
Default value: Payment.
FEE
Alphanumeric30
Default value: Fee.
TOTAL
Alphanumeric30
Default value: Total.
ACCOUNT_NUMBER
Alphanumeric30
Default value: Account Number.
MEMO
Alphanumeric30
Default value: Memo.
CHECK_NUMBER
Alphanumeric30
Default value: Check Number. Only applies to a CHECK paymentMethod.
BANK_ACCOUNT_TYPE
Alphanumeric30
Default value: Bank Account Type. Only applies to a CHECK paymentMethod.
DATE_SCHEDULED
Alphanumeric30
Default value: Date Scheduled.

–Custom Render Labels

Custom Render Labels Object


Attribute Description
ACCOUNT_NUMBER
Alphanumeric30
Default value: Account Number.
AMOUNT_OWED
Alphanumeric30
Default value: Total Owed.
AMOUNT_PAID
Alphanumeric30
Default value: Total Paid.
AMOUNT_REMAINING
Alphanumeric30
Default value: Amount Remaining.
SCHEDULE_STATUS
Alphanumeric30
Default value: Schedule Status.
NEXT_PAYMENT
Alphanumeric30
Default value: Next Payment.
SCHEDULE_INTERVAL
Alphanumeric30
Default value: Schedule Interval.
REMAINING_PAYMENTS
Alphanumeric30
Default value: Remaining Payments.
MEMO
Alphanumeric30
Default value: Memo.
PAYMENT
Alphanumeric30
Default value: Payment.
FEE
Alphanumeric30
Default value: Fee.
TOTAL
Alphanumeric30
Default value: Total.
BANK_ACCOUNT_NUMBER
Alphanumeric30
Default value: Bank Account Number. Only applies to a CHECK paymentMethod.
BANK_ROUTING_NUMBER
Alphanumeric30
Default value: Bank Routing Number. Only applies to a CHECK paymentMethod.
BANK_ACCOUNT_TYPE
Alphanumeric30
Default value: Bank Account Type. Only applies to a CHECK paymentMethod.
CARD_NUMBER
Alphanumeric30
Default value: Card Number. Only applies to a CARD paymentMethod.
CARD_EXPIRATION
Alphanumeric30
Default value: Expiration. Only applies to a CARD paymentMethod.
DATE_SCHEDULED
Alphanumeric30
Default value: Date Scheduled.

–Flow Request

Flow Request Object


Attribute Description
flowId
Numeric 9
The id of the flow request.
status
Alpha N/A
The current status of the Flow request. Valid values:
PENDING - The flow request has been sent and is awaiting completion.
EXPIRED - The flow request has expired and can no longer be completed.
COMPLETED - The flow request was successfully completed.
AUTHORIZED - The flow request has been signed. Any further steps may still be pending.
BILLING_RECEIVE - The billing data requested has been received. Any further steps (such as signing authorization) may still be pending.
CANCELED - The flow request was cancelled by the user.
FAILED - The flow request failed to send.
statusDate
Date19
The date the flow was last updated.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
flowResultList
ListN/A
List of FlowResult objects.
Each step of the flow completed by the end user will generate a new FlowResult for the action the user took. Description: See object definition below.

–Flow Result

Flow Result Object


Attribute Description
id
Numeric20
The id of the flow result.
flowId
Numeric
The id of the flow request that this result belongs to.
status
AlphaN/A
The status of this flow result. Valid values:
PENDING - The flow request has been sent and is awaiting completion.
EXPIRED - The flow request has expired and can no longer be completed.
COMPLETED - The flow request was successfully completed.
AUTHORIZED - The flow request has been signed. Any further steps may still be pending.
BILLING_RECEIVE - The billing data requested has been received. Any further steps (such as signing authorization) may still be pending.
CANCELED - The flow request was cancelled by the user.
FAILED - The flow request failed to send.
statusDate
Date19
The date the flow was updated.
Format: ISO-8601 (YYYY-MM-DD HH:mm:ss)
scheduleId
Date10
The id of the schedule that this flow request belongs to.
username
Date75
The user that updated the flow request. This will likely be signatureUI.

–Recur Setting

Recur Setting Object


Attribute Description
paymentTypes
AlphaN/A
The payment types that will be allowed on a schedule.
Valid value(s):
CARD - Card transaction will be processed
CHECK - Check transaction will be processed
PAYPAL - PayPal transaction will be processed
minimumPaymentAmount
Numeric
The minimum payment allowed on a schedule payment. This value must be between 1 and 10000.
allowedFrequencies
AlphaN/A
The allowed payment frequencies in a list.
Valid value(s):
MONTHLY - once per month
BI_MONTHLY - 2 times per month
BI_WEEKLY - once every 2 weeks
WEEKLY - once per week
DAILY - once per day
checkReminderDays
Numeric
The number of days prior to a check payment to send a reminder. This value must be between 3 and 14.
cardReminderDays
Numeric
The number of days prior to a card payment to send a reminder. This value must be between 3 and 14.
payPalReminderDays
Numeric
The number of days prior to a PayPal payment to send a reminder. This value must be between 3 and 14.

NOTE: Required if paymentTypes includes PAYPAL
recurrenceRule
Alphanumeric255
This is the recurrence rule that you want the schedules using this setting to calculate the payments against. This follows the ICal RRule standard, with the exception that DTSTART will only accept yyyyMMdd format. Any timestamp included as part of DTSTART will be ignored. There is also no need to start a rule with “RRULE=” Example valid rule “FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;”. The DTSTART value cannot be in the past or more than maxDaysToStart days in the future and needs to be formatted “yyyyMMdd”. The INTERVAL has the following valid ranges: MONTHLY 1-12, WEEKLY 1-5, DAILY 1-31.

See note about Schedule Payment Processing.
maxDaysToStart
Numeric3
The number of days in the future that a schedule must start when providing DTSTART in the Schedule recurrenceRule. Defaults to 13 months if not provided.

–Payment Attempt

Payment Attempt


Attribute Description
paymentAttemptId
Numeric20
The id of the payment attempt.
paymentId
Numeric20
The id of the payment the attempt was made for.
arrivalId
Numeric11
The arrival id of the attempted transaction.
transactionId
Numeric20
The transaction id of the payment. This will only be present on a successful transaction.
attemptDate
Date19
The date that the attempt to post this payment was made.
status
AlphaN/A
The status of the payment attempt.
Valid value(s):
PENDING - The payment is waiting to be processed.
WAITING - The ACH payment wil be submitted with the current day’s batch.
PULLED - The ACH payment has been pulled from the account.
ACKNOWLEDGED - The ACH payment has been submitted to the bank and acknowledged by the bank as received.
REJECTED - The payment was rejected.
SUBMITTED - The ACH payment has been submitted to the bank.
VOID - The payment has been voided.
PAID - The payment has processed successfully.
FUNDED - The ACH payment has funded successfully.
NSF - The ACH payment was rejected by the bank due to non-sufficient funds.
RETURNED - The ACH payment was returned.
NSF_DEDUCTION - The ACH payment was deducted due to non-sufficient funds.
DECLINED - The card payment was declined.
CORRECTION - The ACH payment funded successfully but has a corrected bank account or routing number.
ERROR - The payment failed to process.
RETRY - The payment failed to submit for processing, but will be tried again.
CANCELLED - The payment was marked as cancelled and will not be processed.
SKIPPED - No successful attempt to process the payment was made and it is past due. This would happen if a schedule was INACTIVE then later activated.
statusMessage
Alphanumeric255
Any messages that are a result of the payment attempt.

PostBack Schedule Events

Basic information about a Schedule can be sent back to your system for some Schedule events. The information returned can be used to securely GET further details from Schedule Service. The PostBackBody will always come as JSON using an HTTPs POST.

If something goes wrong attempting to postback to your system, we will automatically retry on this schedule:

To be considered successful, we expect your server to return HTTP STATUS 200. Once that is received or after Attempt #5 we will no longer try to post the data.

To enable sending, please log into your app.pdcflow.com account and navigate to CONFIGURE > NOTIFICATIONS. This is where you can configure PostBacks for each Schedule event:

Event Description
SCHEDULE_CREATED A schedule has been created.

PostBackBody

Attribute Description
scheduleId
Numeric10
The PDC Schedule ID, always present. Use this to pull further details on a schedule from Schedule Service.
status
Alpha
Status of the Schedule, always present.
Valid value(s):
DRAFT - Schedules in DRAFT have not yet been saved as ACTIVE.
ACTIVE - Schedules that are actively processing payments.
INACTIVE - Schedules that have been inactivated and are no longer running payments, though PENDING payments may still be present.
COMPLETED - Schedules that have finished processing all payments, be they successful or failed.
AUTHORIZE - Schedules that are pending the completion of a signature request before becoming ACTIVE.
UNAUTHORIZED - Schedules of which the signature request was not completed successfully.
PAYMENT_FAILED - Schedules of which the first due payment failed while trying to Activate the Schedule.
BILLING_DATA - Schedules that are pending the completion of a signature requesting payment data to be entered.

Sample Code

This section offers some client implementation examples in different languages. Keep in mind, these are only minimalistic examples used to demonstrate the Transaction Service REST API and are not meant for production use.
A Jason Web Token (JWT) is required to process all requests through the ScheduleService. You can request a JWT through the AuthenticationService, using your company’s username and password, as shown below.

Result Status Codes

Expected Http Status codes

Status '200':
Description = 'Success.'

Status: '400':
Description = 'Malformed request. The request is either incorrectly formatted, or there are validation errors.'

Status '401':
Description = 'Invalid credentials.'

Status '403':
Description = 'Service not activated.'

Status '404':
Description = 'The requested signature/document/image was not found.'

Status '405':
Description = 'POST, GET, PUT request not supported for resource.'

Status '500':
Description = 'An internal error has occurred.'

Sample Create Setting request

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$scheduleSetting = [
  'name' => 'MySettingName',
  'recurSetting' => "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
  'user' => 'testUser'
];


$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($scheduleSetting, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
    $authorization]
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

    my $scheduleSetting = {
        'name' => 'MySettingName',
        'recurSetting' => "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
        'user' => 'testUser'
    }

    $data = JSON::XS->new->utf8->encode ($scheduleSetting);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    scheduleSetting = {
        'name' => 'MySettingName',
        'recurSetting' => "{\"recurrenceRule\":\"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;\",\"paymentTypes\":[\"CARD\",\"CHECK\"],\"minimumPaymentAmount\":\"25\",\"allowedFrequencies\":[\"MONTHLY\",\"WEEKLY\",\"BI_WEEKLY\",\"BI_MONTHLY\"],\"checkReminderDays\":\"10\",\"cardReminderDays\":\"5\"}",
        'user' => 'testUser'
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/'
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = scheduleSetting.to_json.length
    headers['Authorization'] = 'BASIC jws_from_authenticationservice'
    payload = scheduleSetting.to_json

    c.headers = headers
    c.http_post(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will create a Setting. The settingId that is returned can be used in Schedule creation to use this Setting with that Schedule

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings

Sample Get Settings request

<?php
$settingId = 2;
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/'.$settingId;

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  $authorization
]);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $settingId = 2;
   my $uri = URI->new("https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/".$settingId);

   my $req = HTTP::Request->new( 'GET', $uri );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

   settingId = 2;
   url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/' + settingId

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

This will retrieve a ScheduleSetting, specified by the settingId in the URL.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/2
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/2

Sample Create Recurring Term request

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$recurringTerm = [
  "maximumAmount" => 1000,
  "termMonth"=> 36,
  "user"=> "testUser"
];


$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($recurringTerm, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
    $authorization]
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

    my $recurringTerm = {
        "maximumAmount" => 1000,
        "termMonth"=> 36,
        "user"=> "testUser"
    }

    $data = JSON::XS->new->utf8->encode ($recurringTerm);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    recurringTerm = {
        "maximumAmount" => 1000,
        "termMonth"=> 36,
        "user"=> "testUser"
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms'
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = recurringTerm.to_json.length
    payload = recurringTerm.to_json

    c.headers = headers
    c.http_post(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will create a RecurringTerm. Any schedules created with an owedAmount less than or equal to $1000 will have a max run time of 36 months.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms

Sample Update Recurring Term request

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/6';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$recurringTerm = [
  "maximumAmount" => 1000,
  "termMonth"=> 24,
  "user"=> "testUser"
];


$curl = curl_init();

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
$data = json_encode($recurringTerm, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
    $authorization]
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

    my $recurringTerm = {
        "maximumAmount" => 1000,
        "termMonth"=> 36,
        "user"=> "testUser"
    }

    $data = JSON::XS->new->utf8->encode ($recurringTerm);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/6';

    my $req = HTTP::Request->new( 'PUT', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    recurringTerm = {
        "maximumAmount" => 1000,
        "termMonth"=> 36,
        "user"=> "testUser"
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/6'
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = recurringTerm.to_json.length
    payload = recurringTerm.to_json

    c.headers = headers
    c.http_put(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will update the RecurringTerm with the id 6. Any schedules created with an owedAmount less than or equal to $1000 will now have a max run time of 24 months.

Send an HTTP PUT request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{recurringTermId}
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/{recurringTermId}

Sample Get Recurring Terms request

<?php

$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');


$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  $authorization
]);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
   my $settingId = 2;
   my $uri = URI->new("https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/");

   my $req = HTTP::Request->new( 'GET', $uri );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

   settingId = 2;
   url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/'

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

This will retrieve a list of all your RecurringTerm objects. A recurring term with no maximumAmount defines the maximum run time of schedules that exceed the amount specified by the highest maximumAmount.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/settings/recurringterms/

Sample SchedulePreview request

<?php
    $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews';

    $authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

    $schedulePreview = [
      'owedAmount' => '2000.00',
      'initialPaymentAmount' => '500.00',
      'adjustmentAmount' => '100.00',
      'numberOfPayments' => '0',
      'paymentAmount' => '50.00',
      'settingId' => '16',
      'recurrenceRule' => 'FREQ=WEEKLY;INTERVAL=1;BYMONTHDAY=1;DTSTART=20201116Y000000',
    ];


    $curl = curl_init();

    curl_setopt($curl, CURLOPT_POST, 1);
    $data = json_encode($schedulePreview, JSON_UNESCAPED_SLASHES);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
                'Content-Type: application/json',
                'Content-Length: ' . strlen($data),
                $authorization]
    );
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if($statusCode == '200') {
      echo $result;
    }
    else {
      echo "Error #:" . $statusCode;
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

    my $schedulePreview = {
      'owedAmount' => '2000.00',
      'initialPaymentAmount' => '500.00',
      'adjustmentAmount' => '100.00',
      'numberOfPayments' => '0',
      'paymentAmount' => '50.00',
      'settingId' => '16',
      'recurrenceRule' => 'FREQ=WEEKLY;INTERVAL=1;BYMONTHDAY=1;DTSTART=20201116Y000000',
    }

    $data = JSON::XS->new->utf8->encode ($schedulePreview);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    schedulePreview = {
      'owedAmount' => '2000.00',
      'initialPaymentAmount' => '500.00',
      'adjustmentAmount' => '100.00',
      'numberOfPayments' => '0',
      'paymentAmount' => '50.00',
      'settingId' => '16',
      'recurrenceRule' => 'FREQ=WEEKLY;INTERVAL=1;BYMONTHDAY=1;DTSTART=20201116Y000000',
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews'
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = schedulePreview.to_json.length
    payload = schedulePreview.to_json

    c.headers = headers
    c.http_post(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will create a SchedulePreview. SchedulePayments generated through this method will contain only a paymentAmount, and feeAmount (if applicable) and paymentDate and will not be saved until the schedules endpoint is called with a POST or PUT request.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/previews
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/previews

Sample Schedule Creation request

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$schedule = [
  'firstName'=>'Test',
  'lastName'=>'McTesty',
  'accountNumber'=>'123455',
  'owedAmount'=>'1000',
  'settingId'=>'2',
  'numberOfPayments'=>'',
  'paymentAmount'=>'100',
  'initialPaymentAmount'=>'',
  'adjustmentAmount'=>'',
  'username'=>'testUser',
  'paymentMethod'=>'CHECK',
  'phoneNumber'=>'',
  'status'=>'ACTIVE',
  'emailAddress'=>'test@test.com',
  'memo'=>'',
  'origin'=>'EXT',
  'recurrenceRule'=>'FREQ=MONTHLY;INTERVAL=1;',
  'sendReceiptToEmailAddress'=>'true',
  'sendAuthorizationRequest'=>'true',
  'requestPaymentData'=>'false',
  'authorization'=>[
    'pinDescription'=>'Last 4 of card number',
    'verificationPin'=>'1234',
    'timeoutMinutes'=>'30',
    'eventRecipientList'=>[
        [
            'emailAddress'=>'someone@example.com'
        ]
    ]
  ],
  'billingCheck'=>[
    'routingNumber'=>'123456789',
    'bankAccountNumber'=>'aBankToken123456',
    'accountDirective'=>'1111-1',
    'checkNumber'=>'12'
  ],
  'customReceiptLabels'=>[
    'PAYMENT'=>'Custom payment label',
    'ACCOUNT_NUMBER'=>'Custom account number label',
    'MEMO'=>'Custom memo label',
    'BANK_ACCOUNT_TYPE'=>'Custom account type label'
  ],
  'customRenderLabels'=>[
    'SCHEDULE_STATUS'=>'Custom schedule status label'
  ],
  'roundTripMap'=> [
    'myField1'=>'Custom Value 1',
    'myField2'=>'Custom Value 2'
  ],
  'notificationEvent'=>'SCHEDULE'
];


$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($schedule, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data),
    $authorization]
);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

    my $schedule = {
        'firstName'=>'Test',
        'lastName'=>'McTesty',
        'accountNumber'=>'123455',
        'owedAmount'=>'1000',
        'settingId'=>'2',
        'numberOfPayments'=>'',
        'paymentAmount'=>'100',
        'initialPaymentAmount'=>'',
        'adjustmentAmount'=>'',
        'username'=>'testUser',
        'paymentMethod'=>'CHECK',
        'phoneNumber'=>'',
        'status'=>'ACTIVE',
        'emailAddress'=>'test@test.com',
        'memo'=>'',
        'origin'=>'EXT',
        'recurrenceRule'=>'FREQ=MONTHLY;INTERVAL=1;',
        'sendReceiptToEmailAddress'=>'true',
        'sendAuthorizationRequest'=>'true',
        'requestPaymentData'=>'false',
        'authorization'=>{
            'pinDescription'=>'Last 4 of card number',
            'verificationPin'=>'1234',
            'timeoutMinutes'=>'30',
            'eventRecipientList'=>[
                {
                    'emailAddress'=>'someone@example.com'
                }
            ]
        },
        'billingCheck'=>{
            'routingNumber'=>'123456789',
            'bankAccountNumber'=>'aBankToken123456',
            'accountDirective'=>'1111-1',
            'checkNumber'=>'12'
        },
        'customReceiptLabels'=>{
            'PAYMENT'=>'Custom payment label',
            'ACCOUNT_NUMBER'=>'Custom account number label',
            'MEMO'=>'Custom memo label',
            'BANK_ACCOUNT_TYPE'=>'Custom account type label'
        },
        'customRenderLabels'=>{
            'SCHEDULE_STATUS'=>'Custom schedule status label'
        },
         'roundTripMap'=> {
            'myField1'=>'Custom Value 1',
            'myField2'=>'Custom Value 2'
        },
        'notificationEvent'=>'SCHEDULE'
    }

    $data = JSON::XS->new->utf8->encode ($schedule);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules';

    my $req = HTTP::Request->new( 'POST', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    schedule = {
        'firstName'=>'Test',
        'lastName'=>'McTesty',
        'accountNumber'=>'123455',
        'owedAmount'=>'1000',
        'settingId'=>'2',
        'numberOfPayments'=>'',
        'paymentAmount'=>'100',
        'initialPaymentAmount'=>'',
        'adjustmentAmount'=>'',
        'username'=>'testUser',
        'paymentMethod'=>'CHECK',
        'phoneNumber'=>'',
        'status'=>'ACTIVE',
        'emailAddress'=>'test@test.com',
        'memo'=>'',
        'origin'=>'EXT',
        'recurrenceRule'=>'FREQ=MONTHLY;INTERVAL=1;',
        'sendReceiptToEmailAddress'=>'true',
        'sendAuthorizationRequest'=>'true',
        'requestPaymentData'=>'false',
        'authorization'=>{
            'pinDescription'=>'Last 4 of card number',
            'verificationPin'=>'1234',
            'timeoutMinutes'=>'30',
            'eventRecipientList'=>[
                {
                    'emailAddress'=>'someone@example.com'
                }
            ]
        },
        'billingCheck'=>{
            'routingNumber'=>'123456789',
            'bankAccountNumber'=>'aBankToken123456',
            'accountDirective'=>'1111-1',
            'checkNumber'=>'12'
        },
        'customReceiptLabels'=>{
            'PAYMENT'=>'Custom payment label',
            'ACCOUNT_NUMBER'=>'Custom account number label',
            'MEMO'=>'Custom memo label',
            'BANK_ACCOUNT_TYPE'=>'Custom account type label'
        },
        'customRenderLabels'=>{
            'SCHEDULE_STATUS'=>'Custom schedule status label'
        },
         'roundTripMap'=> {
            'myField1'=>'Custom Value 1',
            'myField2'=>'Custom Value 2'
        },
        'notificationEvent'=>'SCHEDULE'
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules'
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = schedule.to_json.length
    payload = schedule.to_json

    c.headers = headers
    c.http_post(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will create a Schedule with 10 CHECK payments of $100. As sendAuthorizationRequest is true, a signature request will be sent to the email “test@test.com” and the schedule will be in AUTHORIZE status until that signature is completed, upon which the schedule will automatically become ACTIVE.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules

Sample Schedule Patch request

<?php
    $scheduleIdToPatch = 2;
    $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/'.$scheduleIdToPatch;

    $authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

    $schedulePatch = [
        'status' => 'ACTIVE',
        'firstName' => 'Test',
        'lastName' => 'Testing',
        'accountNumber' => '123455',
        'origin' => 'EXT',
        'username' => 'user',
        'memo' => '', //This will clear the current value of memo
        'emailAddress' => 'test@test.com',
        'phoneNumber' => '4654654654',
        'addressOne' => '', //This will clear the current value of addressOne
        'addressTwo' => '', //This will clear the current value of addressTwo
        'city' => 'Montezuma',
        'state' => 'MI',
        'zip' => '84404',
        'zipPlusFour' => '4564',
        'country' => 'US',
        'paymentMethod' => 'CARD',
        'billingCard' => [
            'cardToken' => 'aCardToken123456',
            'expirationMonth' => '12',
            'expirationYear' => '24',
            'accountDirective' => '1111'
        ],
        'customReceiptLabels'=>[
            'PAYMENT'=>'Custom payment label',
            'ACCOUNT_NUMBER'=>'Custom account number label',
            'MEMO'=>'Custom memo label',
            'BANK_ACCOUNT_TYPE'=>'Custom account type label'
        ],
        'customRenderLabels'=>[
            'SCHEDULE_STATUS'=>'Custom schedule status label'
        ],
        'roundTripMap'=> [
            'myField1'=>'Custom Value 1',
            'myField2'=>'Custom Value 2'
        ],
        'notificationEvent'=>'SCHEDULE'
    ];


    $curl = curl_init();

    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
    $data = json_encode($schedulePatch, JSON_UNESCAPED_SLASHES);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPHEADER, [
                'Content-Type: application/json',
                'Content-Length: ' . strlen($data),
                $authorization]
    );
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,5);  //num seconds to try connecting
    curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

    $result = curl_exec($curl);

    $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

    // View response
    print_r(json_decode($result, true));

    if($statusCode == '200') {
      echo $result;
    }
    else {
      echo "Error #:" . $statusCode;
    }
    curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {
    my $scheduleIdToPatch = 2;
    my $schedulePatch = {
        'status' => 'ACTIVE',
        'firstName' => 'Test',
        'lastName' => 'Testing',
        'accountNumber' => '123455',
        'origin' => 'EXT',
        'username' => 'user',
        'memo' => '', //This will clear the current value of memo
        'emailAddress' => 'test@test.com',
        'phoneNumber' => '4654654654',
        'addressOne' => '', //This will clear the current value of addressOne
        'addressTwo' => '', //This will clear the current value of addressTwo
        'city' => 'Montezuma',
        'state' => 'MI',
        'zip' => '84404',
        'zipPlusFour' => '4564',
        'country' => 'US',
        'paymentMethod' => 'CARD',
        'billingCard' => {
            'cardToken' => 'aCardToken123456',
            'expirationMonth' => '12',
            'expirationYear' => '24',
            'accountDirective' => '1111'
        },
        'customReceiptLabels'=>{
            'PAYMENT'=>'Custom payment label',
            'ACCOUNT_NUMBER'=>'Custom account number label',
            'MEMO'=>'Custom memo label',
            'BANK_ACCOUNT_TYPE'=>'Custom account type label'
        },
        'customRenderLabels'=>{
            'SCHEDULE_STATUS'=>'Custom schedule status label'
        },
         'roundTripMap'=> {
            'myField1'=>'Custom Value 1',
            'myField2'=>'Custom Value 2'
        },
        'notificationEvent'=>'SCHEDULE'
    }

    $data = JSON::XS->new->utf8->encode ($schedulePatch);
    my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/'.$scheduleIdToPatch;

    my $req = HTTP::Request->new( 'PATCH', $url );
    $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
    $req->content_type('application/json');
    $req->content_length( length($data) );
    $req->content( $data );

    my $lwp = LWP::UserAgent->new;
    $lwp->timeout(30);
    my $response = $lwp->request( $req );

    if ( $response->is_success ) {
        print "Success: " . $response->decoded_content;
    }
    else {
        die $response->status_line . ": " . $response->decoded_content;
    }
};

if ( $@ ) {
  print "Error: $@\n";
}

#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin
    scheduleIdToPatch = 2
    schedulePatch = {
        'status' => 'ACTIVE',
        'firstName' => 'Test',
        'lastName' => 'Testing',
        'accountNumber' => '123455',
        'origin' => 'EXT',
        'username' => 'user',
        'memo' => '', //This will clear the current value of memo
        'emailAddress' => 'test@test.com',
        'phoneNumber' => '4654654654',
        'addressOne' => '', //This will clear the current value of addressOne
        'addressTwo' => '', //This will clear the current value of addressTwo
        'city' => 'Montezuma',
        'state' => 'MI',
        'zip' => '84404',
        'zipPlusFour' => '4564',
        'country' => 'US',
        'paymentMethod' => 'CARD',
        'billingCard' => {
            'cardToken' => 'aCardToken123456',
            'expirationMonth' => '12',
            'expirationYear' => '24',
            'accountDirective' => '1111'
        },
        'customReceiptLabels'=>{
            'PAYMENT'=>'Custom payment label',
            'ACCOUNT_NUMBER'=>'Custom account number label',
            'MEMO'=>'Custom memo label',
            'BANK_ACCOUNT_TYPE'=>'Custom account type label'
        },
        'customRenderLabels'=>{
            'SCHEDULE_STATUS'=>'Custom schedule status label'
        },
         'roundTripMap'=> {
            'myField1'=>'Custom Value 1',
            'myField2'=>'Custom Value 2'
        },
        'notificationEvent'=>'SCHEDULE'
    }

    c = Curl::Easy.new
    c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/' + scheduleIdToPatch
    c.http_auth_types = :basic
    c.username = 'SomeSecretUsername'
    c.password = 'SomeSecretPassword'
    c.connect_timeout = 5
    c.timeout = 30
    c.verbose = true

    headers={}
    headers['Content-Type'] = 'application/json'
    headers['Content-Length'] = schedulePatch.to_json.length
    payload = schedulePatch.to_json

    c.headers = headers
    c.http_post(payload)

    puts JSON.parse c.body_str

    if c.response_code == 200 then
        puts "Success " + c.status
    else
        puts "Error " + c.status
    end
rescue
    puts "Caught: #$!\n"
end

This will update a Schedule. Parameters passed in empty will clear the previous value. If change on a field is undesired, do not pass in that parameter. The Schedule will be returned with the newly updated values.

Send an HTTP PATCH request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/{scheduleId}

Sample Schedule Account Directive Migration

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/migrations/accountdirectives';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$migrationRequest = [
  'oldAccountDirective' => '123-1',
  'newAccountDirective' => '123-2'
];

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  $authorization
]);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_PATCH, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, migrationRequest);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

   my $uri = URI->new("https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/migrations/accountdirectives");

   my $migrationRequest = {
      'oldAccountDirective' => '123-1',
      'newAccountDirective' => '123-2'
   }

   my $req = HTTP::Request->new( 'POST', $uri );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($migrationRequest) );
   $req->content( $migrationRequest );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    migrationRequest = {
      'oldAccountDirective' => '123-1',
      'newAccountDirective' => '123-2'
    }


   url = "https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/migrations/accountdirectives"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   payload = migrationRequest.to_json

   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = payload.length

   c.headers = headers
   c.http_post(payload)

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

Sample Schedule Retrieval

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/search';

$authorization = "Authorization: BASIC " . base64_encode('companyUsername'.':'.'companyPassword');

$searchParameters = [
  'createStartDate' => '2017-01-01 00:00:00',
  'createEndDate' => '2017-01-31 23:59:59',
  'status' => 'ACTIVE',
  'roundTripMapSearch' => [
    [
        "field1" => ["value1","value11"],
        "field2" => ["value2"]
    ],
    [
        "field3" => ["value3"]
    ]
  ]
];

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  $authorization
]);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $searchParameters);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting

eval {

   my $uri = URI->new("https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/search");

   my $searchParameters = {
      'createStartDate' => '2017-01-01 00:00:00',
      'createEndDate' => '2017-01-31 23:59:59',
      'status' => 'ACTIVE',
      'roundTripMapSearch' => [
        {
            "field1" => ["value1","value11"],
            "field2" => ["value2"]
        },
        {
            "field3" => ["value3"]
        }
      ]
   }

   my $req = HTTP::Request->new( 'POST', $uri );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($searchParameters) );
   $req->content( $searchParameters );

   my $lwp = LWP::UserAgent->new;
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print "Success: " . $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'

begin

    searchParameters = {
      'createStartDate' => '2017-01-01 00:00:00',
      'createEndDate' => '2017-01-31 23:59:59',
      'status' => 'ACTIVE',
      'roundTripMapSearch' => [
        {
            "field1" => ["value1","value11"],
            "field2" => ["value2"]
        },
        {
            "field3" => ["value3"]
        }
      ]
    }


   url = "https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/search"

   c = Curl::Easy.new( url )
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true
   c.perform

   payload = searchParameters.to_json

   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = payload.length

   c.headers = headers
   c.http_post(payload)

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

Sample Render Schedule Request

<?php
$url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render';
$scheduleIdToRender = 4;

$render = [
    'scheduleId' => $scheduleIdToRender,
    'includeSignatureImage' => true
];


$curl = curl_init();

curl_setopt($curl, CURLOPT_POST, 1);
$data = json_encode($render, JSON_UNESCAPED_SLASHES);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data)
]);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "someSecretUsername:someSecretPassword");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);  //num seconds to try connecting
curl_setopt($curl, CURLOPT_TIMEOUT, 30); //max number of seconds to allow execution

$result = curl_exec($curl);

$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

// View response
print_r(json_decode($result, true));

if($statusCode == '200') {
  echo $result;
}
else {
  echo "Error #:" . $statusCode;
}
curl_close($curl);
#!/usr/bin/perl

use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use JSON::XS;
use IO::Socket::SSL qw(debug3); # verbose for troubleshooting
use File::Slurp;
use MIME::Base64;

eval {
   my $scheduleToRender = 42;

   my $data = {
      'scheduleId' => $scheduleToRender,
      'includeSignatureImage' => true
   };
   $data = JSON::XS->new->utf8->encode ($data);

   my $url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render';

   my $req = HTTP::Request->new( 'POST', $url );
   $req->authorization_basic( 'SomeSecretUsername', 'SomeSecretPassword' );
   $req->content_type('application/json');
   $req->content_length( length($data) );
   $req->content( $data );

   my $lwp = LWP::UserAgent->new;
   $lwp->timeout(30);
   my $response = $lwp->request( $req );

   if ( $response->is_success ) {
      print $response->decoded_content;
   }
   else {
      die $response->status_line . ": " . $response->decoded_content;
   }
};
if ( $@ ) {
   print "Error: $@\n";
}
#!/usr/bin/ruby

require 'curl'
require 'curb'
require 'json'
require 'base64'

begin
   # read and encode pdf to upload
   scheduleToRender = 55

   data = {
      'scheduleId' => scheduleToRender,
      'includeSignatureImage' => true
   }

   c = Curl::Easy.new
   c.url = 'https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render'
   c.http_auth_types = :basic
   c.username = 'SomeSecretUsername'
   c.password = 'SomeSecretPassword'
   c.connect_timeout = 5
   c.timeout = 30
   c.verbose = true

   headers={}
   headers['Content-Type'] = 'application/json'
   headers['Content-Length'] = data.to_json.length
   payload = data.to_json

   c.headers = headers
   c.http_post(payload)

   puts JSON.parse c.body_str

   if c.response_code == 200 then
      puts "Success " + c.status
   else
      puts "Error " + c.status
   end
rescue
   puts "Caught: #$!\n"
end

This will create an HTML representation of the requested Schedule.

Send an HTTP POST request to:
test url:
https://scheduledemo.pdc4u.com/ScheduleService/api/v1_0/schedules/render
live url:
https://schedule.pdc4u.com/ScheduleService/api/v1_0/schedules/render