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:

  1. Create and activate the Payment Agreement.
  2. 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 schedule

After 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.

Learn more about the Payment Schedule API.

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 clientTransactionId for the agreement

Environment URLs

EnvironmentBase URL
UAThttps://api-uat.azupay.com.au/v1
Productionhttps://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_myapikey

API reference

APIDescriptionMethod
Create a Payment AgreementCreates a Payment Agreement.POST
Search for Payment AgreementsSearches by payment agreement ID, contract ID or creation date.POST
Amend a Payment AgreementChanges the details or terms of an agreement.POST
Change Status of a Payment AgreementSuspends, reactivates or cancels an agreement.POST

Choose the agreement structure

Use the agreement structure that matches how you intend to charge the customer.

Agreement structureBest forKey amount field
FixedRecurring payments where the amount stays the sameamount
VariableRecurring payments where the amount may changemaximumAmount
Usage-basedPayments based on the customer's use of a servicemaximumAmount
BalloonRegular payments with a larger payment at the endamount, lastPaymentDate and lastPaymentAmount where applicable

Only include one of the following objects in agreementDetails:

  • fixedAgreementDetails

  • variableAgreementDetails

  • usageBasedAgreementDetails
  • balloonAgreementDetails
📘

The agreement structure and paymentAgreementType describe different things.

The object under agreementDetails defines the billing pattern, such as fixed or variable. paymentAgreementType describes the purpose of the PayTo agreement, such as MORTGAGE, UTILITY, RETAIL or OTHER 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.

FieldWhat it controls
startDateThe date the agreement begins. It also anchors each frequency period using the Australia/Sydney calendar date.
endDate or lastPaymentDateThe final date on which the agreement may be used, where applicable to the selected agreement structure.
frequencyThe length of each agreement period. Supported values are INTRADAY, DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL and ADHOC.
countPerPeriodThe 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.
amountThe regular payment amount for a fixed or balloon agreement.
firstPaymentAmountAn optional different first payment amount for a fixed agreement.
maximumAmountThe maximum amount for each Payment Initiation under a variable or usage-based agreement.
lastPaymentAmountThe 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 limits

Unused countPerPeriod capacity 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

FieldRequiredDescription
clientIdYesYour Azupay client identifier for the selected environment.
clientTransactionIdYesYour unique identifier for this agreement request. Use the same value only when retrying the same logical request.
contractIdNoYour identifier for the customer contract. It helps prevent duplicate agreements for the same payer and contract while an agreement is CREATED, ACTIVE or SUSPENDED.
payerDetailsYesThe customer who will make payments. Provide either payIDDetails or bankAccountDetails, not both. A payer name is required when using bank-account details.
paymentAgreementTypeYesThe purpose of the PayTo agreement. This is separate from the fixed, variable, usage-based or balloon structure.
descriptionYesA description of the agreement that is visible to the customer.
agreementDetailsYesThe billing structure and authorised terms. Include exactly one supported agreement-details object.
countPerPeriodNoThe maximum number of payments within each frequency period. When omitted during creation, the default is 1.
paymentAgreementNotificationNoThe HTTPS endpoint and authorization value used for agreement status notifications.
additionalDetailsNoAdditional 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:

  1. Opens the PayTo or Payment Agreements area in their bank.
  2. Selects the pending agreement.
  3. Reviews the merchant, description, frequency, amount or limit, and agreement dates.
  4. 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
StatusMeaningCan you initiate payments?
CREATEDThe agreement is waiting for registration or customer authorisation to complete.No
ACTIVEThe agreement is active and may be used for eligible payments.Yes
SUSPENDEDThe agreement is temporarily suspended. It may later return to ACTIVE.No
CANCELLEDThe agreement has been cancelled permanently.No
FAILEDRegistration 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 events

For the default transaction-level callback, your dashboard webhook preferences determine which status events Azupay sends. See Configure webhook preferences, then enable:

  • PaymentAgreement.ACTIVE when an agreement is authorised and ready for eligible Payment Initiations
  • PaymentAgreement.SUSPENDED when an agreement is temporarily suspended
  • PaymentAgreement.CANCELLED when an agreement is permanently cancelled
  • PaymentAgreement.FAILED when agreement registration fails

If you process amendments, also enable PaymentAgreementAmendment.PENDING, PaymentAgreementAmendment.COMPLETED, PaymentAgreementAmendment.DECLINED, PaymentAgreementAmendment.RECALLED and PaymentAgreementAmendment.TIMEDOUT.

The initial CREATED status is returned by the create API. Do not rely on receiving a separate PaymentAgreement.CREATED webhook.

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 payloads

With the full payload, the webhook contains PaymentAgreement and PaymentAgreementStatus, 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.paymentAgreementId to 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:

  1. Validate the HTTP Authorization header. For a transaction-level callback, compare it with the value supplied in paymentAgreementNotification. For a client-level destination, compare it with the authorization credentials configured by Azupay.
  2. Correlate the notification using PaymentAgreementStatus.paymentAgreementId. A full payload also includes PaymentAgreement.clientTransactionId.
  3. 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.
  4. Return HTTP 200 after the notification has been handled, including when it is a duplicate.
📘

Webhook delivery and security

For 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:

FieldDescription
statusCurrent Payment Agreement status.
previousStatusStatus before the most recent change.
lastStatusBySource of the latest change: MERCHANT, PAYER or AZUPAY.
failureCodeOptional code explaining why an agreement entered FAILED.
failureReasonOptional human-readable description of a registration failure.
reasonCodeOptional code explaining a cancellation or suspension.
reasonDescriptionOptional 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.

OutcomeMeaningWhere to find the code
Request rejectedThe submitted request was not accepted. Correct it before trying again.details.failureCode and details.failureReason in the HTTP error response
Agreement failedThe 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 cancelledAn 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.

failureCodeApplies toDescription
AZP2.5CreateThe Payment Agreement could not be processed.
AZP5.1CreateBoth PayID and bank-account details were supplied. Provide only one.
AZP5.2CreateThe PayID format is invalid.
AZP5.3Create and amendBoth deviceFingerprint and ipAddress are required when channelType is BROWSER or MOBILE.
AZP5.4Create and amendipAddress is required when channelType is BROWSER or MOBILE.
AZP5.5Create and amenddeviceFingerprint is required when channelType is BROWSER or MOBILE.
AZP5.6Create and amendThe agreement details do not contain a supported agreement structure.
AZP5.7Create and amendMore than one agreement structure was supplied. Provide only one.
AZP5.8Create and amendThe request body is invalid.
AZP5.9AmendA required field is missing after changing the agreement structure.
AZP5.10CreateA DDR migration request contains both a BECS User ID and a PayID.
AZP5.11CreateThe BECS User ID is invalid.
AZP5.12CreateNeither PayID nor bank-account details were supplied. Provide one.
AZP5.13Create and amendThe start date must be today or a future date.
AZP5.14Create and amendThe end date must be on or after the start date.
AZP5.15Create and amendThe last payment date must be on or after the start date.
AZP5.16AmendThe end date must be today or a future date.
AZP5.17AmendThe 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.failureCode
  • PaymentAgreementStatus.failureReason
failureCodefailureReason
AZP2.1An error occurred with this Payment Agreement. Contact support.
AZP2.2The payer account is not eligible for PayTo payments.
AZP2.3The payer account is not eligible for New Payments Platform payments.
AZP2.4The payee alias details are invalid.
AZP3.1The last payment date must be on or after the start date.
AZP3.2The start date must be today or a future date.
AZP3.3The end date must be on or after the start date.
AZP4.1The request timed out. Try again.
AZP4.2There may be a New Payments Platform outage. Try again later.
AZP9.9A 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.

reasonCodeDescription
AC02The 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.
AC04The account has been closed and the Payment Agreement is no longer valid.
AC05The payer's account number is closed and the Payment Agreement is no longer valid.
AC13The account exists but cannot be debited through the New Payments Platform.
AG01The account exists but is unable to be debited.
AG03An amendment caused the payer and payee account combination to use an unsupported account type.
AM03The account exists but cannot be debited in Australian dollars.
AM12No amount or maximum amount was specified in the Payment Agreement.
AM14The amount exceeds the transaction amount allowed for the account.
CTAMThe Payment Agreement was suspended because the contract was amended.
CTCAThe Payment Agreement was suspended because the payer requested cancellation of the contract.
CTEXThe Payment Agreement was suspended because the contract expired.
MCFCThe Payment Agreement was suspended after the final collection.
MCOCThe Payment Agreement was suspended after the one-off collection.
MD07The customer is deceased.
MD08The financial institution no longer supports the mandate service.
MD09The payer or payer account does not support, or no longer supports, the requested mandate service.
MD16The payer requested the cancellation or amendment.
MD17The payee or initiating party requested the cancellation or amendment.
MD20The Payment Agreement was cancelled after its validity period expired.
MS02The customer did not specify a reason.
MS03The financial institution did not specify a reason.
MSUCThe Payment Agreement was suspended after seven consecutive unsuccessful collections.
NARRA technical error was encountered.
NOASNo response was received from the customer to authorise or reject the creation or amendment request.
RR04The agreement was suspended or cancelled for regulatory reasons.
SL01A service restriction was applied by the payer's financial institution.
SL11The payee or initiating party was not included, or was removed from, the payer's allowlist.
SL12The 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:

  • description
  • payeeName

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:

  • paymentAgreementId
  • contractId
  • 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_myapikey

The merchant-permitted transitions are:

Current statusRequested statusResult
CREATEDCANCELLEDCancels an agreement before initial activation.
ACTIVESUSPENDEDTemporarily prevents further Payment Initiations.
ACTIVECANCELLEDPermanently cancels the agreement.
SUSPENDEDACTIVEReactivates a previously suspended agreement.
SUSPENDEDCANCELLEDPermanently 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


Did this page help you?