PaymentAgreement API
The Payment Agreement API is used to establish agreements with your customers for reoccuring payments.
Overview
The Payment Agreement API lets you create and manage PayTo agreements directly from your integration. A Payment Agreement records the terms your customer authorises, including how often you may collect payments and any applicable amount limits.
Creating an agreement does not collect funds. After the customer authorises the agreement and its status becomes ACTIVE, use the PaymentInitiation API to collect each eligible payment.
This guide focuses on the direct Payment Agreement API, where your system supplies the customer's PayID or BSB and account number.
If you do not want to capture sensitive bank account information in your own user experience, consider the PaymentAgreementRequest API. It provides an Azupay-hosted interface for the customer and can reduce your development and compliance effort. See Use Azupay's hosted customer experience.
How the direct integration works
sequenceDiagram
participant Merchant as Your system
participant Azupay
participant Customer
participant Bank as Customer's bank
Merchant->>Azupay: Create Payment Agreement
Azupay-->>Merchant: Agreement created with CREATED status
Azupay->>Bank: Register agreement
Bank->>Customer: Present agreement for authorisation
Customer->>Bank: Authorise or reject agreement
Azupay-->>Merchant: Agreement status update
Merchant->>Azupay: Initiate payment after status is ACTIVE
Azupay-->>Merchant: Payment Initiation status update
The direct flow has two separate stages:
- Create and activate the Payment Agreement.
- Create a Payment Initiation for each payment you want to collect under the authorised terms.
The agreement defines what may be collected. It does not schedule or collect payments by itself.
Automate payments with a scheduleAfter a Payment Agreement becomes
ACTIVE, you can use the Payment Schedule API to have Azupay initiate payments according to a schedule. The agreement continues to define the terms and limits authorised by the customer.
Before you begin
You need:
- an Azupay client ID for the environment you are using
- a secret API key with permission to call the Payment Agreement APIs
- the customer's PayID or BSB and account number
- a public HTTPS endpoint that UAT can reach if you want to receive agreement or payment status notifications
- a unique
clientTransactionIdfor the agreement
Environment URLs
| Environment | Base URL |
|---|---|
| UAT | https://api-uat.azupay.com.au/v1 |
| Production | https://api.azupay.com.au/v1 |
Your client ID and API key may differ between UAT and production. Keep secret API keys on your server and do not expose them in browser or mobile application code.
If you plan to receive status webhooks, review Webhooks – Implementation and Security for endpoint and security requirements.
Send your secret API key in the Authorization header:
Authorization: SECR_MYBUSINESSID_myapikeyAPI reference
| API | Description | Method |
|---|---|---|
| Create a Payment Agreement | Creates a Payment Agreement. | POST |
| Search for Payment Agreements | Searches by payment agreement ID, contract ID or creation date. | POST |
| Amend a Payment Agreement | Changes the details or terms of an agreement. | POST |
| Change Status of a Payment Agreement | Suspends, reactivates or cancels an agreement. | POST |
Choose the agreement structure
Use the agreement structure that matches how you intend to charge the customer.
| Agreement structure | Best for | Key amount field |
|---|---|---|
| Fixed | Recurring payments where the amount stays the same | amount |
| Variable | Recurring payments where the amount may change | maximumAmount |
| Usage-based | Payments based on the customer's use of a service | maximumAmount |
| Balloon | Regular payments with a larger payment at the end | amount, lastPaymentDate and lastPaymentAmount where applicable |
Only include one of the following objects in agreementDetails:
-
fixedAgreementDetails -
variableAgreementDetails
usageBasedAgreementDetailsballoonAgreementDetails
The agreement structure and
paymentAgreementTypedescribe different things.The object under
agreementDetailsdefines the billing pattern, such as fixed or variable.paymentAgreementTypedescribes the purpose of the PayTo agreement, such asMORTGAGE,UTILITY,RETAILorOTHER SERVICE.Use the Create a Payment Agreement API reference to select the appropriate purpose code and confirm the exact fields required for your agreement structure.
Supported paymentAgreementType values are:
-
MORTGAGE -
UTILITY -
LOAN -
DEPENDANT SUPPORT -
GAMBLING -
RETAIL
-
SALARY -
PERSONAL -
GOVERNMENT -
PENSION -
TAX -
OTHER SERVICE
Choose the value that describes the underlying purpose of the agreement. If none is an obvious fit, confirm the appropriate value with your Azupay representative rather than selecting one based only on the payment frequency.
Set the agreement limits
The values in agreementDetails define when and how you may collect payments under the agreement. Choose them to match the collection pattern the customer is authorising.
| Field | What it controls |
|---|---|
startDate | The date the agreement begins. It also anchors each frequency period using the Australia/Sydney calendar date. |
endDate or lastPaymentDate | The final date on which the agreement may be used, where applicable to the selected agreement structure. |
frequency | The length of each agreement period. Supported values are INTRADAY, DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL and ADHOC. |
countPerPeriod | The maximum number of Payment Initiations allowed in each frequency period. Enter a string from "1" to "999". For a frequency-based agreement, the limit defaults to one when this field is omitted. |
amount | The regular payment amount for a fixed or balloon agreement. |
firstPaymentAmount | An optional different first payment amount for a fixed agreement. |
maximumAmount | The maximum amount for each Payment Initiation under a variable or usage-based agreement. |
lastPaymentAmount | The final payment amount for a balloon agreement, used with lastPaymentDate. |
Agreement periods are measured from startDate; they are not necessarily calendar weeks or months. For example, a monthly agreement starting on 15 January begins a new period on the 15th of each month. If countPerPeriod is "2", no more than two Payment Initiations that have not failed can be created in each of those periods.
ADHOC agreements do not use recurring periods and are not subject to the countPerPeriod check. Other agreement conditions, including its status, dates and applicable amount limits, still apply.
These settings authorise and limit collections; they do not create payments automatically. Create each payment through the Payment Initiation API or use the Payment Schedule API after the agreement becomes ACTIVE.
Allow for missed collections when choosing the limitsUnused
countPerPeriodcapacity from an earlier agreement period does not carry forward automatically. The standard Payment Initiation flow does not currently support additional catch-up initiations for a missed collection from an earlier period.If catch-up initiations are important to your use case, submit a feature request through the Azupay Service Desk. This helps our team understand the requirement and consider it as part of future product discovery.
Create a fixed monthly Payment Agreement
The following example creates a fixed monthly agreement using a synthetic PayID that produces an ACTIVE agreement in UAT. The test PayID must not be used in production.
The example uses placeholder dates in YYYY-MM-DD format. Replace them with a valid start date and end date before sending the request. Dates are evaluated using the Australia/Sydney calendar date by the Payment Agreement API.
POST https://api.azupay.com.au/v1/paymentAgreement
Authorization: SECR_MYBUSINESSID_myapikey
Content-Type: application/json{
"PaymentAgreement": {
"clientId": "MYBUSINESSID",
"clientTransactionId": "a-unique-client-transaction-id",
"contractId": "a-unique-contract-id",
"payerDetails": {
"name": "Bob",
"payIDDetails": {
"payID": "+61-453123123",
"payIDType": "PHONE"
}
},
"paymentAgreementType": "OTHER SERVICE",
"description": "Monthly subscription",
"agreementDetails": {
"fixedAgreementDetails": {
"startDate": "2027-01-01",
"endDate": "2027-12-31",
"frequency": "MONTHLY",
"amount": "344.33",
"countPerPeriod": "1"
}
},
"paymentAgreementNotification": {
"endpointURL": "https://merchant.example.com/webhooks/azupay/agreements",
"authorizationHeader": "replace-with-a-unique-secret"
}
}
}
Replace the API key, client ID, transaction ID, contract ID, example dates, purpose code, description, amount, endpoint and webhook authorization value before sending the request. The start date must be today or a future date, and the end date must be on or after the start date. In production, also replace the synthetic UAT PayID with the customer's details.
To use BSB and account-number details instead, replace payerDetails with:
{
"payerDetails": {
"name": "Bob",
"bankAccountDetails": {
"bsb": "CUSTOMER_BSB",
"accountNumber": "CUSTOMER_ACCOUNT_NUMBER"
}
}
}Do not include payIDDetails and bankAccountDetails in the same request.
Important request fields
| Field | Required | Description |
|---|---|---|
clientId | Yes | Your Azupay client identifier for the selected environment. |
clientTransactionId | Yes | Your unique identifier for this agreement request. Use the same value only when retrying the same logical request. |
contractId | No | Your identifier for the customer contract. It helps prevent duplicate agreements for the same payer and contract while an agreement is CREATED, ACTIVE or SUSPENDED. |
payerDetails | Yes | The customer who will make payments. Provide either payIDDetails or bankAccountDetails, not both. A payer name is required when using bank-account details. |
paymentAgreementType | Yes | The purpose of the PayTo agreement. This is separate from the fixed, variable, usage-based or balloon structure. |
description | Yes | A description of the agreement that is visible to the customer. |
agreementDetails | Yes | The billing structure and authorised terms. Include exactly one supported agreement-details object. |
countPerPeriod | No | The maximum number of payments within each frequency period. When omitted during creation, the default is 1. |
paymentAgreementNotification | No | The HTTPS endpoint and authorization value used for agreement status notifications. |
additionalDetails | No | Additional audit information. If channelType is BROWSER or MOBILE, both deviceFingerprint and ipAddress are required. |
Idempotency and duplicate prevention
clientTransactionId identifies one logical create request. If your HTTP client does not receive a response and retries the same request, reuse the same value. Azupay returns the existing agreement rather than creating another one.
Use a new clientTransactionId when you intentionally create a new agreement.
contractId provides an additional duplicate check. When supplied, Azupay will not create another agreement for the same payer and contract while the existing agreement is CREATED, ACTIVE or SUSPENDED.
Create response
A successful request returns HTTP 201 with the agreement and its initial status:
{
"PaymentAgreement": {
"payerDetails": {
"name": "Bob",
"payIDDetails": {
"payID": "+61-453123123",
"payIDType": "PHONE"
}
},
"paymentAgreementType": "OTHER SERVICE",
"paymentAgreementNotification": {
"endpointURL": "https://merchant.example.com/webhooks/azupay/agreements",
"authorizationHeader": "****"
},
"clientId": "MYBUSINESSID",
"description": "Monthly subscription",
"clientTransactionId": "a-unique-client-transaction-id",
"contractId": "a-unique-contract-id",
"agreementDetails": {
"fixedAgreementDetails": {
"startDate": "2027-01-01",
"endDate": "2027-12-31",
"frequency": "MONTHLY",
"amount": "344.33",
"countPerPeriod": "1"
}
}
},
"PaymentAgreementStatus": {
"paymentAgreementId": "86ea437729e81567218cd013aa5e3d36",
"createdDatetime": "2026-10-07T02:50:52.876Z",
"status": "CREATED"
}
}Store PaymentAgreementStatus.paymentAgreementId. You need it to search for the agreement, change its status and create Payment Initiations.
CREATED means the request was accepted and registration or customer authorisation is still in progress. Do not initiate a payment until the agreement becomes ACTIVE.
Test the direct flow in UAT
UAT recognises synthetic payer details that produce predictable agreement outcomes. The phone PayID +61-453123123 used in the example above produces an ACTIVE agreement without requiring access to a real banking app.
Use the Payment Agreement test accounts to exercise other outcomes, including agreements that remain CREATED or become CANCELLED, SUSPENDED or FAILED. These values are for UAT only.
The documented BSB test cases cover failure, CREATED, CANCELLED and SUSPENDED outcomes, but do not include an ACTIVE outcome. Use the synthetic phone PayID for the UAT happy path unless Azupay has provided other test-bank details for your integration.
After the agreement becomes ACTIVE, continue with the PaymentInitiation API guide to test collecting a payment.
Wait for customer authorisation
In production, after the agreement is created, the customer must approve it through their bank's mobile app or online banking. The exact labels vary by bank, but the customer generally:
- Opens the PayTo or Payment Agreements area in their bank.
- Selects the pending agreement.
- Reviews the merchant, description, frequency, amount or limit, and agreement dates.
- Approves or rejects the agreement.
Agreement creation and authorisation are asynchronous. Keep the customer informed that payment cannot be collected until their bank has confirmed the agreement. In UAT, the synthetic happy-path PayID completes this transition automatically.
Monitor the agreement until it reaches one of these outcomes:
ACTIVE: the customer authorised the agreement and eligible payments may be initiated.CANCELLED: the agreement was cancelled and cannot be used.FAILED: registration could not be completed.
Do not assume that an HTTP 201 response means the agreement is ready for payment.
Payment Agreement lifecycle
flowchart TB
CREATED[CREATED] -->|Customer approves agreement| ACTIVE[ACTIVE]
CREATED -->|Cancelled before activation| CANCELLED[CANCELLED]
CREATED -->|Registration fails| FAILED[FAILED]
ACTIVE -->|Merchant or payer suspends| SUSPENDED[SUSPENDED]
SUSPENDED -->|Reactivated| ACTIVE
ACTIVE -->|Cancelled| CANCELLED
SUSPENDED -->|Cancelled| CANCELLED
| Status | Meaning | Can you initiate payments? |
|---|---|---|
CREATED | The agreement is waiting for registration or customer authorisation to complete. | No |
ACTIVE | The agreement is active and may be used for eligible payments. | Yes |
SUSPENDED | The agreement is temporarily suspended. It may later return to ACTIVE. | No |
CANCELLED | The agreement has been cancelled permanently. | No |
FAILED | Registration could not be completed. Failure information may be available. | No |
SUSPENDED is the API status for a temporarily paused agreement.
Monitor agreement status
You can receive status webhooks, search for the agreement, or use both approaches.
Receive status webhooks
For a transaction-level callback, include paymentAgreementNotification when creating the agreement. This configures the endpoint and authorization header for that Payment Agreement.
Azupay can also configure a reusable client-level webhook destination. Client-level destination URLs and authorization credentials are managed in your client configuration and cannot be added or changed through the dashboard. Contact Azupay Support if you need this option.
Azupay sends an HTTP POST request when an enabled Payment Agreement status event occurs.
Enable Payment Agreement eventsFor the default transaction-level callback, your dashboard webhook preferences determine which status events Azupay sends. See Configure webhook preferences, then enable:
PaymentAgreement.ACTIVEwhen an agreement is authorised and ready for eligible Payment InitiationsPaymentAgreement.SUSPENDEDwhen an agreement is temporarily suspendedPaymentAgreement.CANCELLEDwhen an agreement is permanently cancelledPaymentAgreement.FAILEDwhen agreement registration failsIf you process amendments, also enable
PaymentAgreementAmendment.PENDING,PaymentAgreementAmendment.COMPLETED,PaymentAgreementAmendment.DECLINED,PaymentAgreementAmendment.RECALLEDandPaymentAgreementAmendment.TIMEDOUT.The initial
CREATEDstatus is returned by the create API. Do not rely on receiving a separatePaymentAgreement.CREATEDwebhook.
The transaction-level configuration uses this request object:
{
"paymentAgreementNotification": {
"endpointURL": "https://merchant.example.com/webhooks/azupay/agreements",
"authorizationHeader": "replace-with-a-unique-secret"
}
}Unless Thin Payload is enabled for your client, the webhook uses the same overall shape as the create response:
{
"PaymentAgreement": {
"clientId": "MYBUSINESSID",
"clientTransactionId": "a-unique-client-transaction-id",
"contractId": "a-unique-contract-id",
"description": "Monthly subscription",
"paymentAgreementType": "OTHER SERVICE",
"payerDetails": {
"name": "Bob",
"payIDDetails": {
"payID": "+61-453123123",
"payIDType": "PHONE"
}
},
"agreementDetails": {
"fixedAgreementDetails": {
"startDate": "2027-01-01",
"endDate": "2027-12-31",
"frequency": "MONTHLY",
"amount": "344.33",
"countPerPeriod": "1"
}
}
},
"PaymentAgreementStatus": {
"paymentAgreementId": "86ea437729e81567218cd013aa5e3d36",
"status": "ACTIVE",
"previousStatus": "CREATED",
"lastStatusBy": "PAYER",
"createdDatetime": "2026-10-07T02:50:52.876Z",
"registrationDatetime": "2026-10-07T02:52:10.000Z"
}
}
Full and thin webhook payloadsWith the full payload, the webhook contains
PaymentAgreementandPaymentAgreementStatus, as shown above.If Thin Payload is enabled in the Azupay dashboard, the webhook contains the agreement ID, its latest and previous statuses, who made the latest status change, and the time the record was updated:
{ "PaymentAgreementStatus": { "paymentAgreementId": "86ea437729e81567218cd013aa5e3d36", "status": "ACTIVE", "previousStatus": "CREATED", "lastStatusBy": "PAYER" }, "lastUpdatedTimestamp": "2026-10-07T02:52:10.000Z" }Use
PaymentAgreementStatus.paymentAgreementIdto correlate a thin notification. Search for the Payment Agreement if you need fields that are not included in the thin payload.
Your webhook endpoint must:
- Validate the HTTP
Authorizationheader. For a transaction-level callback, compare it with the value supplied inpaymentAgreementNotification. For a client-level destination, compare it with the authorization credentials configured by Azupay. - Correlate the notification using
PaymentAgreementStatus.paymentAgreementId. A full payload also includesPaymentAgreement.clientTransactionId. - Process the notification idempotently because the same payload may be delivered more than once. Do not move a stored agreement back to an older status if events arrive out of order. Search for the agreement when you need to confirm its current status.
- Return HTTP
200after the notification has been handled, including when it is a duplicate.
Webhook delivery and securityFor webhook configuration options, authentication, delivery retries, duplicate and out-of-order events, endpoint security and IP allowlisting, see Webhooks – Implementation and Security.
If a notification is delayed or unavailable, search for the Payment Agreement to retrieve its latest status.
Treat Payment Agreement webhook payloads as sensitive data and avoid unnecessary logging or retention of payer account details.
Search for status
If you do not configure an agreement webhook, or you need to reconcile after a missed notification, search using paymentAgreementId:
POST https://api-uat.azupay.com.au/v1/paymentAgreement/search
Authorization: SECR_MYBUSINESSID_myapikey
Content-Type: application/json{
"PaymentAgreementSearch": {
"paymentAgreementId": "86ea437729e81567218cd013aa5e3d36"
}
}The search response returns matching records. Read PaymentAgreementStatus.status to determine whether the agreement can be used.
Status information
An agreement response or status webhook may contain:
| Field | Description |
|---|---|
status | Current Payment Agreement status. |
previousStatus | Status before the most recent change. |
lastStatusBy | Source of the latest change: MERCHANT, PAYER or AZUPAY. |
failureCode | Optional code explaining why an agreement entered FAILED. |
failureReason | Optional human-readable description of a registration failure. |
reasonCode | Optional code explaining a cancellation or suspension. |
reasonDescription | Optional human-readable description of the cancellation or suspension reason. |
Collect payments after activation
An ACTIVE Payment Agreement authorises you to collect eligible payments within its agreed terms. It does not automatically schedule or collect those payments.
Create a separate Payment Initiation each time you want to collect funds. Payment Initiations are asynchronous, and their status is monitored separately from the Payment Agreement.
See the PaymentInitiation API guide for the request format, status lifecycle, notifications, error handling, retries and refunds.
Understand Payment Agreement errors
Errors can occur when the request is submitted or later while the agreement is being registered.
| Outcome | Meaning | Where to find the code |
|---|---|---|
| Request rejected | The submitted request was not accepted. Correct it before trying again. | details.failureCode and details.failureReason in the HTTP error response |
| Agreement failed | The request was accepted and an agreement record was created, but registration did not complete. | PaymentAgreementStatus.failureCode and PaymentAgreementStatus.failureReason when status is FAILED |
| Agreement suspended or cancelled | An existing agreement changed status after creation. | PaymentAgreementStatus.reasonCode and PaymentAgreementStatus.reasonDescription |
Request rejected
Request-level errors are returned immediately, usually with HTTP 400. They do not create a new usable agreement or amendment.
{
"message": "PayID format is incorrect",
"details": {
"failureCode": "AZP5.2",
"failureReason": "PayID format is incorrect"
}
}Use details.failureCode for consistent error handling and details.failureReason to understand what must be corrected.
failureCode | Applies to | Description |
|---|---|---|
AZP2.5 | Create | The Payment Agreement could not be processed. |
AZP5.1 | Create | Both PayID and bank-account details were supplied. Provide only one. |
AZP5.2 | Create | The PayID format is invalid. |
AZP5.3 | Create and amend | Both deviceFingerprint and ipAddress are required when channelType is BROWSER or MOBILE. |
AZP5.4 | Create and amend | ipAddress is required when channelType is BROWSER or MOBILE. |
AZP5.5 | Create and amend | deviceFingerprint is required when channelType is BROWSER or MOBILE. |
AZP5.6 | Create and amend | The agreement details do not contain a supported agreement structure. |
AZP5.7 | Create and amend | More than one agreement structure was supplied. Provide only one. |
AZP5.8 | Create and amend | The request body is invalid. |
AZP5.9 | Amend | A required field is missing after changing the agreement structure. |
AZP5.10 | Create | A DDR migration request contains both a BECS User ID and a PayID. |
AZP5.11 | Create | The BECS User ID is invalid. |
AZP5.12 | Create | Neither PayID nor bank-account details were supplied. Provide one. |
AZP5.13 | Create and amend | The start date must be today or a future date. |
AZP5.14 | Create and amend | The end date must be on or after the start date. |
AZP5.15 | Create and amend | The last payment date must be on or after the start date. |
AZP5.16 | Amend | The end date must be today or a future date. |
AZP5.17 | Amend | The last payment date must be today or a future date. |
General API codes such as ERR0.03 or ERR0.04 may also be returned for request validation or missing resources. Use the accompanying failureReason for the specific cause.
If the API rejected the request before creating an agreement, correct the issue and resend the logical request. If an agreement record was created and you intentionally need a new attempt, use a new clientTransactionId.
Agreement registration failed
Creation is asynchronous. The API may return an agreement with CREATED while registration continues. If registration cannot be completed, the agreement moves to FAILED.
When available, failure details appear in:
PaymentAgreementStatus.failureCodePaymentAgreementStatus.failureReason
failureCode | failureReason |
|---|---|
AZP2.1 | An error occurred with this Payment Agreement. Contact support. |
AZP2.2 | The payer account is not eligible for PayTo payments. |
AZP2.3 | The payer account is not eligible for New Payments Platform payments. |
AZP2.4 | The payee alias details are invalid. |
AZP3.1 | The last payment date must be on or after the start date. |
AZP3.2 | The start date must be today or a future date. |
AZP3.3 | The end date must be on or after the start date. |
AZP4.1 | The request timed out. Try again. |
AZP4.2 | There may be a New Payments Platform outage. Try again later. |
AZP9.9 | A fatal error occurred. Contact support. |
failureCode and failureReason are optional. An agreement may have a FAILED status without these fields.
Agreement cancelled or suspended
When an agreement is cancelled or suspended, use reasonCode with reasonDescription to understand why.
reasonCode | Description |
|---|---|
AC02 | The account to be debited does not exist within the New Payments Platform and cannot be reached using another payment method. This may also be returned when a payer's PayID cannot be resolved. |
AC04 | The account has been closed and the Payment Agreement is no longer valid. |
AC05 | The payer's account number is closed and the Payment Agreement is no longer valid. |
AC13 | The account exists but cannot be debited through the New Payments Platform. |
AG01 | The account exists but is unable to be debited. |
AG03 | An amendment caused the payer and payee account combination to use an unsupported account type. |
AM03 | The account exists but cannot be debited in Australian dollars. |
AM12 | No amount or maximum amount was specified in the Payment Agreement. |
AM14 | The amount exceeds the transaction amount allowed for the account. |
CTAM | The Payment Agreement was suspended because the contract was amended. |
CTCA | The Payment Agreement was suspended because the payer requested cancellation of the contract. |
CTEX | The Payment Agreement was suspended because the contract expired. |
MCFC | The Payment Agreement was suspended after the final collection. |
MCOC | The Payment Agreement was suspended after the one-off collection. |
MD07 | The customer is deceased. |
MD08 | The financial institution no longer supports the mandate service. |
MD09 | The payer or payer account does not support, or no longer supports, the requested mandate service. |
MD16 | The payer requested the cancellation or amendment. |
MD17 | The payee or initiating party requested the cancellation or amendment. |
MD20 | The Payment Agreement was cancelled after its validity period expired. |
MS02 | The customer did not specify a reason. |
MS03 | The financial institution did not specify a reason. |
MSUC | The Payment Agreement was suspended after seven consecutive unsuccessful collections. |
NARR | A technical error was encountered. |
NOAS | No response was received from the customer to authorise or reject the creation or amendment request. |
RR04 | The agreement was suspended or cancelled for regulatory reasons. |
SL01 | A service restriction was applied by the payer's financial institution. |
SL11 | The payee or initiating party was not included, or was removed from, the payer's allowlist. |
SL12 | The payee or initiating party was included on the payer's blocklist. |
Amend a Payment Agreement
Use the amendment API to change an existing agreement. The effect on customer authorisation depends on the fields being changed.
Bilateral amendments
Changes to agreementDetails require the customer to authorise the amendment.
POST https://api-uat.azupay.com.au/v1/paymentAgreement/amendment
Authorization: SECR_MYBUSINESSID_myapikey
Content-Type: application/json{
"PaymentAgreementAmendment": {
"paymentAgreementId": "6381994bcd774920b50ce5bda3629ef2",
"clientTransactionId": "INV-0000001-AMENDMENT-1",
"agreementDetails": {
"variableAgreementDetails": {
"frequency": "WEEKLY",
"maximumAmount": "500.00",
"countPerPeriod": "1"
}
},
"paymentAgreementAmendmentNotification": {
"endpointURL": "https://merchant.example.com/webhooks/azupay/agreement-amendments",
"authorizationHeader": "replace-with-a-unique-secret"
}
}
}In this example, the agreement changes from a fixed structure to a variable structure. Fields not included in the amendment remain unchanged where they are valid for the new structure.
Unilateral amendments
The following fields can be amended without asking the customer to authorise the agreement again:
descriptionpayeeName
Supply unilateral changes under commonDetails:
{
"PaymentAgreementAmendment": {
"paymentAgreementId": "6381994bcd774920b50ce5bda3629ef2",
"clientTransactionId": "INV-0000001-AMENDMENT-2",
"commonDetails": {
"payeeName": "Northwind Inc.",
"description": "Monthly subscription"
},
"paymentAgreementAmendmentNotification": {
"endpointURL": "https://merchant.example.com/webhooks/azupay/agreement-amendments",
"authorizationHeader": "replace-with-a-unique-secret"
}
}
}Unilateral amendments are an opt-in feature. Contact your Azupay representative or raise a request through the Azupay Service Desk before using them.
Search for Payment Agreements
POST /paymentAgreement/search supports searches by:
paymentAgreementIdcontractId- creation-date range
Do not combine an ID search with date fields in the same request.
The following request searches for agreements created within a UTC date range:
{
"PaymentAgreementSearch": {
"fromDate": "2026-10-01T00:00:00.000Z",
"toDate": "2026-10-31T23:59:59.999Z"
}
}The date filters apply to the agreement's creation time, not its start date, end date or most recent status change.
Change the status of a Payment Agreement
Use the status API to suspend, reactivate or cancel an agreement:
POST https://api-uat.azupay.com.au/v1/paymentAgreement/changeStatus?id=6381994bcd774920b50ce5bda3629ef2&status=CANCELLED
Authorization: SECR_MYBUSINESSID_myapikeyThe merchant-permitted transitions are:
| Current status | Requested status | Result |
|---|---|---|
CREATED | CANCELLED | Cancels an agreement before initial activation. |
ACTIVE | SUSPENDED | Temporarily prevents further Payment Initiations. |
ACTIVE | CANCELLED | Permanently cancels the agreement. |
SUSPENDED | ACTIVE | Reactivates a previously suspended agreement. |
SUSPENDED | CANCELLED | Permanently cancels the agreement. |
Confirm the status change
Valid status changes for an agreement currently in ACTIVE or SUSPENDED status are processed asynchronously:
- ACTIVE → SUSPENDED or CANCELLED
- SUSPENDED → ACTIVE or CANCELLED
An HTTP 201 response confirms that the change was submitted, not completed. Continue monitoring the agreement through status notifications, or use the Search Payment Agreements API, until it reaches the requested status.
For an agreement in CREATED status, only cancellation is supported. This change is processed synchronously, and an HTTP 200 response confirms that the agreement is CANCELLED.
The status API cannot be used to perform the initial CREATED to ACTIVE transition. Initial activation requires customer authorisation.
Use Azupay's hosted customer experience
The direct API requires your system to collect the customer's PayID or BSB and account number. If you prefer Azupay to capture those details, use the PaymentAgreementRequest API with Azupay's hosted Subscriptions experience.
This option can:
- reduce the sensitive bank-account information handled by your interface
- reduce the development effort required to build the account-capture experience
- reduce the compliance effort associated with handling those details
The hosted experience creates the agreement; it does not collect a payment. After activation, use the Payment Initiation API in the same way as a directly created agreement.
Migrate Direct Debit Arrangements
Existing Direct Debit Arrangements may be eligible for migration to PayTo without requiring customers to authorise new agreements individually.
Direct Debit Arrangement migration has mandatory business and consumer-protection requirements. Contact your Azupay representative or raise a request through the Azupay Service Desk before starting implementation.
After Azupay configures your Bulk Electronic Clearing System (BECS) user ID, create the agreement with:
- the payer's BSB and account number in
payerDetails.bankAccountDetails - your configured BECS user ID in
payeeDetails.becsUserId
There is a five-calendar-day grace period after migration. Payment Initiations submitted before the grace period ends are rejected. Replace the date labels in the following example with valid current or future dates before sending it.
{
"PaymentAgreement": {
"clientId": "MYBUSINESSID",
"clientTransactionId": "INV-0000001-DDR-MIGRATION",
"payerDetails": {
"name": "Bob",
"bankAccountDetails": {
"bsb": "100000",
"accountNumber": "00000000"
}
},
"payeeDetails": {
"becsUserId": "BECS99"
},
"paymentAgreementType": "OTHER SERVICE",
"description": "Migrated direct debit arrangement",
"agreementDetails": {
"variableAgreementDetails": {
"startDate": "REPLACE_WITH_VALID_START_DATE",
"endDate": "REPLACE_WITH_VALID_END_DATE",
"frequency": "MONTHLY",
"maximumAmount": "344.33"
}
}
}
}Next steps
- Review the Create a Payment Agreement API reference for complete schemas and allowed values.
- Use the PaymentInitiation API guide to collect payments after activation.
- Use the PaymentAgreementRequest API when you want Azupay to host the customer account-capture experience.
- Review the Webhooks guide before implementing production notification handling.
Updated 12 days ago
