Skip to main content
POST

Authorizations

Authorization
string
header
required

OAuth2 client_credentials authorization. Obtain a new access_token when it expires.

Body

application/json

Adds a payment schedule to an activated By agreement DDR with a payment method attached, using that DDR's payment method. If any schedule is Paused, including a Deposit, resume or cancel it first. If an Active non-Deposit schedule exists, wait until it ends or is cancelled before adding another. Nonstandard RRULE expressions require process_type=12, custom_cycle_type and custom_cycle together.

merchant_id
string
required

Business identifier assigned by BillBuddy.

Required string length: 1 - 20
plan_id
string
required

DDR subscription ID.

Required string length: 1 - 50
type
enum<integer>
required

Payment schedule type: 1 after a number of successful payments; 2 at a cumulative amount; 3 until cancelled; 4 on an end date; 6 One-off. Types 5 and 7 are not allowed.

Available options:
1,
2,
3,
4,
6
amount
required

One-off or per-payment amount in major currency units, for example 10.50 means AUD 10.50. At most two decimal places. Numbers and numeric strings are accepted, with a minimum of 0.01 and maximum of 9999999.99; the same range applies to both types.

Required range: 0.01 <= x <= 9999999.99Must be a multiple of 0.01
start_date
string<date>
required

Payment schedule start date in YYYY-MM-DD format. Cannot precede the DDR start date. Past dates are accepted, but the first actual debit must be no earlier than tomorrow in the service business timezone and must comply with the DDR start date and RRULE date rules.

Minimum string length: 1
schedule_name
string | null

Payment schedule name. Defaults to the DDR plan_name when omitted.

Maximum string length: 255
total_amount

Target total amount in major currency units, with at most two decimal places and a minimum of 0.01. Accepts a number or numeric string. Required and non-null when type=2. The number of payments is calculated from the target amount.

Required range: x >= 0.01Must be a multiple of 0.01
day_of_debit
string | null

RFC 5545 RRULE debit rule. Required and non-null for type=1/2/3/4; optional for type=6 (one-off). See the integration guide for frequency syntax.

Maximum string length: 255
process_type
enum<integer> | null

Provide 12 only for a custom frequency. Other frequencies are inferred from the RRULE; omit this field for them.

Available options:
12,
null
custom_cycle_type
enum<integer> | null

Required for process_type=12: 1 days, 2 weeks, 3 months, 4 years. Must correspond to the RRULE FREQ. Non-Custom mode prohibits nonempty custom cycle parameters. Required and non-null when process_type=12.

Available options:
1,
2,
3,
4,
null
custom_cycle
integer | null

Required for process_type=12. A positive integer equal to the RRULE INTERVAL. Minimum 5 for days and 1 for other units. Required and non-null when process_type=12.

Required range: x >= 1
day_of_debit_dtstart
string | null

First debit anchor. Required for quarterly, half-yearly and yearly frequencies. YYYY-MM-DD is recommended; the date must be strictly after the corresponding start_date and within one billing cycle (3/6/12 months, clamped to month end). MM-DD is also accepted if it is a valid month/day; the full-date window restriction does not apply to that format.

Pattern: ^(\d{4}-)?\d{2}-\d{2}$
end_date
string<date> | null

End date, preferably YYYY-MM-DD. Required and non-null when type=4. When supplied, cannot precede start_date in the same segment.

end_terms
integer | null

Number of successful payments, an integer of at least 1. Required and non-null when type=1.

Required range: x >= 1

Response

HTTP 200. Distinguish success, business errors, validation errors and business authentication errors using the response body code.

Success response.

code
enum<integer>
required

0 means the payment schedule was created successfully. Does not indicate a completed charge.

Available options:
0
message
string
required

Response message.

data
object
required

New payment schedule.