---
updatedAt: 2026-04-21T02:04:25.000Z
agentTools:
  projectIndex: https://developer.azupay.com.au/llms.txt
---

# Refund for Payment Initiation

Refund for Payment Initiation (PayTo Transactions)


For detailed information on how to use this API and specific merchant use cases for this API, please refer to this API reference guides documentation: [PaymentInitiation API](https://developer.azupay.com.au/docs/guide-to-the-paymentinitiation-api#/)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API Reference",
    "description": "API Reference",
    "version": "v1",
    "contact": {
      "email": "contactus@azupay.com.au"
    }
  },
  "servers": [
    {
      "url": "https://api-uat.azupay.com.au/v1",
      "description": "UAT environment"
    },
    {
      "url": "https://api.azupay.com.au/v1",
      "description": "Production environment"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Receive payments - AzupayId",
      "tags": [
        "Payment Request"
      ]
    },
    {
      "name": "Make payments - AzupayOut",
      "tags": [
        "Accounts",
        "Payment"
      ]
    },
    {
      "name": "Payment Agreements - AzupayTo",
      "tags": [
        "Payment Agreement",
        "Payment Initiation",
        "Payment Agreement Request"
      ]
    },
    {
      "name": "Accounts",
      "tags": [
        "Check Accounts"
      ]
    },
    {
      "name": "Reports",
      "tags": [
        "Billing and Transaction Reports",
        "Current Balances"
      ]
    },
    {
      "name": "Configuration",
      "tags": [
        "Clients",
        "PayID Domains",
        "API Keys"
      ]
    }
  ],
  "tags": [
    {
      "name": "Payment Initiation",
      "x-displayName": "Payment Initiation",
      "description": "This API allows you to initiate Payments using mandates.\n"
    }
  ],
  "components": {
    "securitySchemes": {
      "SecretKey": {
        "description": "The secret key is used to access restricted functions and should be stored\nsecurely in your system. It is required for operations which may result in\nadditional charges to you as a merchant. Please protect the key by storing\nit encrypted granting access only to a limited set of users and applications\nrequiring its use.\n",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    },
    "schemas": {
      "PayToAmountObj": {
        "type": "string",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "description": "Amount in AUD to be requested from the Payee",
        "example": "2101.95"
      },
      "ClientIdObj": {
        "type": "string",
        "description": "Id of the client initiating the transaction. This is supplied by Azupay and only changes between environments.\nFor example, you might be allocated CLIENT1TEST for the UAT environment and CLIENT1 for production.\n",
        "minLength": 5,
        "maxLength": 50,
        "example": "CLIENT1"
      },
      "azupayId": {
        "type": "string",
        "description": "An identifier generated by Azupay. Used to reference the object in subsequent operations",
        "example": "K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="
      },
      "ClientTransactionIdObj": {
        "description": "Unique Id for the transaction created by the merchant system\n\nThis field is used to prevent the creation of duplicated clients in case of a message retry. It is\nrecommended that a unique id (like uuid) is used for each client. If the same value is used a second time\nthe client will be replaced.\n",
        "minLength": 5,
        "maxLength": 100,
        "type": "string",
        "example": "TX5346423452345345"
      },
      "ErrorModel": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "failureCode": {
                "type": "string"
              },
              "failureReason": {
                "type": "string"
              }
            },
            "required": [
              "failureCode",
              "failureReason"
            ]
          }
        }
      },
      "PaymentInitiationObj": {
        "type": "object",
        "required": [
          "PaymentInitiation"
        ],
        "additionalProperties": false,
        "properties": {
          "PaymentInitiation": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "clientId",
              "paymentAgreementId",
              "paymentAmount",
              "clientTransactionId"
            ],
            "properties": {
              "paymentAgreementId": {
                "type": "string",
                "description": "ID of the payment agreement to initiate payment",
                "example": "K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="
              },
              "paymentRequestId": {
                "type": "string",
                "minLength": 32,
                "maxLength": 32,
                "pattern": "^[A-Z|a-z|0-9]*$"
              },
              "metaData": {
                "type": "object",
                "additionalProperties": true,
                "description": "An object containing no more than 10 string fields. Where the field name is limited to 40 ASCII characters and the field value is limited to 255 ASCII characters"
              },
              "clientTransactionId": {
                "$ref": "#/components/schemas/ClientTransactionIdObj"
              },
              "clientId": {
                "$ref": "#/components/schemas/ClientIdObj"
              },
              "paymentAmount": {
                "$ref": "#/components/schemas/PayToAmountObj"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 35,
                "pattern": "^[ -~]*$",
                "description": "Unique identification to unambiguously identify the transaction. \nThis identification is passed on, unchanged, throughout the entire end-to-end payment message, \nand will appear on payers statements.\n",
                "example": "INVOICE-34434"
              },
              "description": {
                "type": "string",
                "minLength": 5,
                "maxLength": 280,
                "description": "Optional remittance information used to unambiguously refer to the payment transaction.",
                "example": "Top-up for wallet 23432"
              },
              "paymentInitiationNotification": {
                "$ref": "#/components/schemas/NotificationObj"
              },
              "additionalDetails": {
                "$ref": "#/components/schemas/AdditionalDetailsObj"
              }
            }
          }
        }
      },
      "PaymentInitiationStatusObj": {
        "type": "object",
        "required": [
          "PaymentInitiationStatus"
        ],
        "additionalProperties": false,
        "properties": {
          "PaymentInitiationStatus": {
            "additionalProperties": false,
            "required": [
              "paymentInitiationId",
              "status",
              "createdDatetime"
            ],
            "type": "object",
            "properties": {
              "paymentInitiationId": {
                "$ref": "#/components/schemas/azupayId"
              },
              "status": {
                "type": "string",
                "description": "Status of the requested payment initiation.",
                "enum": [
                  "CREATED",
                  "SETTLED",
                  "FAILED",
                  "PENDING",
                  "RETURN_IN_PROGRESS",
                  "RETURN_FAILED",
                  "RETURN_COMPLETE"
                ]
              },
              "createdDatetime": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the payment initiation was created."
              },
              "completedDatetime": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the payment initiation was completed. Only for `status` different than `CREATED`.\n"
              },
              "statusCode": {
                "type": "string",
                "description": "A transaction status reason code returned by the destination institution. \n\nStandardized among NPP network participants.\n",
                "example": "AC02"
              },
              "statusReason": {
                "type": "string",
                "description": "A description corresponds to the value of the `statusCode` field.\n\nFor the full list, please refer to the\n[Status Code and Status Reason](/docs/receiving-recurring-payments.html#status-code-and-status-reason) page\n",
                "example": "The Debtor Account Number is invalid or missing."
              },
              "nppTransactionId": {
                "type": "string",
                "description": "An identifier used to reference a payment pulled from a bank account between banks, businesses and \npayment facilitators such as Azupay.\n"
              },
              "payerInformation": {
                "description": "This object is present when the payment is completed and your client is configured to expose payer information.",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "bsb": {
                    "type": "string",
                    "description": "The bsb"
                  },
                  "accountNumber": {
                    "type": "string",
                    "description": "The account number"
                  },
                  "fullLegalAccountName": {
                    "type": "string",
                    "description": "The full legal account name"
                  }
                }
              },
              "refundInformation": {
                "description": "This object is present when a refund is requested.",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "availableBalance": {
                    "type": "string",
                    "description": "The remaining balance after completion of all the refunds."
                  },
                  "requests": {
                    "type": "array",
                    "description": "An array of objects capturing log of completed refund requests",
                    "items": {
                      "type": "object",
                      "description": "Refund information",
                      "properties": {
                        "createdDateTime": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when refund request was initiated"
                        },
                        "completedDateTime": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when refund request was completed."
                        },
                        "amount": {
                          "type": "string",
                          "description": "The refund amount"
                        },
                        "nppTransactionId": {
                          "description": "The identifier of the transaction in the NPP network. This is an identifier known by the initiating bank and serves as unique identifier for the refund.",
                          "type": "string"
                        },
                        "status": {
                          "description": "The status of the refund",
                          "type": "string",
                          "enum": [
                            "IN_PROGRESS",
                            "COMPLETE",
                            "FAILED"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "endpointURL": {
        "type": "string",
        "format": "url",
        "description": "An internet accessible url which Azupay will invoke when the status of the transaction has \nchanged. The call will be done using the HTTP POST method. The endpoint exposed by the client \nmust be TLS 1.2 and the server certificate must be issued by a well known commercial certificate \nauthority and that self-signed or internally signed certs are not acceptable.\n",
        "example": "https://example.org"
      },
      "authorizationHeader": {
        "type": "string",
        "description": "The string that Azupay will put into the Authorization request header when calling the Callback url.\n\nWill be obfuscated (shown as ****) in API responses.\n",
        "example": "SECRET"
      },
      "NotificationObj": {
        "type": "object",
        "description": "Merchant Callback Details",
        "required": [
          "endpointURL",
          "authorizationHeader"
        ],
        "properties": {
          "endpointURL": {
            "$ref": "#/components/schemas/endpointURL"
          },
          "authorizationHeader": {
            "$ref": "#/components/schemas/authorizationHeader"
          }
        }
      },
      "AdditionalDetailsObj": {
        "type": "object",
        "required": [
          "customerNumber",
          "userID",
          "authMethod",
          "channelType"
        ],
        "description": "Additional details for auditing purposes",
        "properties": {
          "customerNumber": {
            "type": "string",
            "description": "Uniquely identifies the Customer for whom the request has been initiated for. i.e. the Customer  that owns the account. This field should contain the Member Number or Customer Number from the  Client's banking system.\n",
            "maxLength": 25
          },
          "userID": {
            "type": "string",
            "description": "Uniquely identifies the User that has initiated the request. This could be the Customer or someone  authorised to act on behalf of the Customer.\n",
            "maxLength": 25
          },
          "authMethod": {
            "type": "string",
            "description": "This field allows us to understand how the user has logged in. Over a period we can determine if  there is a deviation from normal usage patterns. e.g. Moving from biometric to PIN and linking that  with payments we can detect fraud happening but also apply other rules to understand if PayIds are  being from a device for malicious intent.\n",
            "enum": [
              "2FACTOR",
              "OTP",
              "BIOMETRIC",
              "PASSWORD",
              "PIN",
              "NONE"
            ]
          },
          "channelType": {
            "type": "string",
            "description": "This field allows us to understand, similar to authenticationMethod, which channels are being used  to initiate a request. If `BROWSER` or `MOBILE` is selected. `ipAddress` and `deviceFingerprint`  will be required fields.\n",
            "enum": [
              "BROWSER",
              "MOBILE",
              "BRANCH",
              "IVR",
              "OTHER"
            ]
          },
          "ipAddress": {
            "type": "string",
            "description": "IP address of the device or computer from which the user request originated. Required if request  originated from a browser or mobile, else do not send.\n"
          },
          "fraudScore": {
            "type": "string",
            "description": "This is a fraud score you may have calculated. if not, do not send."
          },
          "deviceFingerprint": {
            "type": "string",
            "description": "The device fingerprint or browser fingerprint. A change in device is a possible indicator of  fraud/ID takeover/phone number porting. The device fingerprint, machine fingerprint or browser  fingerprint. Required if the request originated from a web browser or mobile device, else do not  send.\n"
          },
          "notes": {
            "type": "string",
            "description": "Free text field up to 2048 characters.",
            "maxLength": 2048
          },
          "geoLocation": {
            "type": "string",
            "description": "Latitude and Longitude from which the user request originated. For example  -33.8708464,151.20732999999998 Only to be provided if GPS is enabled on the device, else do not  send.\n",
            "maxLength": 50
          }
        }
      }
    }
  },
  "paths": {
    "/paymentInitiation/refund": {
      "post": {
        "security": [
          {
            "SecretKey": []
          }
        ],
        "tags": [
          "Payment Initiation"
        ],
        "summary": "Refund for Payment Initiation",
        "description": "Refund for Payment Initiation (PayTo Transactions)\n",
        "operationId": "refundPaymentInitation",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "description": "The ID for the Payment Initiation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "refundAmount",
            "description": "The refund amount",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "refundBatchId",
            "description": "The batch Id if the refund is done through batch",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment refunded",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaymentInitiationObj"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentInitiationStatusObj"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid Authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Payment Request Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
```