PaymentSchedule API
Schedule payments against existing payment agreements
The Payment Schedule API turns an authorised NPP PayTo agreement into a set-and-forget recurring payment. Instead of calling the payment initiation API for every run, you tell us the schedule details once and Azupay initiates payments on the agreement's cadence.
This guide covers the full lifecycle: create a schedule, retrieve it, and pause or resume it. Every endpoint shown extends the existing Azupay REST API and reuses the same SecretKey authentication, error model, and pagination conventions you already know.
What you'll need before you startA Payment Agreement that is in
ACTIVEstate and has been authorised by the payer at their bank.
Endpoints at a glance
| Method | Path | Purpose |
|---|---|---|
POST | /paymentAgreement/{paymentAgreementId}/scheduler | Create a schedule against an existing payment agreement. Amends an existing scheduler. |
GET | /paymentAgreement/{paymentAgreementId}/scheduler | Retrieve a schedule by payment agreement ID. |
To search for payment initiations, refer to our existing paymentInitiation API.
Create a Payment Schedule
Create a schedule by POSTing the agreement ID with the schedule details:
POST https://api.azupay.com.au/v1/paymentAgreement/{paymentAgreementId}/scheduler
Authorization: SECR_MYBUSINESSID_nR2duCGXlqWSuYJF
Content-Type: application/json{
"PaymentScheduler": {
"status": "ACTIVE",
"frequency": "MONTHLY",
"amount": "89.95",
"startDate": "2026-06-01",
"endDate": "2027-06-01",
"timezone": "Australia/Sydney"
}
}Request fields
| Field | Required | Description |
|---|---|---|
status | yes | Status of this schedule. Must be ACTIVE or INACTIVE. |
frequency | yes | Frequency of the scheduled runs (WEEKLY, FORTNIGHTLY, MONTHLY, ANNUAL, etc). |
amount | yes | Run amount in AUD as a string, e.g. "89.95". Must fit inside the agreement's per-payment and per-period caps. |
startDate | yes | First run date, YYYY-MM-DD. Must be strictly after today in the schedule's timezone. |
endDate | no | Last permitted run date, YYYY-MM-DD. Omit for an open-ended schedule. |
timezone | yes | IANA name (e.g. Australia/Sydney, Australia/Perth, UTC). No implicit default. |
What is not on this callNo retry parameters, the scheduler does not retry for hard failures. No
additionalDetailsblock — schedule creation is a back-office action, not a payer-initiated payment. No callback URL on the schedule resource — run outcomes ride on your existing Payment Initiation webhook.
Successful response — 201 Created
201 Created{
"PaymentScheduler": {
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"status": "ACTIVE",
"frequency": "MONTHLY",
"amount": "89.95",
"startDate": "2026-06-01",
"endDate": "2027-06-01",
"timezone": "Australia/Sydney"
},
"PaymentSchedulerStatus": {
"version": 1,
"createdDatetime": "2026-05-18T04:33:12.045Z",
"updatedDatetime": "2026-06-23T02:42:32.753Z"
}
}Common validation errors — 400 Bad Request
400 Bad RequestfailureCode | failureReason |
|---|---|
AZP3.1 | Payment Agreement is not active or does not exist |
AZP3.2 | Start date must be future-dated — at least one day after today in the schedule's timezone. |
AZP3.3 | End date must be equal to or after start date. |
AZP3.4 | Amount exceeds the agreement's per-payment cap. |
AZP3.5 | Frequency mismatch between agreement and schedule |
AZP3.6 | Timezone is not a valid IANA name. |
AZP4.3 | The target status you provide must be one of ACTIVE or INACTIVE |
AZP4.5 | amount is invalid. Must be greater than zero and use a valid decimal format. |
AZP4.6 | frequency is invalid or unsupported. |
AZP4.7 | startDate is invalid, in the past, or before the next amendable schedule date. |
AZP4.8 | endDate must be on or after startDate. |
AZP4.10 | Schedule is outside the permitted payment agreement period or amount limits. |
AZP4.11 | timezone is invalid or unsupported. |
AZP4.14 | Payment agreement was not found. |
One active schedule per agreementOnly one schedule can be created against one agreement. By calling POST against the same payment agreement, it will be amended instead.
How cadence is anchored
The cadence anchor is derived from startDate in combination with the agreement's frequency:
- Weekly — same day-of-week as
startDate, every week. - Fortnightly —
startDate, then every 14 days. - Monthly —
startDate.dayevery month. IfstartDate.dayis 29, 30, or 31, the schedule executes on the last day of every month instead — so February is never silently skipped. - Annually — same month and day as
startDate, every year.Feb 29resolves to the last day of February each year.
No backfill - schedule resumes from next occurrenceIf an execution is missed for any reason, the schedule resumes from its next scheduled occurrence; missed executions are not replayed. Azupay will never initiate two payments for the same scheduled run.
Retrieve a Payment Schedule
GET https://api.azupay.com.au/v1/paymentAgreement/{paymentAgreementId}/scheduler
Authorization: SECR_MYBUSINESSID_nR2duCGXlqWSuYJFReturns the request payload alongside the current state (status, cadence, last run).
Successful response — 200 OK
200 OK{
"PaymentScheduler": {
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"status": "ACTIVE",
"frequency": "MONTHLY",
"amount": "89.95",
"startDate": "2026-06-01",
"endDate": "2027-06-01",
"timezone": "Australia/Sydney"
},
"PaymentSchedulerStatus": {
"version": 2,
"lastRunDatetime": "2026-06-01T04:33:12.045Z",
"createdDatetime": "2026-05-18T04:33:12.045Z"
}
}Amend an existing Payment Schedule
Amending an existing Schedule
To amend an existing schedule, use the original POST /paymentAgreement/{paymentAgreementId}/scheduler
Semantics
- If no schedule exists for the
paymentAgreementId, one will be created. - If a schedule already exists, only the fields you include in the request will be updated — omitted fields retain their current values.
- There is only ever one schedule per payment agreement.
- Changes apply to future scheduled payments only.
- When amending,
versionis required and must match the currentversionreturned by the most recent GET or POST. If the version does not match, the amendment is rejected with409 Conflict— this prevents concurrent calls from silently overwriting each other.
Amendable fields
| Field | Notes |
|---|---|
status | Switch between ACTIVE and INACTIVE. |
amount | New run amount in AUD. Must still fit inside the agreement's caps. |
startDate | Reschedules the cadence anchor. Must be strictly after today in the schedule's timezone and cannot be before the next pending run date. |
endDate | Extend, shorten, or remove (by omitting) the end boundary. |
frequency | Must match the frequency permitted by the payment agreement. |
timezone | Valid IANA timezone name. |
Partial updatesOnly fields present in the request body are applied. To leave a field unchanged, simply omit it. To clear an optional field (e.g.
endDate), send it explicitly asnull.
Example — amending amount and end date
The full payload is required to amend a schedule.
POST https://api.azupay.com.au/v1/paymentAgreement/{paymentAgreementId}/scheduler
Authorization: SECR_MYBUSINESSID_nR2duCGXlqWSuYJF
Content-Type: application/json{
"PaymentScheduler": {
"version": 2,
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"status": "ACTIVE",
"frequency": "MONTHLY",
"amount": "99.95",
"startDate": "2026-06-01",
"endDate": "2029-06-01",
"timezone": "Australia/Sydney"
}
}Successful response — 200 OK
200 OK{
"PaymentScheduler": {
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"status": "ACTIVE",
"frequency": "MONTHLY",
"amount": "99.95",
"startDate": "2026-06-01",
"endDate": "2029-06-01",
"timezone": "Australia/Sydney"
},
"PaymentSchedulerStatus": {
"version": 3,
"lastRunDatetime": "2026-06-01T04:33:12.045Z",
"createdDatetime": "2026-05-18T04:33:12.045Z",
"updatedDatetime": "2026-05-28T01:12:44.901Z"
}
}Example — pausing a schedule
The full payload is required to amend a schedule.
POST https://api.azupay.com.au/v1/paymentAgreement/{paymentAgreementId}/scheduler
Authorization: SECR_MYBUSINESSID_nR2duCGXlqWSuYJF
Content-Type: application/json{
"PaymentScheduler": {
"version": 3,
"status": "INACTIVE",
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"frequency": "MONTHLY",
"amount": "99.95",
"startDate": "2026-06-01",
"endDate": "2029-06-01",
"timezone": "Australia/Sydney"
}
}Successful response — 200 OK
200 OK{
"PaymentScheduler": {
"paymentAgreementId": "B157CA1B-C686-400F-9CB1-79B1CA2BC65B",
"status": "INACTIVE",
"frequency": "MONTHLY",
"amount": "99.95",
"startDate": "2026-06-01",
"endDate": "2029-06-01",
"timezone": "Australia/Sydney"
},
"PaymentSchedulerStatus": {
"version": 4,
"lastRunDatetime": "2026-06-01T04:33:12.045Z",
"createdDatetime": "2026-05-18T04:33:12.045Z",
"updatedDatetime": "2026-05-28T01:12:44.901Z"
}
} Schedule Status & Agreement Status
The Payment Agreement status will be synced with the Payment Schedule status automatically.
Allowed transitions
| From | To | Effect |
|---|---|---|
ACTIVE | INACTIVE | Suspends further runs. The underlying agreement is untouched. |
INACTIVE | ACTIVE | Resumes the schedule from its next scheduled run. Runs missed during the pause are not back-filled. |
Amendment errors
failureCode | When |
|---|---|
AZP4.2 | version is missing or does not match the current schedule version — the schedule has been modified since you last retrieved it. Returned as 409 Conflict. |
AZP4.3 | The target status you provide must be one of ACTIVE or INACTIVE. |
AZP4.5 | amount is invalid. Must be greater than zero and use a valid decimal format. |
AZP4.6 | frequency is invalid or unsupported. |
AZP4.7 | startDate is invalid, in the past, or before the next amendable schedule date. |
AZP4.8 | endDate must be on or after startDate. |
AZP4.9 | Amendment would result in no future scheduled payments. Example: "startDate": "2026-06-01", "endDate": "2026-06-15", "frequency": "MONTHLY" |
AZP4.10 | Schedule is outside the permitted payment agreement period or amount limits. |
AZP4.11 | timezone is invalid or unsupported. |
AZP4.12 | Unauthorised to amend the payment agreement or schedule |
AZP4.13 | Amendment conflicts with a payment initiation that has already been generated. |
AZP4.14 | Payment agreement was not found. |
Schedule lifecycle
The schedule has two states: ACTIVE & INACTIVE
Merchant-driven transitions
Merchants can change the status of the schedule via POST /paymentAgreement/{paymentAgreementId}/scheduler
Agreement-driven transitions (automatic — no API call needed)
The schedule status is only affected when the underlying agreement is cancelled — regardless of how or by whom. Payments are attempted as normal while the agreement is paused or suspended by the payer or bank. When a cancellation is received, the schedule moves to INACTIVE only after the latest payment initiation attempt has completed.
| Trigger | Result |
|---|---|
| Payer cancels the agreement | Schedule → INACTIVE |
| Merchant cancels the agreement via API | Schedule → INACTIVE |
| Agreement expires | Schedule → INACTIVE |
| Bank cancels or revokes the agreement | Schedule → INACTIVE |
Completion
When endDate is reached, the schedule moves to INACTIVE.
You don't get schedule-specific webhooksBy design, the schedule does not emit its own callbacks. Run outcomes flow through the existing Payment Initiation webhook. Agreement-driven status changes flow through the existing Payment Agreement webhook. The schedule resource simply mirrors what those events already tell you.
Webhook behaviour
The schedule does not introduce a new webhook channel. The two existing webhooks carry everything you need:
| Webhook | What it tells you |
|---|---|
PaymentInitiationStatusEvent | One event per run attempt — settlement reference, success or failure code. Same shape as any ad-hoc payment. |
PaymentAgreementStatusEvent | Tells you when the payer or bank cancels the agreement — which in turn sets the schedule to INACTIVE. |
Things to keep in mind
- No automatic retries. The schedule initiates each run once. To chase a failed collection, drive it from your own systems — for example by creating a fresh ad-hoc payment under the same agreement.
- No schedule-specific webhooks. Use the Payment Initiation and Payment Agreement webhooks you already consume.
- Missed runs during a pause are not back-filled. Runs that fall during a paused window are skipped; the schedule picks up at the next scheduled date when resumed.
- End-of-month handling. A monthly schedule starting on the 29th, 30th, or 31st runs on the last day of every month thereafter — by design, so shorter months like February are never silently skipped.
