You are here: Payments > Direct Debits > Direct Debit Payment Schedules APIs > Create Payment Schedule

Create Payment Schedule

The Create Payment Schedule request allows you to create either a Fixed-Length or an Open-Ended schedule. The fixed-length schedule will result in a number of Direct Debit payments being created; an open-ended schedule will generate a single Direct Debit (with additional single payments being added as required, based on the configured frequency of the payments).

REQUEST
API Reference Create Payment Schedule
Usage You can only create a schedule against an Active mandate
Method POST
URI

/schemes/{CS_ID}/mandates/{MANDATE_ID}/paymentschedules

The following are required arguments:

paymentFrequency

The frequency of the payment collections can be set to DAILY, WEEKLY, BIWEEKLY, MONTHLY, YEARLY or CUSTOM

paymentType Set to either FIXED_LENGTH or OPEN_ENDED
startDate The collection date for the first payment in the schedule
paymentAmount The amount of the regula payment amount. Note that it is possible to configure a different payment amount for the first and last payments in a fixed-length schedule (see the API reference for more information on additional optional fields that allow you to configure this)

Other arguments may be required depending on your schedule requirements (for example if you are setting up a FIXED_LENGTH schedule then the numberOfPayments is required). For a list of all required and optional arguments see the Payment Schedule Object in the API reference.

RESPONSE

A successful request will return a 201 Created response code

If you do not see a 201, see the HTTP Response Codes section of the API Reference to assist you to troubleshoot the issue.

The following data is returned:

uri A resolvable path containing the resource identifier of the payment schedule.
id The resource identifier of the new schedule.
scheduleId A unique identifier for the schedule. Use this identifier in the List Direct Debit call to return all Direct Debit payments linked to the schedule.
paymentFrequency As per the requested frequency (DAILY, WEEKLY, etc.)
paymentType FIXED_LENGTH or OPEN_ENDED
startDate The collection date of the first payment in the schedule
numberOfPayments The number of Direct Debits in a Fixed-Length schedule
paymentAmount The payment amount for each collection.
remittanceInformation The remittance to be applied on each Direct Debit in the schedule.

 

If you are creating a monthly schedule on the 10th of the month and you set your Start Date to be the 15th with regular collections happening on the 20th this will result in you having two collections in your first month: on the 15th and on the 20th. To avoid this use the twoPaymentsSamePeriod boolean and set it to false. Only one collection will be made (on the 20th) in the first month of the schedule.