### Example ABA File Structure and Content
Source: https://developer.azupay.com.au/docs/aba-outbound.md
Illustrates a sample ABA file with header, detail, and trailer records. This example demonstrates how to structure the data for outbound credit payments, including specific transaction details and control totals.
```text
0 01CBA Local Pegs Pty Ltd 301500Pegs Withdra030924
1012-003838337977 500000137134Sunrise Hotels Pty Ltd 030920241 062-692 49705956Pegs 00000000
1062-692 70325640 500000046094Saclike Trading Co 030920242 062-692 49705956Pegs 00000000
1062-000 12345678 500000000100Failed by Cuscal Pty Ltd 030920254 062-684 49705004Pegs 00000000
7999-999 000018332800001833280000000000 000003
```
--------------------------------
### Example RECEIVED Summary Response File Content
Source: https://developer.azupay.com.au/docs/connectivity-guide
This is an example of the content found in the RECEIVED summary response file. It confirms the successful reception of the input file and provides initial details about the file itself.
```text
Azupay Status Message
Client Name: client-account-full-legal-account-name
Status Filename : payment-connectivity-test-1-request_RECEIVED.txt
Status Creation Date : 18/09/25
Status Creation Time : 11:36
Transaction Reference : payment-connectivity-test-1-request.aba
Status: RECEIVED
The file has been received successfully.
Filename : payment-connectivity-test-1-request.aba
Description :
Value Date :
$Debits : 0.00
$Credits : 0.00
$Cheques : 0.00
#Payments : 0
#Advices : 0
#Records : 0
Thank you for using Azupay.
```
--------------------------------
### Azupay Full HTML Example with Message Handling
Source: https://developer.azupay.com.au/docs/integration-guide
This HTML code provides a complete example of an Azupay integration. It includes a script to handle messages from the Azupay iframe, updating the UI based on event data such as height and payment request status. It also includes input fields and a button to update the iframe source URL.
```html
Title
```
--------------------------------
### Example PROCESSED Summary Response File Content
Source: https://developer.azupay.com.au/docs/connectivity-guide
This example shows the content of a PROCESSED summary response file. It indicates that the transaction has been processed, detailing the value date, debits, credits, and the number of payments and returned payments.
```text
Azupay Status Message
Client Name: client-account-full-legal-account-name
Status Filename : payment-connectivity-test-1-request_PROCESSED.txt
Status Creation Date : 18/09/25
Status Creation Time : 11:37
Transaction Reference : payment-connectivity-test-1-request
Status: PROCESSED
The transaction has been processed.
Filename : payment-connectivity-test-1-request
Description : client-account-full-legal-account-name
Value Date : 18/09/25
$Debits : 1833.28
$Credits : 1833.28
$Cheques : 0.00
$Returned Payments : 1.00
#Returned Payments : 1
#Payments : 2
#Advices : 0
#Records : 3
Thank you for using Azupay.
```
--------------------------------
### Azupay API Authentication Header Example
Source: https://developer.azupay.com.au/docs/getting-started-1
This example demonstrates the required Authorization header format for making requests to the Azupay API. It specifies that either a SecretKey or DistributableKey should be provided.
```http
GET https://api.azupay.com.au/v1/...
Authorization: <[SecretKey|DistributableKey]>
```
--------------------------------
### Best Practices
Source: https://developer.azupay.com.au/docs/payto-integration-guide
Recommended practices for integrating with the Azupay API.
```APIDOC
## Best Practices
### 1. Idempotency
Always use unique `clientTransactionId` values to prevent duplicate transactions. If the same ID is used, the API will return the existing transaction instead of creating a duplicate.
### 2. Webhook Security
Validate webhook authenticity using the Authorization header you configured. Consider implementing webhook signature verification for additional security.
### 3. Error Handling
Implement robust error handling for network timeouts, API errors, and invalid responses. Use exponential backoff for retrying failed requests.
### 4. Status Monitoring
Monitor payment statuses regularly and handle edge cases like expired payments or failed settlements appropriately.
### 5. Testing
Use the UAT environment (`https://api-uat.azupay.com.au/v1`) for thorough testing before production deployment.
### 6. Logging
Log all API requests and responses (excluding sensitive data) for debugging and audit purposes.
```
--------------------------------
### POST /paymentInitiation/refund
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
Initiate a refund for a completed payment initiation.
```APIDOC
## POST /paymentInitiation/refund
### Description
Initiate a refund for a completed payment initiation.
### Method
POST
### Endpoint
/paymentInitiation/refund
### Parameters
#### Request Body
- **PaymentInitiationRefund** (object) - Required - Object containing refund details.
- **clientTransactionId** (string) - Required - Unique identifier for the refund transaction.
- **paymentInitiationId** (string) - Required - The ID of the payment initiation to refund.
- **refundAmount** (string) - Required - The amount to refund.
### Request Example
```json
{
"PaymentInitiationRefund": {
"clientTransactionId": "TX-REFUND-001-20241201-003",
"paymentInitiationId": "PI123456789",
"refundAmount": "50.00"
}
}
```
### Response
#### Success Response (200)
- **refundStatus** (string) - The status of the refund request (e.g., "SUCCESS", "FAILED").
- **clientTransactionId** (string) - The transaction ID provided in the request.
#### Response Example
```json
{
"refundStatus": "SUCCESS",
"clientTransactionId": "TX-REFUND-001-20241201-003"
}
```
```
--------------------------------
### Example Payment Request Status Response
Source: https://developer.azupay.com.au/docs/receiving-payments
An example JSON response detailing the status of a payment request. It includes information such as the amount received, completion timestamp, and status, which can be 'WAITING' or 'COMPLETE'. This structure helps in programmatically assessing payment outcomes.
```JSON
{
"PaymentRequest": {
"clientId": "MYBUSINESSID",
"clientTransactionId": "INV-0000001-1",
"paymentAmount": 32.12,
"paymentDescription": "Client invoice numner INV-0000001",
"payID": "jcn.o2r@mybusiness.com",
"paymentExpiryDatetime": "2021-04-21T03:51:45.256Z"
},
"PaymentRequestStatus": {
"paymentRequestId": "a050551479f625c066b559da28fee33c",
"createdDateTime": "2021-04-21T03:36:45.115Z",
"payerPaymentDescription": "paying for my goods and services",
"status": "COMPLETE",
"amountReceived": 32.12,
"completedDatetime": "2021-04-22T05:07:54.025Z"
}
}
```
--------------------------------
### Azupay UserInterface Event Example
Source: https://developer.azupay.com.au/docs/integration-guide
An example JSON payload for a 'UserInterface' event, used to notify the parent window about changes in the iframe's content height. This allows the parent page to adjust the iframe size dynamically.
```json
{
"EventType": "UserInterface",
"Timestamp": "2022-12-02T05:20:06.506Z",
"Data": {
"height": 651
}
}
```
--------------------------------
### POST /paymentInitiation
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
Initiates a recurring payment using an existing payment agreement.
```APIDOC
## POST /paymentInitiation
### Description
Initiates a recurring payment by referencing an existing `paymentAgreementId`. This endpoint is used after the initial payment period has elapsed to process subsequent recurring charges.
### Method
POST
### Endpoint
`/paymentInitiation`
### Headers
- **Authorization** (string) - `your-api-key`
- **Content-Type** (string) - `application/json`
### Request Body
```json
{
"PaymentInitiation": {
"paymentAgreementId": "agreement-456",
"paymentDescription": "Monthly subscription payment",
"clientTransactionId": "recurring-payment-789",
"paymentInitiationNotification": {
"endpointURL": "https://my-webhook.merchantname.com",
"authorizationHeader": "webhook-secret"
}
}
}
```
### Response
#### Success Response (200)
- **PaymentInitiation** (object) - Contains details of the initiated payment.
- **paymentAgreementId** (string) - The ID of the payment agreement used.
- **paymentDescription** (string) - Description of the payment.
- **clientTransactionId** (string) - Unique transaction ID from the client.
- **PaymentInitiationStatus** (object) - Status of the payment initiation.
- **paymentInitiationId** (string) - Unique ID for this payment initiation.
- **status** (string) - Current status (e.g., WAITING, CREATED, PENDING, SETTLED, FAILED).
- **createdDateTime** (string) - Timestamp when the initiation was created.
#### Response Example
```json
{
"PaymentInitiation": {
"paymentAgreementId": "agreement-456",
"paymentDescription": "Monthly subscription payment",
"clientTransactionId": "recurring-payment-789"
},
"PaymentInitiationStatus": {
"paymentInitiationId": "initiation-123",
"status": "WAITING",
"createdDateTime": "2024-02-15T10:30:00Z"
}
}
```
### PaymentInitiation Statuses
* **CREATED**: Payment instruction created.
* **PENDING**: Payment processing in progress.
* **SETTLED**: Payment completed successfully.
* **FAILED**: Payment failed.
* **RETURN_IN_PROGRESS**: Refund in progress.
* **RETURN_COMPLETE**: Refund completed successfully.
* **RETURN_FAILED**: Refund failed.
*Note: You can monitor the status of the `paymentInitiation` via webhook notifications sent to the `endpointURL` provided in the request.*
```
--------------------------------
### Connect to Customer Hosted SFTP Server
Source: https://developer.azupay.com.au/docs/connectivity-guide
Example command to connect to a Customer Hosted SFTP Server. This requires specifying the SSH private key file, port, username, and host name of the customer's SFTP server.
```sh
sftp -i ~/.ssh/your_company_sftp -P PORT USERNAME@HOST_NAME
```
--------------------------------
### GET /paymentRequest?id={paymentRequestId} - Get Payment Request Status
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
Retrieves the status of a payment request using its unique ID. This is useful for obtaining the payment agreement ID after a successful payment.
```APIDOC
## GET /paymentRequest?id={paymentRequestId}
### Description
Retrieves the status of a payment request using its unique ID. This is useful for obtaining the payment agreement ID after a successful payment.
### Method
GET
### Endpoint
/paymentRequest?id={paymentRequestId}
### Parameters
#### Path Parameters
None
#### Query Parameters
- **id** (string) - Required - The unique identifier of the payment request.
#### Request Body
None
### Request Example
```http
GET /paymentRequest?id=abc123
```
### Response
#### Success Response (200)
- **PaymentRequest** (object) - Details of the payment request.
- **clientId** (string) - Your client identifier.
- **clientTransactionId** (string) - Unique transaction identifier.
- **paymentAmount** (number) - Initial payment amount.
- **recurringPaymentAmount** (number) - Amount for recurring payments.
- **recurringPaymentFrequency** (string) - Payment frequency.
- **paymentDescription** (string) - Description of the payment.
- **checkoutUrl** (string) - The URL to redirect the customer to for payment.
- **PaymentRequestStatus** (object) - Status of the payment request.
- **paymentRequestId** (string) - Unique identifier for the payment request.
- **status** (string) - Current status of the payment request (e.g., `COMPLETE`).
- **createdDateTime** (string) - Timestamp when the payment request was created.
- **completedDatetime** (string) - Timestamp when the payment was completed.
- **settledBy** (string) - Method by which the payment was settled (e.g., `PayTo`).
- **paymentAgreementId** (string) - The unique identifier for the payment agreement, available upon completion.
#### Response Example
```json
{
"PaymentRequest": {
"clientId": "your-client-id",
"clientTransactionId": "unique-transaction-id",
"paymentAmount": 100.00,
"recurringPaymentAmount": 50.00,
"recurringPaymentFrequency": "ANNUAL",
"paymentDescription": "Annual subscription setup",
"checkoutUrl": "https://pay.azupay.com.au/xxxx/pay"
},
"PaymentRequestStatus": {
"paymentRequestId": "abc123",
"status": "COMPLETE",
"createdDateTime": "2024-01-15T10:30:00Z",
"completedDatetime": "2024-01-15T10:35:00Z",
"settledBy": "PayTo",
"paymentAgreementId": "agreement-456"
}
}
```
```
--------------------------------
### Submit Test File via SFTP
Source: https://developer.azupay.com.au/docs/connectivity-guide
Example command to connect to your SFTP server and upload the payment test file. Replace placeholders like PORT, USERNAME, HOST_NAME, and FOLDER with your specific details.
```sh
sftp -i ~/.ssh/your_company_sftp -P PORT USERNAME@HOST_NAME
put payment-connectivity-test-1-request.aba FOLDER
```
--------------------------------
### Payment Agreement Amendment API
Source: https://developer.azupay.com.au/docs/payto-integration-guide
This API allows you to amend an existing payment agreement, for example, to change the maximum amount or frequency. The amendment will require payer re-approval.
```APIDOC
## POST /paymentAgreement/amendment
### Description
Amends an existing payment agreement. Changes to the agreement will require payer re-approval.
### Method
POST
### Endpoint
`/paymentAgreement/amendment`
### Parameters
#### Request Body
- **PaymentAgreementAmendment** (object) - Required - Contains details for the payment agreement amendment.
- **clientTransactionId** (string) - Required - Unique identifier for the amendment transaction.
- **agreementDetails** (object) - Required - The updated details for the agreement.
- **paymentAgreementId** (string) - Required - The ID of the agreement to amend.
- **maximumAmount** (number) - Optional - The new maximum amount for the agreement.
- **frequency** (string) - Optional - The new frequency for the agreement.
### Request Example
```json
{
"PaymentAgreementAmendment": {
"clientTransactionId": "amendment-txn-id-456",
"agreementDetails": {
"paymentAgreementId": "agreement-id-abc",
"maximumAmount": 150.00,
"frequency": "monthly"
}
}
}
```
### Response
#### Success Response (201 CREATED)
- **PaymentAgreementAmendmentStatus** (object) - Contains the status of the amendment request.
- **amendmentStatus** (string) - The status of the amendment (e.g., PENDING).
#### Response Example
```json
{
"PaymentAgreementAmendmentStatus": {
"amendmentStatus": "PENDING"
}
}
```
```
--------------------------------
### Get Payment Request Status (HTTP)
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
This snippet shows how to retrieve the status of a payment request using the Azupay API. It involves making an HTTP GET request to the `/paymentRequest` endpoint, providing the `paymentRequestId` as a query parameter. The response includes details about the payment request and its current status, including the `paymentAgreementId` upon completion.
```http
GET /paymentRequest?id={paymentRequestId}
```
--------------------------------
### Install SSH Public Key on SFTP Server (Linux/OpenSSH)
Source: https://developer.azupay.com.au/docs/connectivity-guide
This snippet demonstrates how to create the .ssh directory with restrictive permissions and append the Azupay public key to the authorized_keys file for secure SFTP access. Ensure you replace USER and YOUR_DASHBOARD_PUBLIC_KEY with your actual values.
```sh
mkdir -p ~USER/.ssh && chmod 700 ~USER/.ssh
echo 'YOUR_DASHBOARD_PUBLIC_KEY' >> ~USER/.ssh/authorized_keys && chmod 600 ~USER/.ssh/authorized_keys
```
--------------------------------
### Extract Public Key from Private Key File
Source: https://developer.azupay.com.au/docs/sftp-troubleshooting
Extract the public key from a private key file. This is useful for comparing the public key being used with the one installed on the SFTP server's authorized_keys file.
```shell
ssh-keygen -y -f ~/.ssh/KEY > /tmp/key.pub
```
--------------------------------
### Connect to Azupay Hosted SFTP Server (UAT)
Source: https://developer.azupay.com.au/docs/connectivity-guide
Example command to connect to the Azupay Hosted SFTP Server in the UAT environment using SSH key authentication. Requires specifying the SSH private key file, port, username, and host name provided by Azupay Support.
```sh
sftp -i ~/.ssh/azupay_uat -P PORT USERNAME@HOST_NAME
```
--------------------------------
### POST /paymentRequest - Create Payment Request with Subscription
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
Creates a payment request that includes subscription setup. This endpoint is used to initiate a payment, with optional parameters for recurring payments, frequency, end date, and type.
```APIDOC
## POST /paymentRequest
### Description
Creates a payment request that includes subscription setup. This endpoint is used to initiate a payment, with optional parameters for recurring payments, frequency, end date, and type.
### Method
POST
### Endpoint
/paymentRequest
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
- **PaymentRequest** (object) - Required - Contains the details of the payment request.
- **clientId** (string) - Required - Your client identifier.
- **clientTransactionId** (string) - Required - Unique transaction identifier.
- **paymentAmount** (number) - Required - Initial payment amount.
- **paymentDescription** (string) - Required - Description of the payment.
- **recurringPaymentAmount** (number) - Optional - Amount for recurring payments. If provided with `recurringPaymentFrequency`, PayID option is removed, enabling only PayTo checkout.
- **recurringPaymentFrequency** (string) - Optional - Payment frequency. Supported values: `DAILY`, `WEEKLY`, `MONTHLY`, `ANNUAL`, `ADHOC`. If provided with `recurringPaymentAmount`, PayID option is removed, enabling only PayTo checkout.
- **recurringPaymentEndDate** (string) - Optional - The date after which the agreement will expire in `yyyy-mm-dd` format. The Agreement will not have an end date if not provided.
- **recurringPaymentType** (string) - Optional - Determines the type of Agreement. Default is `VARIABLE`. Supported values: `FIXED`, `VARIABLE`.
- **paymentNotification** (object) - Optional - Notification settings.
- **paymentNotificationEndpointUrl** (string) - Required if `paymentNotification` is present - The URL for payment notifications.
- **paymentNotificationAuthorizationHeaderValue** (string) - Required if `paymentNotification` is present - The authorization header value for webhook notifications.
### Request Example
```json
{
"PaymentRequest": {
"clientId": "your-client-id",
"clientTransactionId": "unique-transaction-id",
"paymentAmount": 100.00,
"recurringPaymentAmount": 50.00,
"recurringPaymentFrequency": "ANNUAL",
"recurringPaymentType": "VARIABLE",
"recurringPaymentEndDate": "2026-11-04",
"paymentDescription": "Annual subscription setup",
"paymentNotification": {
"paymentNotificationEndpointUrl": "https://my-webhook.merchantname.com",
"paymentNotificationAuthorizationHeaderValue": "webhook-secret"
}
}
}
```
### Response
#### Success Response (200)
- **PaymentRequest** (object) - Details of the created payment request.
- **clientId** (string) - Your client identifier.
- **clientTransactionId** (string) - Unique transaction identifier.
- **paymentAmount** (number) - Initial payment amount.
- **recurringPaymentAmount** (number) - Amount for recurring payments.
- **recurringPaymentFrequency** (string) - Payment frequency.
- **recurringPaymentType** (string) - Type of recurring payment agreement.
- **recurringPaymentEndDate** (string) - End date for the recurring payment agreement.
- **paymentDescription** (string) - Description of the payment.
- **checkoutUrl** (string) - The URL to redirect the customer to for payment.
- **PaymentRequestStatus** (object) - Status of the payment request.
- **paymentRequestId** (string) - Unique identifier for the payment request.
- **status** (string) - Current status of the payment request (e.g., `WAITING`).
- **createdDateTime** (string) - Timestamp when the payment request was created.
#### Response Example
```json
{
"PaymentRequest": {
"clientId": "your-client-id",
"clientTransactionId": "unique-transaction-id",
"paymentAmount": 100.00,
"recurringPaymentAmount": 50.00,
"recurringPaymentFrequency": "ANNUAL",
"recurringPaymentType": "VARIABLE",
"recurringPaymentEndDate": "2026-11-04",
"paymentDescription": "Annual subscription setup",
"checkoutUrl": "https://pay.azupay.com.au/xxxx/pay"
},
"PaymentRequestStatus": {
"paymentRequestId": "abc123",
"status": "WAITING",
"createdDateTime": "2024-01-15T10:30:00Z"
}
}
```
```
--------------------------------
### Example Failed Payment Attempt Details
Source: https://developer.azupay.com.au/docs/receiving-payments
This JSON structure illustrates details of a failed payment attempt within a payment request. It provides the timestamp, amount, and the reason for failure, such as 'Incorrect Payment Amount'. This information is vital for customer communication and guiding them to correct the payment.
```JSON
{
"attemptDateTime": "2021-06-02T23:35:12.940Z",
"attemptAmount": 30,
"attemptFailureReason": "Incorrect Payment Amount"
}
```
--------------------------------
### Upload File to Customer Hosted SFTP Server
Source: https://developer.azupay.com.au/docs/connectivity-guide
Example command to upload a payment file to a Customer Hosted SFTP Server. This assumes an active SFTP connection and requires the correct folder name configured in the Azupay Dashboard.
```sh
put payments.pain.001.xml FOLDER
```
--------------------------------
### Get Report Download URL API
Source: https://developer.azupay.com.au/docs/report-api
Gets a short-lived (1 minute) URL to access a report for a reportId provided to the API.
```APIDOC
## GET /reports/{reportId}/download-url
### Description
Retrieves a temporary, one-minute valid URL to download a specific report identified by its `reportId`.
### Method
GET
### Endpoint
/reports/{reportId}/download-url
### Parameters
#### Path Parameters
- **reportId** (string) - Required - The unique identifier of the report to download.
### Request Example
```json
GET /reports/rep_abc123xyz/download-url
```
### Response
#### Success Response (200)
- **downloadUrl** (string) - A temporary URL to download the report.
- **expiresIn** (integer) - The time in seconds until the download URL expires (typically 60 seconds).
#### Response Example
```json
{
"downloadUrl": "https://azupay.com.au/download/rep_abc123xyz?token=abcdef123456",
"expiresIn": 60
}
```
```
--------------------------------
### Create Initial Payment Request for Static PayID (HTTP)
Source: https://developer.azupay.com.au/docs/receiving-payments
This example demonstrates how to create an initial PaymentRequest for a Static PayID. It includes the necessary headers and a JSON body specifying payment details like amount, description, and expiry. The `clientTransactionId` is unique for this initial request.
```http
POST https://api.azupay.com.au/v1/paymentRequest
Authorization: SECR_MYBUSINESSID_myapikey
Content-Type: application/json
{
"PaymentRequest": {
"clientId": "MYBUSINESSID",
"clientTransactionId": "INV-0000001",
"paymentAmount": 40.00,
"paymentDescription": "Monthly invoice INV-0000001 for client 12345",
"payID": "dl-12345.abc@mymerchant.com.au",
"paymentExpiryDatetime": ""
}
}
```
--------------------------------
### Upload File to Azupay Hosted SFTP Server
Source: https://developer.azupay.com.au/docs/connectivity-guide
Example command to upload a payment file to the Azupay Hosted SFTP Server. This assumes an active SFTP connection and requires the correct upload folder name provided by Azupay Support.
```sh
put payments.pain.001.xml UPLOAD_FOLDER
```
--------------------------------
### Azupay PaymentRequest Event Example
Source: https://developer.azupay.com.au/docs/integration-guide
An example JSON payload for a 'PaymentRequest' event, providing details about the payment request and its current status. This enables the parent web app to react to payment state changes, such as completion.
```json
{
"EventType": "PaymentRequest",
"Timestamp": "2022-12-02T05:18:56.250Z",
"Data": {
"PaymentRequest": {
"clientId": "0038ae8a0989a81ccf92bfead1bdfe18",
"multiPayment": true,
"clientTransactionId": "61d0f44d-3d84-4fd1-a02e-7cc9957256d6",
"payID": "[5ch.j55@mydomain.com](mailto:5ch.j55@mydomain.com)",
"paymentAmount": 20,
"paymentExpiryDatetime": "2022-12-03T19:58:51.027Z",
"paymentDescription": "Enter your order number in reference field"
},
"PaymentRequestStatus": {
"createdDateTime": "2022-12-02T05:15:51.147Z",
"paymentRequestId": "499112286f20771a678d6af05bb36e6c",
"status": "WAITING"
}
}
}
```
--------------------------------
### Upload Test File via SFTP
Source: https://developer.azupay.com.au/docs/connectivity-guide
This command demonstrates how to connect to the Azupay UAT SFTP server and upload the prepared ABA test file. Replace PORT, USERNAME, HOST_NAME, and UPLOAD_FOLDER with your specific credentials and paths.
```shell
sftp -i ~/.ssh/azupay_uat -P PORT USERNAME@HOST_NAME
put payment-connectivity-test-1-request.aba UPLOAD_FOLDER
```
--------------------------------
### Get Reports API
Source: https://developer.azupay.com.au/docs/report-api
Allows you to query a month or date range for all available reports. A list of reports available for the queried period will be returned with unique reportIds that can be used as input for the Get Report download URL API.
```APIDOC
## GET /reports
### Description
Retrieves a list of available reports for a specified month or date range. This endpoint returns report IDs that can be used to download individual reports.
### Method
GET
### Endpoint
/reports
### Parameters
#### Query Parameters
- **month** (string) - Optional - The month for which to retrieve reports (e.g., '2023-10').
- **timezone** (string) - Optional - The timezone for the month query (e.g., 'Australia/Sydney'). Required if 'month' is provided.
- **fromDate** (string) - Optional - The start date for the report query (e.g., '2023-10-01T00:00:00Z').
- **toDate** (string) - Optional - The end date for the report query (e.g., '2023-10-31T23:59:59Z').
*Note: Either `month` and `timezone` OR `fromDate` and `toDate` must be provided.*
### Request Example
```json
GET /reports?month=2023-10&timezone=Australia/Sydney
```
```json
GET /reports?fromDate=2023-10-01T00:00:00Z&toDate=2023-10-31T23:59:59Z
```
### Response
#### Success Response (200)
- **reports** (array) - A list of available reports.
- **reportId** (string) - The unique identifier for a report.
- **generatedDate** (string) - The date the report was generated.
- **moreResultsPossible** (boolean) - Indicates if more results are available when using date range queries with more than 10,000 transactions.
#### Response Example
```json
{
"reports": [
{
"reportId": "rep_abc123xyz",
"generatedDate": "2023-10-26T06:15:00Z"
},
{
"reportId": "rep_def456uvw",
"generatedDate": "2023-10-25T06:15:00Z"
}
],
"moreResultsPossible": false
}
```
```
--------------------------------
### Paginate Search Results with cURL
Source: https://developer.azupay.com.au/docs/receiving-payments
This example shows how to fetch a larger number of payment requests (up to 10,000) using the 'numberOfRecords' query parameter. It also includes the request body for searching within a date range and by creation date.
```shell
curl --request POST \
--url 'https:///v1/paymentRequest/search?numberOfRecords=10000' \
--header 'Authorization: ' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"PaymentRequestSearch": {
"fromDate": "2025-01-01T00:00:00.000Z",
"toDate": "2026-01-31T23:59:59.999Z",
"searchByDateType": "CREATED_DESC"
}
}'
```
--------------------------------
### POST /paymentInitiation/search
Source: https://developer.azupay.com.au/docs/3-comprehensive-integration-guide
Search for payment initiations based on criteria such as client transaction ID or date range.
```APIDOC
## POST /paymentInitiation/search
### Description
Search for payment initiations based on various criteria like client transaction ID or date range.
### Method
POST
### Endpoint
/paymentInitiation/search
### Parameters
#### Request Body
- **PaymentInitiationSearch** (object) - Required - Object containing search criteria.
- **clientTransactionId** (string) - Optional - The client-defined transaction ID.
- **dateFrom** (string) - Optional - The start date for the search range (YYYY-MM-DD).
- **dateTo** (string) - Optional - The end date for the search range (YYYY-MM-DD).
- **paymentAgreementId** (string) - Optional - The ID of the payment agreement.
### Request Example
```json
{
"PaymentInitiationSearch": {
"clientTransactionId": "TX-PMT-001-20241201-001"
}
}
```
### Response
#### Success Response (200)
- **paymentInitiations** (array) - A list of payment initiations matching the search criteria.
- **paymentInitiationId** (string) - The unique ID for the payment initiation.
- **clientTransactionId** (string) - The client-defined transaction ID.
- **status** (string) - The status of the payment initiation (e.g., "COMPLETED", "PENDING", "FAILED").
- **amount** (string) - The amount of the payment.
- **initiationDate** (string) - The date and time the payment was initiated.
#### Response Example
```json
{
"paymentInitiations": [
{
"paymentInitiationId": "PI123456789",
"clientTransactionId": "TX-PMT-001-20241201-001",
"status": "COMPLETED",
"amount": "50.00",
"initiationDate": "2024-12-01T10:00:00Z"
}
]
}
```
```
--------------------------------
### Batch Payment Request File Example (CSV)
Source: https://developer.azupay.com.au/docs/payment-request-batch
An example of a CSV formatted file for submitting batch payment requests to Azupay. This file includes fields such as clientId, clientTransactionId, payID, paymentExpiryDatetime, paymentAmount, paymentDescription, and multiPayment.
```text/csv
clientId,clientTransactionId,payID,paymentExpiryDatetime,paymentAmount,paymentDescription,multiPayment
CLIENT1,INV3442345,customer123@water.com.au,2021-09-301T10:00:00Z,123.45,Water bill April to July 2021,true
CLIENT1,INV3442346,customer456@water.com.au,2021-09-30T10:00:00Z,166.45,"Water bill April to July 2021",true
CLIENT1,INV3442347,customer789@water.com.au,,178.95,Water bill April to July 2021,false
```