{"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"]}],"tags":[{"name":"Payment Request","description":"This API allows your customers to make payments using PayID on your website, mobile app or over the counter.\n"},{"name":"Payment","description":"This API allows you to make outbound payments to PayID or NPP enabled BSB accounts.\n"},{"name":"Payment Agreement","x-displayName":"Payment Agreement","description":"This API allows you to request Payments using mandates.\n"},{"name":"Payment Agreement Request","x-displayName":"Payment Agreement Request","description":"This API generates a link to a one-time UX experience that enables payers to create and approve a PayTo Agreement, \nfacilitating the setup of recurring payments through the Payment Initiation API or batch processing. \nIt is ideal for subscription-based products, such as monthly fees.\n"},{"name":"Payment Initiation","x-displayName":"Payment Initiation","description":"This API allows you to initiate Payments using mandates.\n"},{"name":"Check Accounts","description":"Before you submit a Payment you can validate if the PayID or BSB account of the recipient exists and\nis eligible to receive payments.\n"},{"name":"Billing and Transaction Reports","description":"Fetch transaction, billing and other reports.\n"},{"name":"Current Balances","description":"Obtain current dollar balances for Azupay products\n"},{"name":"PayID Domains","description":"Would let you control the domains used for payIDs.\nTo get access to this api, please submit a service desk request.\n"},{"name":"Clients","description":"Would let you manage clients\n"}],"components":{"securitySchemes":{"NoSecurity":{"description":"No security is required for this API.","type":"http","scheme":"none"},"DistributableKey":{"description":"The distributable key has limited access and may be exposed publicly to\nyour payers.\n","in":"header","name":"Authorization","type":"apiKey"},"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":{"GetClientsResponse":{"type":"object","additionalProperties":false,"properties":{"clientId":{"type":"string"},"legalName":{"type":"string"},"clientName":{"type":"string"}}},"fromDateWithTZO":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}[+\\-]\\d{2}:\\d{2}$","description":"The report date in ISO date/time string format with timezone offset","example":"2020-01-01T00:00:00.004+11:00"},"toDateWithTZO":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}[+\\-]\\d{2}:\\d{2}$","description":"The report date in ISO date/time string format with timezone offset","example":"2020-01-01T00:00:00.004+11:00"},"PayToAmountObj":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Amount in AUD to be requested from the Payee","example":"2101.95"},"AgreementExpiryMinutesObj":{"type":"integer","description":"An integer value representing the total number of minutes before a payment agreement expires. This field has a minimum value of 5 and a max of 7199","minimum":5,"maximum":7199,"example":5},"ContractIdObj":{"type":"string","minLength":1,"maxLength":50,"description":"Unique Id for the merchant side contract.\nThis field is used to prevent the creation of duplicated payment agreements in CREATED, SUSPENDED, ACTIVE status. \nPayment agreements in statuses such as CANCELLED, FAILED are not considered duplicates.\n","example":"30597959-a853-44d4-bdab-54332bf7a98e"},"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"},"SubClientIdObj":{"type":"string","description":"Your client’s unique identifier that we provide you during the initial onboarding request.\n","minLength":5,"maxLength":50,"example":"CLIENT1"},"ApiKeyIdObj":{"type":"string","example":"SECR","description":"The ID provided when the API Key was generated via the API or from the dashboard."},"StartDateObj":{"type":"string","description":"A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$","example":"2022-01-01"},"endDate":{"type":"string","description":"A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$","example":"2022-12-01"},"lastPaymentDate":{"type":"string","description":"A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$","example":"2022-06-01"},"maximumAmount":{"type":"string","description":"Amount in AUD","pattern":"^[0-9]+(\\.[0-9]{2})$","example":"1001.95"},"amount":{"type":"string","description":"Amount in AUD","pattern":"^[0-9]+(\\.[0-9]{2})$","example":"1001.95"},"firstPaymentAmount":{"type":"string","description":"Amount in AUD","pattern":"^[0-9]+(\\.[0-9]{2})$","example":"1001.95"},"lastPaymentAmount":{"type":"string","description":"Amount in AUD","pattern":"^[0-9]+(\\.[0-9]{2})$","example":"1001.95"},"frequency":{"type":"string","description":"Payment Frequency","enum":["ADHOC","DAILY","FORTNIGHTLY","INTRADAY","SEMIANNUAL","MONTHLY","QUARTERLY","WEEKLY","ANNUAL"]},"countPerPeriod":{"type":"string","description":"Number of payments within a specified period based on the frequency","pattern":"^[1-9][0-9]{0,2}$","example":"5"},"suggestedPayerDetailsObj":{"type":"object","additionalProperties":false,"description":"Payer details to pre-populate the UI. Only one of `payIDDetails` or `bankAccountDetails` allowed.\n","properties":{"payIDDetails":{"type":"object","description":"PayID Details","additionalProperties":false,"required":["payID"],"properties":{"payID":{"$ref":"#/components/schemas/PayerPayIDObj"}}},"bankAccountDetails":{"description":"Bank Account Details","additionalProperties":false,"type":"object","properties":{"bsb":{"$ref":"#/components/schemas/BsbObj"},"accountNumber":{"$ref":"#/components/schemas/AccountNumberObj"},"accountName":{"$ref":"#/components/schemas/AccountNameObj"}}}}},"PayIDObj":{"type":"string","minLength":1,"maxLength":140,"example":"jane.smith@example.com","description":"The payer's PayID. Valid examples are `+61-432123321` (mobile), `+61-312344321` (landline), \n`0432123321` (mobile), `0312344321` (landline), `jane.smith@example.com`\n"},"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"},"UpdateClientObj":{"type":"object","additionalProperties":false,"required":["client"],"properties":{"client":{"type":"object","additionalProperties":false,"required":["id","enabled","riskCategory","industryName","legalName","abn","kyc"],"properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"riskCategory":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"industryName":{"type":"string","enum":["AIRLINE","AUTO","BANKING","CASH MANAGEMENT","COLLECTIONS","CRYPTO","EDUCATION","EVENTS AND TICKETING","FINANCIAL SERVICES","FUNDRAISING","GAMBLING","GIFT CARDS","GOVERNMENT","HEALTH","INTERNAL","INVESTMENT AND STOCKS","PAYMENTS","PROPERTY","REMITTANCE","RETAIL","SOFTWARE DEVELOPMENT","SPORTS BETTING","TELCOS","TEST ACCOUNT","TRADES","TRANSPORT","TRAVEL AGENTS","UTILITIES","VIRTUAL WALLETS"]},"legalName":{"type":"string","minLength":1,"maxLength":50},"tradingName":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9\\-_ ]*$"},"abn":{"type":"string","minLength":11,"maxLength":11,"pattern":"^\\d*$"},"kyc":{"type":"object","additionalProperties":false,"required":["websiteURL","businessContactName","businessEmailAddress","businessPhoneNumber","businessRegisteredAddress","businessRegistrationDate","merchantCategoryCode","rncCompletion"],"properties":{"acn":{"type":"string","minLength":9,"maxLength":9,"pattern":"^\\d{9}$"},"companyIncorporationDate":{"type":"string","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$"},"afslNumber":{"type":"string","minLength":1,"maxLength":9,"pattern":"^\\d{1,9}$"},"websiteURL":{"type":"string","minLength":1,"maxLength":255,"pattern":"^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$"},"businessContactName":{"type":"string","minLength":1,"maxLength":255},"businessEmailAddress":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$"},"businessPhoneNumber":{"type":"string","pattern":"^\\+[0-9]{1,3}-[1-9]{1,1}[0-9]{1,29}$"},"businessRegisteredAddress":{"type":"string","minLength":10,"maxLength":255,"pattern":"^[A-Za-z0-9\\s,.-]+$"},"businessRegistrationDate":{"type":"string","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$"},"merchantCategoryCode":{"$ref":"#/components/schemas/MerchantCodeEnumObj"},"rncCompletion":{"type":"boolean","enum":[true]}}}}}}},"ClientObj":{"type":"object","additionalProperties":false,"required":["client"],"properties":{"client":{"type":"object","description":"The client","additionalProperties":false,"required":["clientTransactionId","legalName","defaultPaymentExpiryDuration","payIDDomains","abn","settlementAccountFullLegalName"],"properties":{"id":{"type":"string","example":"731c04075258428730c3152a7904dda4","readOnly":true,"description":"The unique id for the new client. This client is created using the `clientTransactionId` so the client\nwill be replaced if the same value is sent which will return the same value for `id`.\n\nIt is recommended to record this id for later use.\n"},"clientTransactionId":{"type":"string","maxLength":36,"example":"30597959-a853-44d4-bdab-54332bf7a98e","description":"This 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"},"legalName":{"type":"string","maxLength":50,"minLength":1,"example":"Legal name","description":"The client legal name.\n"},"tradingName":{"type":"string","maxLength":50,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_ ]*$","example":"Legal name","description":"The client trading name.\n"},"additionalTradingNames":{"$ref":"#/components/schemas/AdditionalTradingNamesObj"},"defaultPaymentExpiryDuration":{"type":"number","minimum":60,"example":3600,"description":"The default expiry duration of a `PaymentRequest` in **minutes**.\n"},"payIDDomains":{"$ref":"#/components/schemas/PayIDDomainsObj"},"abn":{"type":"string","minLength":11,"maxLength":11,"pattern":"^\\d*$","example":"12345678901","description":"The Australian Business Number for the client.\n"},"settlementAccountBSB":{"type":"string","minLength":6,"maxLength":6,"pattern":"^\\d*$","example":"123456","description":"The BSB of the account used to sweep collected funds for this client.\n\nIt has to be provided if `settlementAccountNumber` is provided.\n"},"settlementAccountNumber":{"type":"string","minLength":5,"maxLength":9,"pattern":"^\\d*$","example":"123555555","description":"The Account Number (without the BSB) used to sweep collected funds for this client. By default funds\nwill be swept every day.\n\nIt has to be provided if `settlementAccountBSB` is provided.\n"},"settlementPayID":{"type":"string","format":"email","example":"myaccount@example.com","description":"Fill if the client funds are to be swept to a PayID instead of a BSB and Account Number. If provided both\n`settlementAccountBSB` and `settlementAccountNumber` will be ignored and this will be used.\n"},"settlementAccountFullLegalName":{"type":"string","maxLength":50,"minLength":1,"example":"Account legal name","description":"The legal name that is attached to the client's account.\n"},"sweepNotification":{"type":"object","additionalProperties":false,"description":"Populate this object if you would like Azupay to send a sweep notification webhook when Azupay settles\nto your account.\n","required":["authorizationHeader","url"],"properties":{"url":{"type":"string","pattern":"^https://","description":"Provide a https endpoint accessible over the internet\n"},"authorizationHeader":{"type":"string","description":"The value you want populated in the Authorization request header when Azupay calls the endpoint specified in the `url` field.\n"}}},"clientManagementNotification":{"type":"object","description":"Populate this object if you would like Azupay to send a notification webhook when the sub-merchant account is enabled.\n","additionalProperties":false,"required":["url","authorizationHeader"],"properties":{"url":{"type":"string","pattern":"^https://","description":"Provide a https endpoint accessible over the internet\n"},"authorizationHeader":{"type":"string","description":"The value you want populated in the Authorization request header when Azupay calls the endpoint specified in the `url` field.\n"}}},"topUpPayId":{"type":"string","format":"email","example":"topup1234@example.com","description":"The payID that can be used to topup the balance for the newly created client. This is a read only field\nonly provided in the response.\n","readOnly":true},"dashboardUserEmail":{"type":"string","format":"email","example":"myaccount@example.com","description":"If provided, this email will receive a message with a temporary \npassword to sign-in to the dashboard as an admin user. If the user is already exists and has not accepted\nchanged the password, it will resend the invite. Else if the user has an account and is attached to a\ndifferent clientId, the request will fail.\n"},"dashboardUserRole":{"type":"string","description":"The role for the dashboard user, if not supplied it will be defaulted to `ADMIN`. \nNote `FINANCE_WRITE` has been deprecated and replaced by `FINANCE_ADMIN`.\n","enum":["ADMIN","FINANCE_WRITE","FINANCE_ADMIN"]},"transactionPayoutLimit":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Defines the maximum amount (in AUD) for a single outbound payment that the client is allowed to process.","example":"500.00"},"dailyTransactionPayoutLimit":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Defines the maximum amount (in AUD) for the total value of outbound payments that the client is allowed to process within a single day.","example":"10000.00"},"kyc":{"type":"object","additionalProperties":false,"description":"KYC check object. *This property may be mandatory for some clients","required":["businessRegistrationDate","businessContactName","businessEmailAddress","businessPhoneNumber","businessRegisteredAddress","completion","websiteURL"],"properties":{"businessRegistrationDate":{"type":"string","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$"},"businessContactName":{"type":"string","maxLength":100,"minLength":1},"businessEmailAddress":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$"},"businessPhoneNumber":{"type":"string","pattern":"^\\+[0-9]{1,3}-[1-9]{1,1}[0-9]{1,29}$"},"businessRegisteredAddress":{"type":"string","maxLength":255,"minLength":10,"pattern":"^[A-Za-z0-9\\s,.-]+$"},"completion":{"type":"boolean"},"websiteURL":{"type":"string","minLength":1,"maxLength":255,"pattern":"^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$"},"instagramURL":{"type":"string","pattern":"^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$"},"facebookURL":{"type":"string","pattern":"^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$"},"linkedInProfileURL":{"type":"string","pattern":"^https?:\\/\\/([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$"},"acn":{"type":"string","minLength":9,"maxLength":9,"pattern":"^\\d{9}$","description":"Australian Company Number (ACN) must be provided if merchant is a registered company."},"companyIncorporationDate":{"type":"string","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$","description":"Company Incorporation Date must be provided if ACN is provided"},"afslNumber":{"type":"string","minLength":1,"maxLength":9,"pattern":"^\\d{1,9}$"},"merchantCategoryCode":{"$ref":"#/components/schemas/MerchantCodeEnumObj"}}},"keys":{"type":"array","readOnly":true,"description":"These are the API keys generated once the client is created. Keep in a secure place.\n","items":{"type":"object","required":["keyId","bcryptKeyHash"],"properties":{"keyId":{"type":"string","example":"SECR","description":"Unique identifier for the key"},"bcryptKeyHash":{"type":"string","example":"$2a$10$hi0NLji0sqAobZd0Lp7JKOBF0nc9U045jqf1co1fJSXb2C1KAVkkO","description":"The one way hash for the key."},"key":{"type":"string","readOnly":true,"description":"The actual value used on the `Authorization` header for the API.","example":"SECR_731c04075258428730c3152a7904d3333_rY6JxWL333SRGhPA"}}}}}}}},"apiKeysProvisionObj":{"type":"object","additionalProperties":false,"required":["permissions"],"properties":{"permissions":{"type":"array","items":{"type":"string","example":"RestAPI/POST/paymentRequest","description":"List of permissions for api key"}},"generateHMAC":{"type":"boolean"}}},"apiKeysProvisionResponseObj":{"type":"object","description":"Response object returned upon successful provisioning of a new API key. Contains the newly created API key details including credentials and permissions.\n","additionalProperties":false,"properties":{"keyID":{"type":"string","description":"A unique identifier assigned to the newly created API key.\n","example":"SECRE408AB"},"apiKey":{"type":"string","description":"The actual API key string that clients will use for authentication. This should be stored securely by the client, as it is only returned once.\n","example":"XXXXXXXXX_YYYYYYYYYY_ZZZZZZZZZZZ"},"hmacKey":{"type":"string","description":"The HMAC secret key associated with the API key, used for request signing. Like the apiKey, this should be treated as sensitive and stored securely.\n","example":"hmac_secret_XXXXXXXXX"},"enabled":{"type":"boolean","description":"Indicates whether the newly provisioned API key is active and usable.\n","example":true},"permittedOperations":{"type":"array","description":"A list of operations or permissions granted to this API key. These define what actions can be performed using the key.\n","items":{"type":"string","example":"RestAPI/POST/paymentRequest"},"example":["RestAPI/POST/paymentRequest","RestAPI/GET/paymentRequest"]}}},"GetApiKeyResponseObj":{"type":"object","description":"Response object that provides detailed information about an existing API key, including its current status, capabilities, and permissions.\n","additionalProperties":false,"properties":{"keyID":{"type":"string","description":"A unique identifier for the API key. This ID is used to reference and manage the key programmatically.\n","example":"SECRE408AB"},"hmacEnabled":{"type":"boolean","description":"Indicates whether HMAC-based authentication is enabled for this API key. If true, requests authenticated with this key must be signed using HMAC.\n","example":true},"enabled":{"type":"boolean","description":"Represents whether the API key is currently active and allowed to be used. If set to false, the key is considered disabled and cannot be used for authentication.\n","example":true},"permittedOperations":{"type":"array","description":"A list of operations that the API key is authorized to perform. These may correspond to specific API actions, endpoints, or permission scopes.\n","items":{"type":"string","example":"RestAPI/POST/paymentRequest"},"example":["RestAPI/POST/paymentRequest","RestAPI/GET/paymentRequest"]}}},"GetApiKeysResponseObj":{"type":"array","items":{"$ref":"#/components/schemas/GetApiKeyResponseObj"}},"ApiKeyUpdateObj":{"type":"object","description":"Object used to update API key state (Active / Disabled).\n","additionalProperties":false,"minProperties":1,"required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Indicates whether the API key is currently active. Set to `true` to enable the key, or `false` to disable it.\n","example":true}}},"ClientWebhookResponseObj":{"type":"object","required":["client"],"properties":{"client":{"type":"object","description":"The client","properties":{"enabled":{"type":"boolean","example":true,"description":"The status of the created sub-merchant\n"},"enabledDateTime":{"type":"string","format":"date-time","description":"Timestamp when the sub-merchant was created."},"id":{"type":"string","example":"731c04075258428730c3152a7904dda4","description":"The unique id for the new client. This client is created using the `clientTransactionId` so the client\nwill be replaced if the same value is sent which will return the same value for `id`.\n\nIt is recommended to record this id for later use.\n"},"legalName":{"type":"string","maxLength":50,"minLength":1,"example":"Legal name","description":"The client legal name.\n"}}}}},"LowBalanceThreshold":{"type":"object","additionalProperties":false,"required":["threshold"],"properties":{"threshold":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Defines the minimum balance amount (in AUD) that will trigger and alert.","example":"500.00"}}},"LowBalanceEmailAddresses":{"type":"object","additionalProperties":false,"required":["emailAddresses"],"properties":{"emailAddresses":{"type":"array","maxItems":5,"description":"Email addresses to send the alert to.","example":["user1@example.com"],"items":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}}}},"SetLowBalanceThreshold":{"type":"object","additionalProperties":false,"required":["threshold"],"properties":{"threshold":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Defines the minimum balance amount (in AUD) that will trigger and alert.","example":"500.00"}}},"SetLowBalanceEmailAddresses":{"type":"object","additionalProperties":false,"required":["emailAddresses"],"properties":{"emailAddresses":{"type":"array","maxItems":5,"minItems":0,"description":"Email addresses to send the alert to.","example":["user1@example.com"],"items":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}}}},"PayIDDomainsObj":{"type":"array","description":"A list of domain names that can be use for payIDs. Optionally use `merchantName` to control the payID\ndescription prefix.\n","minItems":1,"maxItems":10,"items":{"type":"object","additionalProperties":false,"required":["domain"],"properties":{"domain":{"type":"string","description":"The domain name for the PayID","pattern":"^\\b((?=[a-z0-9-]{1,63}\\.)[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,63}\\b$","example":"example.com"},"merchantName":{"type":"string","description":"This name will appear as a prefix for the PayID description that the payer sees","maxLength":50,"example":"Merchant Name"}}}},"AdditionalTradingNamesObj":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":140,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_ ]*$"},"example":["Trading Name","Trading Name Pty Ltd"],"description":"Additional trading names"},"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"]}}},"PaymentRequestObj":{"type":"object","additionalProperties":false,"required":["PaymentRequest"],"properties":{"PaymentRequest":{"type":"object","additionalProperties":false,"required":["clientId","clientTransactionId","paymentDescription"],"properties":{"payID":{"type":"string","minLength":5,"maxLength":50,"description":"Unique email PayID for this transaction. Value supplied here is the PayID used by your customer to make payment. If not supplied, Azupay will generate one automatically. The PayID's domain must match one of the configured domains for the client.","example":"dl-12345.abc@mymerchant.com.au","pattern":"^([a-z0-9_\\-\\.]+)@([a-z0-9_\\-\\.]+)\\.([a-z]+)$"},"payIDSuffix":{"type":"string","minLength":5,"maxLength":50,"description":"The email domain to use when Azupay generates the PayID. All domains must be validated and preconfigured by Azupay before they can be used. If supplied value is not configured an error is returned. If a PayID is supplied this value is ignored. If not supplied the default email domain configured in the system is used.","example":"otherdomain.com.au"},"clientId":{"type":"string","minLength":5,"maxLength":50,"description":"Id of the client creating the request for payment. This is supplied by Azupay and only changes between environments. For example, you might be allocated CLIENT1TEST for the UAT environment and CLIENT1 for production.","example":"CLIENT1"},"suggestedPayerDetails":{"$ref":"#/components/schemas/suggestedPayerDetailsObj"},"clientBranch":{"$ref":"#/components/schemas/clientBranch"},"clientTransactionId":{"type":"string","minLength":3,"maxLength":100,"description":"Unique Id for the transaction created by the merchant system","example":"TX5346423452345345"},"multiPayment":{"description":"When set to true and a paymentAmount has been set, we will allow multiple payments to be made to the PayID, up to the value of the paymentAmount. When set to false and a paymentAmount has not been set, the PayID can accept any number of payments for any amount. A refund will be issued automatically if a payment exceeds this amount.                 If multiPayment has not been set, the default is false.","type":"boolean"},"metaData":{"type":"object","additionalProperties":true,"description":"An object containing metadata about payment request."},"payerNotificationEmail":{"description":"Customer/Payer Email address to notify based on client configuration.","maxLength":140,"type":"string","format":"email"},"payerNotificationMobile":{"description":"Customer/Payer mobile number to notify based on client configuration. Must start with +61.","maxLength":20,"type":"string"},"paymentAmount":{"type":"number","description":"Amount in AUD requested to pay for the transaction. Not mandatory if multiPayment is true. If multiPayment is true then it can be set to accept adhoc payments up to this amount.","example":101.95,"minimum":0.01,"multipleOf":0.01},"paymentDescription":{"type":"string","minLength":5,"maxLength":140,"description":"Description of this transaction. It will be the last part of the PayID name that appears in the customer's online banking when they lookup the PayID. Must not contain any of the customer's personal information.\nThis description could be truncated to accommodate a maximum of 140 characters allowed on a PayID name so it is \nrecommended not to exceed 110 characters.\n","example":"Payment for Drivers' licence renewal."},"enableVirtualAccount":{"type":"boolean","description":"Enable virtual account for this payment request. This field is only applied if your client is configured to support virtual accounts."},"paymentExpiryDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment request expires and is no longer able to accept payments. The associated PayID is also de-registered within 48 hours of the specified time."},"checkoutUrl":{"description":"Share this url with your customer to request payment using a web interface and qr code. You can enable this feature by going to Azupay Client Dashboard > Apps and enabling the Checkout Web App.","type":"string","readOnly":true,"format":"url","example":"https://pay.azupay.com.au/checkout/123435"},"paymentNotification":{"type":"object","additionalProperties":false,"properties":{"paymentNotificationEndpointUrl":{"description":"An internet accessible url which azupay will invoke when the status of an inflight PaymentRequest has reached either \"COMPLETED\", \"FAILED\" or \"RETURNED\" status. The call will be done using the HTTP POST verb. The url should end in /paymentRequestStatus. The endpoint exposed by the client must be TLS 1.2 and the server certificate must be issued by a well known commercial certificate authority and that self-signed or internally signed certs are not acceptable.","type":"string","format":"url"},"paymentNotificationAuthorizationHeaderValue":{"description":"The string that azupay will put into the Authorization request header when making the paymentNotification call.","type":"string"}}},"lineItems":{"description":"An array of line items associated with the current payment request","type":"array","items":{}},"ultimatePayeeName":{"type":"string","minLength":1,"maxLength":140,"pattern":"^[a-zA-Z0-9\\-_ ]*$","description":"Used for specifying the name of the sub merchant for whom you are creating the PaymentRequest for."},"variant":{"type":"string","minLength":1,"maxLength":50,"description":"The Variant field will determine the type of checkoutURL in the response.</br>\nFor users who are not using Azupay UX, this field is optional and does not need to be provided.</br>\nIf the field is set to PayID, the checkoutURL will have the Payment Request - PayID App.</br>\nIf the field is set to 1Click, the checkoutURL will have the Payment Request - 1 Click App.</br>\n"},"suggestedPayerPayID":{"$ref":"#/components/schemas/SuggestedPayerPayIDObj"},"recurringPaymentAmount":{"type":"number","description":"Amount in AUD for recurring payments. Must be provided along with `recurringPaymentFrequency` \nand `paymentAmount` fields for recurring payment requests.\nThis field applies only when the Checkout\nApp V3 is enabled with payTo. Go to Dashboard -> Apps -> Checkout and enable V3 with PayId+PayTO.\nWhen this field is provided the Checkout App will create a PaymentAgreement with an initialPayment amount\ncorresponding to the `paymentAmount` and an amount corresponding to `recurringPaymentAmount` with frequency\nof `recurringPaymentFrequency`. You can obtain the `paymentAgreementId` from the `PaymentRequestStatus`\nto collect the recurring payments later.\n","example":500,"minimum":0.01,"multipleOf":0.01},"recurringPaymentFrequency":{"type":"string","description":"Frequency for recurring payments. Must be provided along with `recurringPaymentAmount` \nand and `paymentAmount` fields. This field applies only when the Checkout\nApp V3 is enabled with payTo. Go to Dashboard -> Apps -> Checkout and enable V3 with PayId+PayTO\n","enum":["FORTNIGHTLY","SEMIANNUAL","MONTHLY","QUARTERLY","WEEKLY","ANNUAL","ADHOC","DAILY"],"example":"MONTHLY"},"recurringPaymentType":{"type":"string","description":"Type of recurring payment agreement. FIXED means exact recurring amount (default behavior),\nVARIABLE means maximum recurring amount cap. When VARIABLE, the recurringPaymentAmount\nrepresents the maximum amount that can be charged, and paymentAmount (initial payment)\nmust not exceed this maximum. Defaults to FIXED if not specified.\n","enum":["FIXED","VARIABLE"],"example":"VARIABLE"},"recurringPaymentEndDate":{"type":"string","description":"Optional end date for the recurring payment agreement in YYYY-MM-DD format.\nMust be at least current date + 1 day (Australia/Sydney timezone).\nApplies to both FIXED and VARIABLE agreement types.\nEnables automatic agreement expiration without manual intervention.\n","pattern":"^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$","example":"2025-12-31"}}}}},"PaymentRequestStatusObj":{"type":"object","properties":{"PaymentRequestStatus":{"type":"object","required":["paymentRequestId","status","createdDateTime"],"additionalProperties":false,"properties":{"settledBy":{"type":"string","description":"Specifies how this PaymentRequest was completed","enum":["PayID","PayTo","BSBAndAccountNumber"]},"completedDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment was finalised in Azupay"},"createdDateTime":{"description":"Timestamp when the payment request was created","format":"date-time","type":"string"},"refundInformation":{"description":"This object is present when a partial 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","required":["refundTrigger"],"properties":{"dateTime":{"type":"string","format":"date-time","deprecated":true,"description":"Same as createdDateTime. Deprecated, Use `createdDateTime`"},"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. Replaces deprecated `dateTime`."},"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"]},"refundTrigger":{"description":"Channel that triggered this refund","type":"string","enum":["REFUND_API","PAYMENT_VALIDATION","WEBHOOK_ACTION"]}}}}}},"failureReason":{"description":"If status is failed or returned, this field will describe the reason for the failure.","type":"string"},"paymentRequestId":{"type":"string","description":"An identifier generated by Azupay. Used to reference the object in subsequent operations such as getPaymentRequest and refundPaymentRequest","example":"K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="},"rbaSettlementDatetime":{"description":"Timestamp when the payment was settled by the RBA","format":"date-time","type":"string"},"returnCompletedDatetime":{"type":"string","format":"date-time","deprecated":true,"description":"Timestamp when the last refund was completed to either COMPLETED or FAILED. Use the `completedDateTime` on  each individual refund request instead."},"returnInitiator":{"description":"AUTOMATIC for returns initiated by Azupay due to incorrect amount or duplicate payment. MANUAL for returns initiated by client due to product fulfillment or other client error.","enum":["AUTOMATIC","MANUAL"],"type":"string"},"parentPaymentRequestId":{"type":"string","description":"The paymentRequestId of a paymentRequest created with multiPayment set to true and for which this PaymentRequest was created and paid against.","example":"K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="},"status":{"description":"Status of the requested payment.","enum":["WAITING","EXPIRED","COMPLETE","RETURN_IN_PROGRESS","RETURN_COMPLETE","RETURN_FAILED"],"type":"string"},"amountReceived":{"type":"number","description":"The amount received from the customer"},"overpaymentAmount":{"type":"number","description":"When the payment Request is `multiPayment` and has a `paymentAmount` defined, the payer can\noverpay by mistake in which case the extra amount is refunded back to their account. This value represents\nthe extra amount that was refunded back to the payer. If the payment was for the exact amount, the value of this\nfield is zero.\nThis field will only be present when the payment request is in `COMPLETE` state.\n"},"payerPaymentDescription":{"description":"The description supplied by the payer when making the payment","type":"string"},"payerPaymentReference":{"description":"The reference supplied by the payer when making the payment","type":"string"},"failedPaymentAttempts":{"description":"This object is present when the payer has made invalid payments","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"attemptAmount":{"type":"number","description":"The amount"},"attemptDateTime":{"type":"string","description":"The date time"},"attemptFailureReason":{"type":"string","description":"The reason for payment failure"}}}},"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"}}},"nppTransactionId":{"description":"The identifier of the transaction in the NPP network. This is an identifier known by the initiating bank.","type":"string"},"virtualBsb":{"description":"The BSB that can be used to pay for this payment request","type":"string","pattern":"^\\d{6}$","minLength":6,"maxLength":6,"example":"123456"},"virtualAccountNumber":{"description":"The Account Number that can be used to pay for this payment request.","type":"string","pattern":"^\\d{5,9}$","minLength":5,"maxLength":9},"paidViaVirtualAccount":{"deprecated":true,"description":"Please use `settledBy` instead. This field will be true if this payment request was paid using the `virtualBsb` and `virtualAccountNumber` instead of the `payID`.","type":"boolean"},"paymentAgreementId":{"type":"string","minLength":1,"maxLength":40,"description":"ID of the payment agreement created for for this PaymentRequest.  This is only populated when a PayTo paymentInitiation is created using a paymentRequestId and completes successfully.","example":"K+9p4EE0rJnMtomRfWKWE2BnAboHP2KwgIPyEIA="}}}}},"PaymentRequestSearchObj":{"type":"object","additionalProperties":false,"properties":{"PaymentRequestSearch":{"type":"object","additionalProperties":false,"description":"Please note `clientTransactionId` and `clientBranch` can't be included in the same request with the other fields.\n\n`payID` can be included with date but not with the other fields\n","properties":{"clientTransactionId":{"$ref":"#/components/schemas/ClientTransactionIdObj"},"fromDate":{"$ref":"#/components/schemas/fromDateUTC"},"toDate":{"$ref":"#/components/schemas/toDateUTC"},"payID":{"type":"string","format":"email","example":"dl-12345.abc@mymerchant.com.au"},"clientBranch":{"$ref":"#/components/schemas/clientBranch"},"searchByDateType":{"type":"string","description":"Defines if the search will be based on the creation or completion date time. Default to CREATED_DESC","enum":["CREATED_DESC","COMPLETED_DESC"]}}}}},"BSBEnquiryObj":{"type":"object","additionalProperties":false,"required":["bsb"],"properties":{"bsb":{"description":"The BSB that is going to be validated against npp eligibility","maxLength":6,"minLength":6,"pattern":"^\\d{6}$","type":"string"}}},"AccountCheckObj":{"type":"object","additionalProperties":false,"required":["accountCheckId","bsb","accountNumber","accountName","purposeCode","additionalDetails"],"properties":{"accountCheckId":{"description":"The accountCheckId that is going to be used to track a cop lookup","type":"string","maxLength":100,"minLength":5,"pattern":"^[ -~]*$"},"bsb":{"description":"The BSB that is going to be used for cop lookup","maxLength":6,"minLength":6,"pattern":"^[0-9]*$","type":"string"},"accountNumber":{"description":"The accountNumber that is going to be used for cop lookup","maxLength":12,"minLength":4,"pattern":"^[0-9]*$","type":"string"},"accountName":{"description":"The accountName that is going to be used for cop lookup","maxLength":140,"minLength":1,"type":"string","pattern":"^[^\\s].*[^\\s]$"},"purposeCode":{"type":"string","description":"The purposeCode that declares the purpose of cop lookup","enum":["PYMT","PAYE","MAND","PIRQ","VADR"]},"additionalDetails":{"type":"object","description":"Additional details","additionalProperties":false,"required":["endUserId","endUserSessionId"],"properties":{"endUserId":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[ -~]*$"},"endUserSessionId":{"type":"string","minLength":1,"maxLength":34,"pattern":"^[ -~]*$"}}}}},"AccountCheckResponseObj":{"type":"object","required":["accountCheckResultCode","accountCheckResult"],"properties":{"displayAccountName":{"type":"string"},"accountCheckResultCode":{"type":"string"},"accountCheckResult":{"type":"string"},"errorReasonCode":{"type":"string"},"errorReasonDescription":{"type":"string"},"retryAdvice":{"type":"boolean","description":"Indicates whether the merchant should retry the CoP lookup. True for retryable errors (NAVL, RFSL, TMNY, TIME, TECH), false for non-retryable errors (BSBN, NCOP, OOUT, CNPF)."}}},"PayIDEnquiryObj":{"type":"object","additionalProperties":false,"required":["payID","payIDType"],"properties":{"payID":{"type":"string","minLength":1,"maxLength":140,"example":"johndoe@example.com","description":"The PayID to check."},"payIDType":{"type":"string","example":"EMAIL","description":"PayID Type. Valid Values:\n- 'PHONE’ Can be a mobile phone number or landline with area code\n- ‘EMAIL’ Email address\n- ‘ABN’ Australian Business Number\n- ‘ORG’ Organisation Name","enum":["PHONE","EMAIL","ABN","ORG"]},"bsb":{"type":"string","description":"Bsb to validate. If provided, `accountNumber` must be present."},"accountNumber":{"type":"string","description":"Account number to validate. If provided, `bsb` must be present."},"accountName":{"type":"string","minLength":1,"maxLength":140,"description":"Account name to check against the payId legal account name."}}},"PaymentObj":{"type":"object","additionalProperties":false,"required":["Payment"],"properties":{"Payment":{"type":"object","additionalProperties":false,"required":["payeeName","clientPaymentId","paymentAmount","paymentDescription"],"properties":{"clientPaymentId":{"description":"Unique Id for the payment created by the merchant system","type":"string","minLength":5,"maxLength":100,"pattern":"^[a-zA-Z0-9\\-_]*$","example":"c8ec39dc-2a70-4440-bc92-0e8f1b263d8f"},"payeeName":{"description":"The name of the Payee this payment is being sent to.","type":"string","pattern":"^[ -~]{1,140}$","example":"Mr John Smith or ABC Corp Pty Ltd"},"payID":{"type":"string","minLength":1,"maxLength":140,"description":"The PayID for this payment. Payer can supply either a PayID or BSB/Account Number  combination but not both.\n","example":"johndoe@example.com"},"payIDType":{"type":"string","description":"PayID Type. Only used when payment is addressed to a PayID. Valid Values:\n- 'PHONE’ Can be a mobile phone number or landline with area code. For example `+61-400000000\n- ‘EMAIL’ Email address\n- ‘ABN’ Australian Business Number\n- ‘ORG’ Organisation Name","enum":["PHONE","EMAIL","ABN","ORG"]},"bsb":{"description":"The BSB of the recipients bank. When using a BSB/Account number payments you should verify that the bsb is valid.\n","type":"string","pattern":"^[0-9]*$","minLength":6,"maxLength":6,"example":"012306"},"accountNumber":{"description":"The payee's account number at the receiving financial institution.","type":"string","pattern":"^[0-9]*$","minLength":4,"maxLength":12,"example":"12345678"},"paymentAmount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Amount in AUD to be paid to the Payee","example":"101.95"},"paymentDescription":{"description":"Description of this payment. Will appear as the payment description in the Payee's online banking and bank statement.","type":"string","minLength":5,"maxLength":280,"example":"Payment for wages August 2020."},"paymentReference":{"type":"string","maxLength":35,"description":"A reference to the payee so that they can easily identify the payer or purpose of the transaction\n","example":"ec6507a4-7f2c-4f41-b3b8-a989c222648d"},"ultimatePayerName":{"description":"The name of the ultimate payer. Lets you control the Payer description (visible to the payee) on the \npayment:\n- If not populated, then your business name will appear i.e. \"My business name\".\n- If populated, then the ultimate payer name will appear instead.\n","type":"string","pattern":"^[a-zA-Z0-9\\-_ ]*$","minLength":1,"maxLength":140,"example":"Mr John Smith or ABC Corp Pty Ltd"},"paymentNotification":{"description":"Definition of the endpoint used to notify about payment updates.","type":"object","additionalProperties":false,"required":["paymentNotificationAuthorizationHeaderValue","paymentNotificationEndpointUrl"],"properties":{"paymentNotificationEndpointUrl":{"description":"An internet accessible url which Azupay will invoke when the status of a Payment has reached  \"COMPLETE\" status. The call will be done using the HTTP POST method. The endpoint exposed by  the client must be TLS 1.2 and the server certificate must be issued by a well known commercial  certificate authority and that self-signed or internally signed certs are not acceptable.\n","type":"string","format":"url"},"paymentNotificationAuthorizationHeaderValue":{"description":"The string that Azupay will put into the Authorization request header when making the payment notification call.","type":"string"}}},"metaData":{"type":"object","additionalProperties":true,"description":"An object containing metaData field about the payment"}}}}},"PaymentStatusObj":{"type":"object","additionalProperties":false,"required":["PaymentStatus"],"properties":{"PaymentStatus":{"type":"object","required":["paymentId","status","createdDatetime"],"properties":{"paymentId":{"type":"string","description":"An identifier generated by Azupay. Used to reference the object in subsequent operations such as  getPayment.\n","example":"K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA=","readOnly":true},"status":{"type":"string","description":"Status of the requested payment.","readOnly":true,"enum":["CREATED","SETTLED","FAILED","PENDING","RETURNED"]},"createdDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment request was created.","readOnly":true},"settlementDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment was settled. Only if `status=SETTLED`.","readOnly":true},"completedDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment was processed by Azupay. Only for `status` different than `CREATED`.\n","readOnly":true},"failureReason":{"type":"string","description":"A reason code for a payment that is in `status=FAILED`.","example":"AG01","readOnly":true},"returnedReason":{"type":"string","description":"A reason code for a payment that is in `status=RETURNED`.","example":"AG01","readOnly":true},"returnedDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment was returned. Only if `status=RETURNED`.","readOnly":true},"currentBalance":{"type":"number","description":"The liquidity balance of the your account with Azupay. This balance is the funds remaining in your  account after the amount for this payment has been deducted. It is approximate only as other payments  processed in parallel will also have altered the available liquidity.\n","example":31050.95,"readOnly":true},"nppTransactionId":{"description":"The identifier of the transaction in the NPP network. This is an identifier visible to the receiving bank.","type":"string","readOnly":true},"sentViaDE":{"description":"This field is set to true when the payment was sent via the direct entry (DE) network. When true,  this payment may take between 3 and 5 business days to settle.","type":"boolean","readOnly":true}}}}},"BalanceObj":{"type":"object","properties":{"balance":{"type":"number","description":"The balance of your Azupay account in AUD.\n"}}},"MerchantCodeEnumObj":{"type":"string","enum":[7623,8931,7311,763,4511,4582,4119,7996,5937,5932,7998,8911,5971,5970,7531,7535,7538,5531,6011,5542,8675,5533,5532,9223,5462,7929,7230,7995,5940,7932,5551,4457,5942,5192,7933,4131,8244,7278,4899,5946,5441,7512,7542,5511,5521,1750,7217,5811,8398,5169,8351,5641,8049,8041,5993,8641,7349,7296,8220,5046,5139,7333,4111,4816,7372,7379,5734,5045,1771,5039,7392,8241,5977,7277,7997,4215,9211,7321,4411,5451,7911,7273,8021,5311,7393,5815,5817,5816,5818,5964,5965,5967,5960,5969,5966,5968,5962,5310,8011,5963,5714,5813,5912,5122,7216,5099,5309,5812,8299,5997,5552,5065,1731,7622,5732,8211,9702,7361,7394,7342,5651,5814,6012,9222,5718,5713,5992,5193,5422,5983,7261,7641,5712,5681,1520,5947,5231,5950,7992,7801,9399,7802,9406,7800,5411,5251,5072,7298,5975,1711,5945,5200,8062,7011,5722,5085,7375,6399,6300,9950,5944,780,7211,7210,8111,5948,5211,6010,4468,5262,1740,7297,8099,8071,5047,8699,5611,5691,5051,5699,5599,7399,5499,5399,7299,5719,2741,7999,7699,5999,5271,7832,4214,5592,5013,5571,5561,5733,5994,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6540,5199,5261,8050,5021,8043,8042,5976,8031,5921,5198,7523,4112,5933,5995,5172,7395,7221,5044,7829,5131,5074,8651,9402,5094,8999,4225,7338,4011,6513,5735,7519,5973,8661,6530,1761,7339,6211,5541,5949,7251,5661,7629,5598,1799,2842,5941,7032,7941,5655,5972,5111,5943,5996,4723,5697,9311,7276,4121,4812,4814,4821,5998,8734,7922,7012,7534,4784,7991,7549,7033,4789,4722,7511,7513,2791,5978,9405,5137,5931,4900,5331,742,7993,7994,7841,8249,7631,7692,5300,5698,4829,5631,5621,5935]},"BalanceAdjustmentObj":{"type":"object","additionalProperties":false,"required":["BalanceAdjustment"],"properties":{"BalanceAdjustment":{"type":"object","additionalProperties":false,"required":["adjustmentAmount","adjustmentType","reason","clientTransactionId","clientId"],"properties":{"clientTransactionId":{"type":"string","minLength":5,"maxLength":100,"description":"Unique Id for this balance adjustment","example":"TX5346423452345345"},"adjustmentAmount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$","description":"Amount in AUD to be adjusted.","example":"101.95"},"adjustmentType":{"type":"string","description":"The adjustment type to be either CREDIT or DEBIT.","enum":["CREDIT","DEBIT"]},"reason":{"type":"string","pattern":"^[a-zA-Z0-9 .,]*$","maxLength":50,"minLength":5,"description":"The reason for the possible adjustment to the balances."},"clientId":{"type":"string","pattern":"^[a-zA-Z0-9]*$","maxLength":50,"minLength":5}}}}},"BalanceAdjustmentStatusObj":{"type":"object","properties":{"BalanceAdjustmentStatus":{"type":"object","required":["balanceAdjustmentId"],"properties":{"balanceAdjustmentId":{"readOnly":true,"type":"string","description":"The balance adjustment id.\n"}}}}},"AccountStatusObj":{"type":"object","properties":{"AccountStatus":{"type":"object","required":["nppReachable","paytoReachable"],"properties":{"nppReachable":{"type":"boolean","description":"True if the account can accept deposits via NPP. Does not check if the account is closed or has \nsanctions that may prevent deposits clearing.\n"},"accountServices":{"type":"array","items":{"type":"string","example":"x2p1"},"description":"List of NPP services that can be used to send to deposits to this account. eg x2p1- OSKO, \nsct- Single Credit Transfer.\n"},"validBsb":{"type":"boolean","description":"Whether the bsb provided in the parameter matches with the account attached to the PayID"},"validAccountNumber":{"type":"boolean","description":"Whether the accountNumber provided in the parameter matches with the account attached to the PayID\n"},"bic11":{"type":"string","description":"The BIC11 of the bank where the account is held. Only provided when both `bsb` and `accountNumber` is \nprovided in the parameters\n"}}}}},"AccountStatusExtraForBSBObj":{"type":"object","properties":{"AccountStatus":{"type":"object","properties":{"paytoReachable":{"type":"boolean","description":"True if the BSB is PayTo reachable."}}}}},"AccountStatusExtraForPayIdObj":{"type":"object","properties":{"AccountStatus":{"type":"object","properties":{"paytoReachable":{"type":"boolean","description":"True if the PayID is PayTo reachable."},"aliasName":{"type":"string","description":"The alias name registered against the PayID."},"validAccountName":{"type":"boolean","description":"Whether the accountName provided in the parameter matches with the legal account name attached to the PayID\n"}}}}},"PaymentRequestSearchResponseObj":{"type":"object","allOf":[{"$ref":"#/components/schemas/PaymentRequestObj"},{"$ref":"#/components/schemas/PaymentRequestStatusObj"}]},"PaymentAgreementSearchResponseObj":{"type":"object","allOf":[{"$ref":"#/components/schemas/PaymentAgreementObj"},{"$ref":"#/components/schemas/PaymentAgreementStatusObj"}]},"PaymentAgreementSearchObj":{"type":"object","additionalProperties":false,"properties":{"PaymentAgreementSearch":{"type":"object","description":"Please note `paymentAgreementId`, `contractId` and date fields can't be  included in the same request","additionalProperties":false,"properties":{"fromDate":{"$ref":"#/components/schemas/fromDateUTC"},"toDate":{"$ref":"#/components/schemas/toDateUTC"},"paymentAgreementId":{"type":"string","minLength":1,"maxLength":40,"description":"ID of the payment agreement being searched.","example":"K+9p4EE0rJnMtomRfWKWE2BnAboHP2KwgIPyEIA="},"contractId":{"$ref":"#/components/schemas/ContractIdObj"}}}}},"PaymentInitiationSearchResponseObj":{"type":"object","allOf":[{"$ref":"#/components/schemas/PaymentInitiationObj"},{"$ref":"#/components/schemas/PaymentInitiationStatusObj"},{"$ref":"#/components/schemas/PaymentAgreementObj"}]},"PaymentInitiationSearchObj":{"type":"object","additionalProperties":false,"properties":{"PaymentInitiationSearch":{"type":"object","additionalProperties":false,"properties":{"clientTransactionId":{"type":"string","minLength":5,"maxLength":100,"description":"Unique Id for the transaction created by the merchant system.\n\nPlease note `clientTransactionId` and date fields can't be included in the same request.\n","example":"30597959-a853-44d4-bdab-54332bf7a98e"},"fromDate":{"$ref":"#/components/schemas/fromDateUTC"},"toDate":{"$ref":"#/components/schemas/toDateUTC"}}}}},"PaymentSearchResponseObj":{"type":"object","allOf":[{"$ref":"#/components/schemas/PaymentObj"},{"$ref":"#/components/schemas/PaymentStatusObj"}]},"PaymentSearchObj":{"type":"object","properties":{"PaymentSearch":{"type":"object","properties":{"clientPaymentId":{"type":"string","pattern":"^[a-zA-Z0-9\\-_]*$","minLength":5,"maxLength":100,"description":"Unique Id for the payment created by the merchant system","example":"c8ec39dc-2a70-4440-bc92-0e8f1b263d8f"},"fromDate":{"$ref":"#/components/schemas/fromDateUTC"},"toDate":{"$ref":"#/components/schemas/toDateUTC"}},"additionalProperties":false}}},"PayerDetailsObj":{"type":"object","description":"Provide either `payIDDetails` or `bankAccountDetails`\n","additionalProperties":false,"properties":{"name":{"type":"string","description":"The payer's name","minLength":1,"maxLength":100,"example":"Jane Smith","pattern":"^[!-~]+( [!-~]+)*$"},"type":{"type":"string","description":"Whether payer is a person or organisation. Defaults to 'Person'.","enum":["Person","Organisation"]},"payIDDetails":{"description":"PayID Details","type":"object","required":["payID","payIDType"],"properties":{"payID":{"$ref":"#/components/schemas/PayIDObj"},"payIDType":{"type":"string","example":"EMAIL","description":"PayID Type. Valid Values:\n- 'PHONE’ Can be a mobile phone number or landline with area code\n- ‘EMAIL’ Email address\n- ‘ABN’ Australian Business Number\n- ‘ORG’ Organisation Name","enum":["PHONE","EMAIL","ABN","ORG"]}}},"bankAccountDetails":{"description":"Bank Account Details","type":"object","additionalProperties":false,"required":["bsb","accountNumber"],"properties":{"bsb":{"$ref":"#/components/schemas/BsbObj"},"accountNumber":{"$ref":"#/components/schemas/AccountNumberObj"}}}}},"PayeeDetailsObj":{"type":"object","description":"Payee Details","properties":{"becsUserId":{"type":"string","description":"The BECS user ID related to the migrating Direct Debit Authority (DDR) over to a Payment Agreement. Only populate this field if it is for a migration request.\n","minLength":1,"maxLength":6,"pattern":"^[a-zA-Z0-9]*$","example":123456},"payeeName":{"$ref":"#/components/schemas/agreementPayeeName"}}},"PaymentAgreementAmendmentObj":{"type":"object","required":["PaymentAgreementAmendment"],"properties":{"PaymentAgreementAmendment":{"type":"object","required":["paymentAgreementId","clientTransactionId"],"properties":{"clientTransactionId":{"$ref":"#/components/schemas/ClientTransactionIdObj"},"paymentAgreementId":{"type":"string","description":"ID of the payment agreement being amended","example":"K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="},"commonDetails":{"type":"object","description":"Details of a Payment Agreement that can be amended without approval from the payer. Cannot be provided at the same time with \n`agreementDetails`. This feature is not enabled by default. Please contact support to allow amendment of these details.\n","properties":{"description":{"$ref":"#/components/schemas/agreementDescription"},"payeeName":{"$ref":"#/components/schemas/agreementPayeeName"}}},"agreementDetails":{"type":"object","description":"Agreement Details that need approval from the payer. Cannot be provided at the same time with `commonDetails`.\n","properties":{"usageBasedAgreementDetails":{"type":"object","description":"Usage Based Agreement Details for Amendment","properties":{"endDate":{"$ref":"#/components/schemas/endDate"},"maximumAmount":{"$ref":"#/components/schemas/maximumAmount"},"frequency":{"$ref":"#/components/schemas/frequency"}}},"variableAgreementDetails":{"type":"object","description":"Variable Agreement Details for Amendment","properties":{"endDate":{"$ref":"#/components/schemas/endDate"},"maximumAmount":{"$ref":"#/components/schemas/maximumAmount"},"frequency":{"$ref":"#/components/schemas/frequency"}}},"fixedAgreementDetails":{"type":"object","description":"Fixed Agreement Details for Amendment","properties":{"endDate":{"$ref":"#/components/schemas/endDate"},"firstPaymentAmount":{"$ref":"#/components/schemas/firstPaymentAmount"},"amount":{"$ref":"#/components/schemas/amount"},"frequency":{"$ref":"#/components/schemas/frequency"}}},"balloonAgreementDetails":{"type":"object","description":"Balloon Agreement Details for Amendment","properties":{"lastPaymentDate":{"$ref":"#/components/schemas/lastPaymentDate"},"lastPaymentAmount":{"$ref":"#/components/schemas/lastPaymentAmount"},"amount":{"$ref":"#/components/schemas/amount"},"frequency":{"$ref":"#/components/schemas/frequency"}}}}},"paymentAgreementAmendmentNotification":{"$ref":"#/components/schemas/NotificationObj"},"additionalDetails":{"$ref":"#/components/schemas/AdditionalDetailsObj"}},"additionalProperties":false}},"additionalProperties":false},"PaymentAgreementObj":{"type":"object","required":["PaymentAgreement"],"properties":{"PaymentAgreement":{"type":"object","required":["clientId","clientTransactionId","payerDetails","paymentAgreementType","description","agreementDetails"],"properties":{"clientId":{"$ref":"#/components/schemas/ClientIdObj"},"additionalDetails":{"$ref":"#/components/schemas/AdditionalDetailsObj"},"contractId":{"$ref":"#/components/schemas/ContractIdObj"},"clientTransactionId":{"$ref":"#/components/schemas/ClientTransactionIdObj"},"paymentAgreementNotification":{"$ref":"#/components/schemas/NotificationObj"},"conditionsOfPayment":{"type":"string","pattern":"^[ -~]{1,140}$","minLength":1,"maxLength":140},"agreementExpiryMinutes":{"$ref":"#/components/schemas/AgreementExpiryMinutesObj","description":"Indication of conditions of sale, references to terms and conditions or Product Disclosure Statement as agreed between parties."},"payerDetails":{"$ref":"#/components/schemas/PayerDetailsObj"},"payeeDetails":{"$ref":"#/components/schemas/PayeeDetailsObj"},"paymentAgreementType":{"type":"string","enum":["MORTGAGE","UTILITY","LOAN","DEPENDANT SUPPORT","GAMBLING","RETAIL","SALARY","PERSONAL","GOVERNMENT","PENSION","TAX","OTHER SERVICE"]},"description":{"$ref":"#/components/schemas/agreementDescription"},"variant":{"type":"string","enum":["API","1Click"]},"agreementDetails":{"type":"object","description":"Agreement Details","properties":{"fixedAgreementDetails":{"type":"object","description":"Fixed Agreement Details","additionalProperties":false,"required":["startDate","frequency","amount"],"properties":{"startDate":{"$ref":"#/components/schemas/StartDateObj"},"endDate":{"$ref":"#/components/schemas/endDate"},"firstPaymentAmount":{"$ref":"#/components/schemas/firstPaymentAmount"},"amount":{"$ref":"#/components/schemas/amount"},"frequency":{"$ref":"#/components/schemas/frequency"},"countPerPeriod":{"$ref":"#/components/schemas/countPerPeriod"}}},"balloonAgreementDetails":{"type":"object","description":"Balloon Agreement Details","additionalProperties":false,"required":["startDate","frequency"],"properties":{"startDate":{"$ref":"#/components/schemas/StartDateObj"},"lastPaymentDate":{"$ref":"#/components/schemas/lastPaymentDate"},"lastPaymentAmount":{"$ref":"#/components/schemas/lastPaymentAmount"},"amount":{"$ref":"#/components/schemas/amount"},"frequency":{"$ref":"#/components/schemas/frequency"},"countPerPeriod":{"$ref":"#/components/schemas/countPerPeriod"}}},"usageBasedAgreementDetails":{"type":"object","additionalProperties":false,"required":["startDate","frequency"],"properties":{"maximumAmount":{"$ref":"#/components/schemas/PayToAmountObj"},"startDate":{"$ref":"#/components/schemas/StartDateObj"},"endDate":{"$ref":"#/components/schemas/endDate"},"frequency":{"$ref":"#/components/schemas/frequency"},"countPerPeriod":{"$ref":"#/components/schemas/countPerPeriod"}}},"variableAgreementDetails":{"type":"object","description":"Variable Agreement Details","additionalProperties":false,"required":["startDate","frequency"],"properties":{"startDate":{"$ref":"#/components/schemas/StartDateObj"},"endDate":{"$ref":"#/components/schemas/endDate"},"maximumAmount":{"$ref":"#/components/schemas/maximumAmount"},"frequency":{"$ref":"#/components/schemas/frequency"},"countPerPeriod":{"$ref":"#/components/schemas/countPerPeriod"}}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"PaymentAgreementStatusObj":{"type":"object","required":["PaymentAgreementStatus"],"properties":{"PaymentAgreementStatus":{"type":"object","required":["paymentAgreementId","status","createdDatetime"],"properties":{"paymentAgreementId":{"$ref":"#/components/schemas/azupayId"},"registrationDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment agreement was registered"},"status":{"type":"string","description":"Status of the requested payment agreement.","enum":["CREATED","ACTIVE","SUSPENDED","CANCELLED","FAILED"]},"previousStatus":{"type":"string","description":"Previous status of the requested payment agreement.","enum":["CREATED","ACTIVE","SUSPENDED"]},"lastStatusBy":{"type":"string","description":"The party who last changed the status.","enum":["MERCHANT","PAYER","AZUPAY"]},"payerBsb":{"type":"string","description":"The BSB of the payer"},"reasonDescription":{"type":"string","example":"The account has been closed and the Mandate is no longer valid.","description":"The reasonCode description (a detailed list is available under the `reasonCode` field)."},"reasonCode":{"type":"string","example":"NARR","description":"A reason code for a payment agreement that was initially ACTIVE/CREATED then CANCELLED\n\n| `reasonCode` | Description                                                                                                                                                                                                                                                                                                                                                                         |\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| AC02         | Account to be debited does not exist within NPP and outside of NPP and cannot be reached by any other payment method. This code is also to be used when a Participant attempts to resolve a Debtor PayID and no account details are returned.                                                                                                                                       |\n| AC04         | The account has been closed and the Mandate is no longer valid.                                                                                                                                                                                                                                                                                                                     |\n| AC05         | The Payer Customer Account number is closed and the Mandate is no longer valid.                                                                                                                                                                                                                                                                                                     |\n| AC06         | Account is temporarily blocked where it can identify that the Account currently exists.                                                                                                                                                                                                                                                                                              |\n| AC13         | Account to be debited cannot debit funds within NPP where it is able to identify that the Account currently exists.                                                                                                                                                                                                                                                                 |\n| AG01         | Account to be debited is unable to be debited where it can identify that the Account currently exists                                                                                                                                                                                                                                                                               |\n| AG03         | Where a Mandate has been amended by the Initiating Participant such that payment initiation (the combination of debtor account and creditor account) resolves to an Account type that is not supported for sending or receiving NPP Payments.                                                                                                                                       |\n| AM03         | Account to be debited cannot draw funds in AUD where it is able to identify that the Account currently exists.                                                                                                                                                                                                                                                                      |\n| AM12         | No amount and/or no maximum amount are specified in the Mandate.                                                                                                                                                                                                                                                                                                                    |\n| AM14         | The specified Mandate amount (when supplied) exceeds the allowed transaction amount for the account for the specified Mandate. This code is appropriate in instances when account limits change, impacting Mandates referencing that account.                                                                                                                                       |\n| CTAM         | Mandate suspended due to amendment of the contract.                                                                                                                                                                                                                                                                                                                                 |\n| CTCA         | Mandate suspended due to cancellation of the contract, requested by the debtor.                                                                                                                                                                                                                                                                                                     |\n| CTEX         | Mandate suspended due to the contract that expired.                                                                                                                                                                                                                                                                                                                                 |\n| MCFC         | Mandate suspended as final collection took place.                                                                                                                                                                                                                                                                                                                                   |\n| MCOC         | Mandate suspended as the once off collection took place.                                                                                                                                                                                                                                                                                                                            |\n| MD07         | End customer is deceased.                                                                                                                                                                                                                                                                                                                                                           |\n| MD08         | The Mandate Service is no longer supported by the Agent                                                                                                                                                                                                                                                                                                                             |\n| MD09         | The Payer Customer or Payer Customer Account does not support the Mandate or no longer supports Mandate Services. For example, based on the Mandate purpose code, the Payer Customer may be ineligible for the Mandate service requested (e.g.: use of gambling-type Mandates are not permitted where it is identified that a Payer Customer is a minor or a vulnerable customer).  |\n| MD16         | Cancellation/amendment requested by the debtor                                                                                                                                                                                                                                                                                                                                      |\n| MD17         | Cancellation/amendment requested by the creditor or by the initiating party                                                                                                                                                                                                                                                                                                         |\n| MD20         | Mandate cancellation following validity expiration                                                                                                                                                                                                                                                                                                                                  |\n| MS02         | Reason has not been specified by end customer                                                                                                                                                                                                                                                                                                                                       |\n| MS03         | Reason has not been specified by agent.                                                                                                                                                                                                                                                                                                                                             |\n| MSUC         | Mandate suspended after 7 consecutive unsuccessful collections.                                                                                                                                                                                                                                                                                                                     |\n| NARR         | Technical error encountered                                                                                                                                                                                                                                                                                                                                                         |\n| NOAS         | Participant received no response from beneficiary (to authorise or reject a Mandate creation or amendment request).                                                                                                                                                                                                                                                                 |\n| RR04         | The Mandate is suspended or cancelled due to regulatory reasons (e.g. Sanctions, AML).                                                                                                                                                                                                                                                                                              |\n| SL01         | Due to specific service offered by the Debtor Agent                                                                                                                                                                                                                                                                                                                                 |\n| SL11         | The Mandate is suspended or cancelled due to the Payee or the Initiating Party nominated in the Mandate not being included or being removed from the Payer Customer’s “whitelist”.                                                                                                                                                                                                  |\n| SL12         | The Mandate is suspended or cancelled due to the Payee or the Initiating Party nominated in the Mandate being included on the Payer Customer’s “blacklist”.                                                                                                                                                                                                                         |\n"},"failureCode":{"type":"string","example":"AZP2.1","description":"A failure code for a payment agreement that is in `status=FAILED`. The codes are:\n\n| `failureCode` | `failureReason`                                                              |\n|---------------|------------------------------------------------------------------------------|\n| AZP2.1        | \tAn error has occurred with this Payment Agreement. Please contact support. |\n| AZP2.2        | \tThe payer account is not eligible for PayTo payments.                      |\n| AZP2.3        | \tThe payer account is not eligible for NPP payments.                        |\n| AZP2.4        | \tPayee alias details are invalid.                                           |\n| AZP3.1        | \tLast payment date must be equal to or after start date.                    |\n| AZP3.2        | \tStart date must be today or future dated.                                  |\n| AZP3.3        | \tEnd date must be equal to or after start date.                             |\n| AZP4.1        | \tRequest Timed Out. Please Try again.                                       |\n| AZP4.2        | \tPossible NPP outage. Please try again later.                               |\n| AZP9.9        | \tFatal Error. Please contact support.                                       |\n"},"failureReason":{"type":"string","example":"An error has occurred with this Payment Agreement","description":"A reason message for a payment agreement that is in `status=FAILED`."},"createdDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment agreement was created"},"cancelledDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment agreement was cancelled"},"bilateralAmendment":{"type":"object","properties":{"inProgress":{"type":"boolean","description":"True if bilateral amendment of payment agreement is in progress"},"paymentAgreementAmendmentId":{"type":"string","description":"ID of the last amendment for reference"}}},"unilateralAmendment":{"type":"object","properties":{"paymentAgreementAmendmentId":{"type":"string","description":"ID of the last amendment for reference"}}},"changeStatusAmendment":{"type":"object","properties":{"inProgress":{"type":"boolean","description":"True if payment agreement change status is in progress"},"paymentAgreementAmendmentId":{"type":"string","description":"ID of the last amendment for reference"}}},"nppAgreementId":{"type":"string","description":"The npp agreement id. A npp wide identifier used between banks, businesses and payment facilitators \nsuch as Azupay to reference a PayTo agreement. This identifier is made available shortly after the \ninitial creation of an agreement either via webhook or by querying existing agreement objects using \nthe API.\n"}}}}},"PaymentAgreementAmendmentStatusObj":{"type":"object","required":["PaymentAgreementAmendmentStatus"],"properties":{"PaymentAgreementAmendmentStatus":{"type":"object","required":["paymentAgreementAmendmentId","amendmentStatus","createdDatetime"],"properties":{"paymentAgreementAmendmentId":{"$ref":"#/components/schemas/azupayId"},"bilateralAmendmentStatus":{"type":"string","description":"Use `amendmentStatus` instead.","deprecated":true,"enum":["PENDING","COMPLETED","DECLINED","RECALLED","TIMEDOUT"]},"amendmentStatus":{"type":"string","description":"Status of the requested payment agreement amendment.","enum":["PENDING","COMPLETED","DECLINED","RECALLED","TIMEDOUT"]},"createdDatetime":{"type":"string","format":"date-time","description":"Timestamp when the payment agreement amendment was created"},"completedDatetime":{"type":"string","format":"date-time","description":"Timestamp when the amend payment agreement was completed.\nOnly for `amendmentStatus` different than `PENDING`.\n"}}}}},"PaymentAgreementRequestObj":{"type":"object","additionalProperties":false,"properties":{"PaymentAgreementRequest":{"type":"object","additionalProperties":false,"required":["clientTransactionId"],"properties":{"clientTransactionId":{"type":"string","minLength":5,"maxLength":36},"agreementMaximumAmount":{"$ref":"#/components/schemas/amount"},"agreementStartDate":{"$ref":"#/components/schemas/StartDateObj"},"agreementEndDate":{"$ref":"#/components/schemas/endDate"},"agreementFrequency":{"$ref":"#/components/schemas/frequency"},"agreementDescription":{"$ref":"#/components/schemas/agreementDescription"},"agreementCountPerPeriod":{"$ref":"#/components/schemas/countPerPeriod"},"suggestedPayerDetails":{"$ref":"#/components/schemas/suggestedPayerDetailsObj"},"paymentAgreementRequestNotification":{"$ref":"#/components/schemas/NotificationObj"}}}}},"PaymentAgreementRequestStatusObj":{"type":"object","properties":{"PaymentAgreementRequestStatus":{"type":"object","required":["paymentAgreementId","sessionUrl"],"properties":{"paymentAgreementId":{"type":"string","description":"Payment Agreement Id that can be used with the Payment Initiation API or batch.  This Id will only be valid once the payer has completed the one-time UX experience on the `sessionUrl` successfully.","example":"K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="},"sessionUrl":{"description":"Url link to a one-time UX experience that enables payers to create and approve a PayTo Agreement.  Attach encoded `redirectURL` and `cancelRedirectURL` as query parameters. If the `redirectURL` is invoked,  then the `paymentAgreementId` can be used later to take payments. If `cancelRedirectURL` is invoked a new `sessionUrl` must be generated for the payer to try again.","type":"string","readOnly":true,"format":"url","example":"https://pay.azupay.com.au/checkout/123435"}}}}},"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](/guide/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"]}}}}}}}}}},"PayToErrorModel":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"details":{"type":"object","description":"An object containing details of the error\n","properties":{"failureCode":{"type":"string","example":"AZP5.1","description":"A failure code for the error response.\nFor the full list, please refer to the\n[Failure Codes and Failure Reasons](/guide/receiving-recurring-payments.html#failure-codes-and-failure-reasons) page\n"},"failureReason":{"type":"string","example":"PayID format is incorrect","description":"A reason message for the error response\nFor the full list, please refer to the\n[Failure Codes and Failure Reasons ](/guide/receiving-recurring-payments.html#failure-codes-and-failure-reasons) page\n"}}}}},"ReportListModel":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2020-01"},"reports":{"type":"array","items":{"type":"object","properties":{"reportId":{"type":"string"},"type":{"type":"string","enum":["MT940","Transaction Report","Billing Report"]},"fromDate":{"$ref":"#/components/schemas/fromDateWithTZO"},"toDate":{"$ref":"#/components/schemas/toDateWithTZO"},"clientId":{"type":"string"},"moreResultsPossible":{"type":"boolean","description":"Optional field. Only applicable if `startDate` and `endDate` are supplied.\n\n**true** if the provided range (`startDate` - `endDate`) resulted in report's result-set that \nexceed the allowed maximum records (10,000)\n\nWhen it is true, our recommendation is to narrow the range (`startDate` - `endDate`) and retry\n"}},"required":["reportId","type","fromDate","toDate","clientId"]}}}},"ReportLinkModel":{"type":"object","properties":{"reportUrl":{"type":"string"}},"required":["reportUrl"]},"fromDateUTC":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"The report date in ISO date/time string format in UTC","example":"2021-10-18T02:32:30.693Z"},"toDateUTC":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"The report date in ISO date/time string format in UTC","example":"2021-10-18T02:32:30.693Z"},"clientBranch":{"type":"string","minLength":5,"maxLength":50,"description":"Optional branch identifier within the client","example":"BRANCH1"},"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"},"agreementPayeeName":{"type":"string","maxLength":140,"minLength":1,"pattern":"^[ -~]*$","description":"Lets you control the Payee description (visible to they payer) on the payment agreement:\n* If not populated, then your business name will appear i.e. \"My business name\".\n* If populated, then your business appears as a facilitator so the description will read something like \"My business name on behalf of `payeeName`\".\n"},"agreementDescription":{"type":"string","minLength":5,"maxLength":140,"pattern":"^[ -~]*$","description":"Description of the Payment Agreement visible to the payer."},"nextPageIdResponse":{"type":"string","description":"If there are more results you can invoke this search again by providing the nextPageId in\nthe query parameters to retrieve the next set of results.\n"},"recordCount":{"type":"number","description":"The number of records that were retrieved."},"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}}},"SweepRequestObj":{"type":"object","additionalProperties":false,"required":["SweepRequest"],"properties":{"SweepRequest":{"additionalProperties":false,"required":["amount","clientTransactionId"],"properties":{"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{2})$"},"clientTransactionId":{"type":"string","minLength":5,"maxLength":100,"pattern":"^[a-zA-Z0-9\\-]*$"}}}}},"SuggestedPayerPayIDObj":{"type":"string","minLength":1,"maxLength":140,"example":"0400123123","description":"Note `SuggestedPayerPayID` has been deprecated and replaced by `SuggestedPayerDetails`.\nThe payer's PayID. Valid examples are `0432123321` (mobile) and `jane.smith@example.com` (email).\nUse this field to pre-populate the payID that gets entered within a 1Click transaction.\nThis can only be used with a payment request with the variant 1Click.\n"},"PayIDDetailsObj":{"type":"object","additionalProperties":false,"required":["payID"],"properties":{"payID":{"$ref":"#/components/schemas/PayerPayIDObj"}}},"PayerPayIDObj":{"type":"string","minLength":1,"maxLength":140,"example":"0400123123","description":"The payer's PayID. Valid examples are `0432123321` (mobile) and `jane.smith@example.com` (email).\n"},"BsbObj":{"type":"string","description":"The BSB of the account number","minLength":6,"maxLength":6,"pattern":"^\\d*$","example":"123456"},"AccountNumberObj":{"type":"string","description":"The Account Number (without the BSB)","minLength":4,"maxLength":9,"pattern":"^\\d*$","example":"123555555"},"AccountNameObj":{"type":"string","description":"The Account Name","minLength":1,"maxLength":100,"pattern":"[^\\x00-\\x1F\\x7F]+","example":"Jane Doe"},"ClientConfigObj":{"type":"object","required":["webhooks"],"additionalProperties":false,"properties":{"webhooks":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","required":["id","webhooksOn"],"additionalProperties":false,"properties":{"id":{"type":"string","enum":["default"]},"webhooksOn":{"type":"array","items":{"type":"string","enum":["PaymentRequest.WAITING","PaymentRequest.EXPIRED","PaymentRequest.COMPLETE","PaymentRequest.RETURN_IN_PROGRESS","PaymentRequest.RETURN_COMPLETE","PaymentRequest.RETURN_FAILED","Payment.CREATED","Payment.SETTLED","Payment.FAILED","Payment.PENDING","Payment.RETURNED","PaymentAgreement.CREATED","PaymentAgreement.ACTIVE","PaymentAgreement.SUSPENDED","PaymentAgreement.CANCELLED","PaymentAgreement.FAILED","PaymentAgreementAmendment.PENDING","PaymentAgreementAmendment.COMPLETED","PaymentAgreementAmendment.DECLINED","PaymentAgreementAmendment.RECALLED","PaymentAgreementAmendment.TIMEDOUT","PaymentInitiation.CREATED","PaymentInitiation.SETTLED","PaymentInitiation.FAILED","PaymentInitiation.PENDING","PaymentInitiation.RETURN_IN_PROGRESS","PaymentInitiation.RETURN_FAILED","PaymentInitiation.RETURN_COMPLETE"]}}}}}}}}},"paths":{"/clients":{"post":{"callbacks":{"SweepRequestEvent":{"{client.sweepNotification.url}":{"post":{"summary":"SweepRequest Status Event","description":"If the merchant specifies values for the\n`client.sweepNotification.url` object during the createClient invocation, then a notification\nwill be sent to the merchant system when the funds have settled.\n\nThe event will use `sweepNotification.url` as endpoint and\n`sweepNotification.authorizationHeader` as `Authorization` header.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{client/sweepNotification/authorizationHeader}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentObj"},{"$ref":"#/components/schemas/PaymentStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}},"ClientEnabledEvent":{"{client.clientManagementNotification.url}":{"post":{"summary":"Client Enabled Status Event","description":"If the merchant specifies values for the\n`client.clientManagementNotification.url` object during the createClient invocation, then a notification\nwill be sent to the merchant system when the created sub-merchant is enabled.\n\nThe event will use `clientManagementNotification.url` as endpoint and\n`clientManagementNotification.authorizationHeader` as `Authorization` header.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{client/sweepNotification/authorizationHeader}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ClientWebhookResponseObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}},"tags":["Clients"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientObj"}}}},"summary":"Create or replace a client","security":[{"SecretKey":[]}],"description":"Create new sub-clients. Sub-clients are children of your own client (master-client).\n\nDuplicates can be prevented by using the same value in `clientTransactionId` in the request. It would also\nreplace an existing client if the same `clientTransactionId` is provided in the request.\n\nThis API is only available to some Azupay customers. Please contact us for more information.\n","responses":{"201":{"description":"The new Client has been created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ClientObj"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}},"403":{"description":"Not authorised","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/clients/{clientId}":{"delete":{"tags":["Clients"],"summary":"Disable a sub-client","description":"Disable a sub-client. Sub-client is a child of your own client (master-client).\n\nThis API is only available to some Azupay customers. Please contact us for more information.\n","security":[{"SecretKey":[]}],"parameters":[{"description":"Client ID of sub-client to disable","in":"path","name":"clientId","required":true,"schema":{"type":"string","example":"e6828fe0-7ca0-46a1-9261-04f0f30deabd"}}],"responses":{"204":{"description":"The sub-client was successfully disabled"},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"alreadyDisabledError":{"value":{"message":"The sub-client already disabled","details":{"failureCode":"ERR0.01","failureReason":"The sub-client already disabled"}}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notAuthorizedError":{"value":{"message":"User is not authorized to access this resource","details":{"failureCode":"ERR0.01","failureReason":"User is not authorized to access this resource"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notFoundError":{"value":{"message":"The client can not be found","details":{"failureCode":"ERR0.01","failureReason":"The client can not be found"}}}}}}}}}},"/clients/{clientId}/lowBalanceAlert/threshold":{"get":{"security":[{"SecretKey":[]}],"parameters":[{"description":"Client ID to get the balance threshold","in":"path","name":"clientId","required":true,"schema":{"type":"string","example":"e6828fe0-7ca0-46a1-9261-04f0f30deabd"}}],"responses":{"200":{"description":"The client configuration","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LowBalanceThreshold"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notAuthorizedError":{"value":{"message":"User is not authorized to access this resource","details":{"failureCode":"ERR0.01","failureReason":"User is not authorized to access this resource"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notFoundError":{"value":{"message":"The client can not be found","details":{"failureCode":"ERR0.01","failureReason":"The client can not be found"}}}}}}}}},"put":{"tags":["Clients"],"summary":"Set low balance threshold to trigger alerts","description":"Set low balance threshold to trigger alerts when the balance goes lower than the specified limit.\nWhen this happens, an email is sent to the specified recipients.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLowBalanceThreshold"}}}},"security":[{"SecretKey":[]}],"parameters":[{"description":"Client ID to set the balance threshold","in":"path","name":"clientId","required":true,"schema":{"type":"string","example":"e6828fe0-7ca0-46a1-9261-04f0f30deabd"}}],"responses":{"204":{"description":"The threshold was successfully updated"},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"alreadyDisabledError":{"value":{"message":"Bad request","details":{"failureCode":"ERR0.01","failureReason":"Wrong threshold format"}}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notAuthorizedError":{"value":{"message":"User is not authorized to access this resource","details":{"failureCode":"ERR0.01","failureReason":"User is not authorized to access this resource"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notFoundError":{"value":{"message":"The client can not be found","details":{"failureCode":"ERR0.01","failureReason":"The client can not be found"}}}}}}}}}},"/clients/{clientId}/lowBalanceAlert/emailAddresses":{"get":{"security":[{"SecretKey":[]}],"parameters":[{"description":"Client ID to get the email addresses","in":"path","name":"clientId","required":true,"schema":{"type":"string","example":"e6828fe0-7ca0-46a1-9261-04f0f30deabd"}}],"responses":{"200":{"description":"The client configuration","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LowBalanceEmailAddresses"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notAuthorizedError":{"value":{"message":"User is not authorized to access this resource","details":{"failureCode":"ERR0.01","failureReason":"User is not authorized to access this resource"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notFoundError":{"value":{"message":"The client can not be found","details":{"failureCode":"ERR0.01","failureReason":"The client can not be found"}}}}}}}}},"put":{"tags":["Clients"],"summary":"Set email addresses to send the low balance alerts","description":"Set the email addresses to send the alerts when the balance goes lower than the specified limit.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLowBalanceEmailAddresses"}}}},"security":[{"SecretKey":[]}],"parameters":[{"description":"Client ID to set the email addresses","in":"path","name":"clientId","required":true,"schema":{"type":"string","example":"e6828fe0-7ca0-46a1-9261-04f0f30deabd"}}],"responses":{"204":{"description":"The email addresses were successfully updated"},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"alreadyDisabledError":{"value":{"message":"Bad request","details":{"failureCode":"ERR0.01","failureReason":"Wrong email addresses format"}}}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notAuthorizedError":{"value":{"message":"User is not authorized to access this resource","details":{"failureCode":"ERR0.01","failureReason":"User is not authorized to access this resource"}}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"notFoundError":{"value":{"message":"The client can not be found","details":{"failureCode":"ERR0.01","failureReason":"The client can not be found"}}}}}}}}}},"/report":{"get":{"security":[{"SecretKey":[]}],"tags":["Billing and Transaction Reports"],"summary":"Get Reports","description":"Provides a list of reports that can be passed onto GET /report/download API endpoint. You can supply \n`month + timezone` query parameters OR you can supply `fromDate + toDate`. The former provides you a list of all \nreports automatically generated by azupay whilst the latter provides you with a report for the date range \nspecified.\n\nBecause `fromDate` and `toDate` contain special HTML entities (i.e. `:` and `+`), they must be encoded.\nExample: `2022-06-02T12:11:00.999+0530` must be supplied as `2022-06-02T12%3A11%3A00.999%2B0530`\n","parameters":[{"description":"Your clientId\n","in":"query","name":"clientId","required":true,"schema":{"type":"string"}},{"description":"The year and month\n","in":"query","name":"month","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2020-01"}},{"description":"The fromDate in ISO8601 and encoded.\n\ne.g. `2022-06-02T12%3A11%3A00.999%2B0530` instead of `2022-06-02T12:11:00.999+0530`\n","in":"query","name":"fromDate","required":false,"schema":{"type":"string"}},{"description":"The toDate in ISO8601 and encoded.\n\ne.g. `2022-07-02T12%3A11%3A00.999%2B0530` instead of `2022-07-02T12:11:00.999+0530`\n","in":"query","name":"toDate","required":false,"schema":{"type":"string"}},{"description":"The timezone to apply on date/time stamps. Currently only `Australia/Sydney` supported.\n","in":"query","name":"timezone","required":false,"schema":{"type":"string","enum":["Australia/Sydney"]}}],"responses":{"200":{"description":"The list of reports available for the specified clientId and month","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ReportListModel"}]}}}},"403":{"description":"Not authorised to return reports for given clientId","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}},"404":{"description":"No reports were found for given clientId and month values","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/report/download":{"get":{"tags":["Billing and Transaction Reports"],"summary":"Get Report download Url","description":"Gets a time limited link to download the specified report","parameters":[{"description":"Your clientId\n","in":"query","name":"clientId","required":true,"schema":{"type":"string"}},{"description":"The reportId returned from the call to `/report` operation\n","in":"query","name":"reportId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The report link object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ReportLinkModel"}]}}}},"403":{"description":"Not authorised to retrieve a link for the specified report","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}},"404":{"description":"The specified reportId was not found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}},"security":[{"SecretKey":[]}]}},"/paymentRequest":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Request"],"summary":"Create a Payment Request.","description":"Creates a payment request. Once created, your customer can make a payment to the specified PayID. You can poll for PaymentStatus using getPaymentRequest to determine whether or not the required payment was made by the customer.","operationId":"createPayIdPaymentRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestObj"},"examples":{"Single use PayId (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-single-use-payid","paymentAmount":100,"paymentDescription":"A single use PayId Test case for dynamic once-off PayId payments. Make sure to update the values required."}}},"Open static payId with payment limit (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-open-static-payid","paymentAmount":100,"paymentDescription":"An open static PayId Test case with a payment limit. Make sure to update the values required.","multiPayment":true}}},"Multi use PayId with No set amount (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-multi-use-no-set-amount","paymentDescription":"An open static PayId Test case without a payment limit - useful for wallets etc. Make sure to update the values required.","multiPayment":true}}},"Multi use PayId with an expiry time (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-multi-use-with-expiry","paymentAmount":100,"paymentDescription":"An open static PayId Test case with a payment limit and expiry date. Make sure to update the values required.","multiPayment":true,"paymentExpiryDatetime":"2024-11-16T06:32:31.250Z"}}},"Single use PayId that fails due to missing description field (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-single-use-missing-description","paymentAmount":100}}},"Single use PayId that fails due to missing clientId field (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-single-use-missing-clientid","paymentDescription":"This will fail due to a lack of a client Id. Make sure to update the values required.","paymentAmount":100}}},"Single use PayId that fails due to negative payment amount (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"update-me-to-some-unique-value-negative-amount","paymentAmount":-100,"paymentDescription":"A single use PayId Test case for dynamic once-off PayId payments. Make sure to update the values required."}}},"Single use PayId that fails due to duplicate Transaction ID - Run me twice (Test Case)":{"value":{"PaymentRequest":{"payID":"update-me-to-a-unique-payid@yourdomain.com.au","clientId":"update-me-to-your-client-id","clientTransactionId":"dont-change-me-1234","paymentAmount":100,"paymentDescription":"A single use PayId Test case to raise a duplicate transaction ID error. Run twice without changing clientTransactionId."}}}}}}},"responses":{"200":{"description":"Payment Request Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestObj"},{"$ref":"#/components/schemas/PaymentRequestStatusObj"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource"}}}]}}}}},"callbacks":{"PaymentRequestStatus":{"{$request.body#/PaymentRequest/paymentNotification/paymentNotificationEndpointUrl}":{"post":{"summary":"PaymentRequest Status Event","description":"If the merchant specifies values for the\n`PaymentRequest/paymentNotification` object during the createPaymentRequest invocation, then a notification\nwill be sent to the merchant system when it has reached a status of `COMPLETE`.\n\nThe event will use `paymentNotification.paymentNotificationEndpointUrl` as endpoint and\n`paymentNotification.paymentNotificationAuthorizationHeaderValue` as `Authorization` header.\nWe **strongly** recommend to use a different value for `paymentNotificationAuthorizationHeaderValue`\non each payment request to increase the level of security.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n\nThe merchant system can correlate the event message using either the `PaymentRequest.clientTransactionId` provided on the\noriginal request or the `PaymentRequestStatus.paymentRequestId` provided in the response of the original\nrequest.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{$request.body#/PaymentRequest/paymentNotification/paymentNotificationAuthorizationHeaderValue}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestObj"},{"$ref":"#/components/schemas/PaymentRequestStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}}},"get":{"security":[{"DistributableKey":[]}],"tags":["Payment Request"],"summary":"Get a Payment Request.","description":"Retrieves an existing PayID PaymentRequest.\n\nUse the contents of the response body to determine whether the customer has made their payment.\n","parameters":[{"in":"query","description":"ID of Payment Request to retrieve. \n\nThis is the `paymentRequestId` returned by the **Create a Payment Request** API\n","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The payment request object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestObj"},{"$ref":"#/components/schemas/PaymentRequestStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"paymentRequestId: ... not found"}}}]}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"404":{"description":"Payment Request Not Found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource"}}}]}}}}}},"delete":{"security":[{"SecretKey":[]}],"summary":"Delete a Payment Request.","tags":["Payment Request"],"description":"Delete an existing payment request, de-registering the associated PayID in the process.\n","operationId":"deletePaymentRequest","parameters":[{"description":"ID of Payment Request to delete. This is the paymentRequestId\nreturn by the createPaymentRequest API\n","in":"query","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The payment request was deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}},"/paymentRequest/refund":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Request"],"summary":"Refund a PaymentRequest.","description":"Refund a previously settled PaymentRequest back to the customer's source of funding. Optionally supply the amount to refund. Refunds requests can be rejected for the following failure reasons:\n\n| `failureCode`    | `failureReason`                                                                 |\n|------------------|---------------------------------------------------------------------------------|\n| ERR0.03          | Refunds can only be done on COMPLETE, RETURN_COMPLETE or RETURN_FAILED payments |\n| ERR0.05          | Missing id.                                                                     |\n| ERR0.06          | Refund amount value must be a number                                            |\n| ERR0.07          | Refunds cannot be done against PaymentRequest\\'s with multiPayment set to true  |\n| ERR0.08          | Refunds can only be done on COMPLETE, RETURN_COMPLETE or RETURN_FAILED payments |\n| ERR0.09          | Refund for this client can only be for the full amount                          |\n| ERR0.10          | Refund amount must be less than or equal to original payment amount             |\n| ERR0.11          | Insufficient funds to process this refund                                       |\n","parameters":[{"in":"query","name":"id","description":"ID of Payment Request to refund. This is the paymentRequestId return by the createPaymentRequest API","required":true,"schema":{"type":"string"}},{"in":"query","name":"refundAmount","description":"The amount to refund","required":false,"schema":{"type":"number"}},{"in":"query","name":"clientRefundID","description":"The client refund transaction ID","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment refunded","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentRequestObj"},{"$ref":"#/components/schemas/PaymentRequestStatusObj"}]}}}},"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"}]}}}}}}},"/paymentRequest/search":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Request"],"summary":"Search for Payment Requests.","description":"Search for Payment Requests\n","operationId":"searchPaymentRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestSearchObj"}}}},"parameters":[{"in":"query","name":"nextPageId","description":"The next page ID that was obtained on a previous search result. Used to obtain the next set of results","required":false,"schema":{"type":"string"}},{"in":"query","name":"numberOfRecords","description":"Number of records to retrieve. Defaults to 100 if not provided","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"The requested page of payment requests","content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"nextPageId":{"$ref":"#/components/schemas/nextPageIdResponse"},"recordCount":{"$ref":"#/components/schemas/recordCount"},"records":{"type":"array","description":"The result from the search","items":{"$ref":"#/components/schemas/PaymentRequestSearchResponseObj"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"idTooShortError":{"value":{"message":"[string \"\" is too short (length: 0, required minimum: 1)]\n"}},"idTooLongError":{"value":{"message":"[string \"...more than 40 chars...\" is too long (length: 41, maximum allowed: 40)]\n"}},"extraFieldsError":{"value":{"message":"[object instance has properties which are not allowed by the schema: [\"...\"]]\n"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}}}}},"/accountEnquiry":{"post":{"security":[{"SecretKey":[]}],"tags":["Check Accounts"],"summary":"Check account BSB for NPP and PayTo reachability.","description":"Check if NPP or AzupayTo payments can be sent to the account issuer identified by the given BSB.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BSBEnquiryObj"},"examples":{"BSB Not Found (Test Case)":{"value":{"bsb":"939200"}},"BSB Not Found 2 (Test Case)":{"value":{"bsb":"000000"}},"Return an Authorisation Error (Test Case)":{"value":{"bsb":"999999"}},"BSB is NPP Reachable and PayTo Reachable (Test Case)":{"value":{"bsb":"939300"}},"BSB is NPP Reachable and NOT PayTo Reachable (Test Case)":{"value":{"bsb":"939301"}}}}}},"responses":{"200":{"description":"The account status object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccountStatusObj"},{"$ref":"#/components/schemas/AccountStatusExtraForBSBObj"}]}}}},"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":"Account Not Found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/accountCheck":{"post":{"security":[{"SecretKey":[]}],"tags":["Check Accounts"],"summary":"Confirm the BSB/account number and name of a payee.","description":"The purpose of this operation is to validate the BSB/account number and name via Confirmation of Payee (CoP).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCheckObj"}}}},"responses":{"200":{"description":"The account status object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccountCheckResponseObj"}]}}}},"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"}]}}}},"403":{"description":"Permission Denied","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/payIDEnquiry":{"post":{"tags":["Check Accounts"],"summary":"Check the status of the PayID.","description":"Check if the PayID is registered and able to accept NPP and PayTo payments. \nAlso support validation of bsb and account number attached to the PayID.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayIDEnquiryObj"}}}},"responses":{"200":{"description":"The account status object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccountStatusObj"},{"$ref":"#/components/schemas/AccountStatusExtraForPayIdObj"}]}}}},"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":"Account Not Found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}},"security":[{"SecretKey":[]}]}},"/payment":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment"],"summary":"Make a Payment.","description":"Make an outbound payment to the provided PayID or BSB/Account Number.\nOnce made, you can poll for PaymentStatus using getPayment to determine\nwhether or not the payment was settled to the payee.\n","operationId":"makePayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentObj"},"examples":{"PayID via Email Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Edward Engineer","payID":"engineering@azupay.com.au","payIDType":"EMAIL","paymentAmount":"100.00","paymentDescription":"A successful test case when a PayID via Email succeeds","paymentReference":"update-me-to-some-unique-value"}}},"PayID via Org Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Edward Engineer","payID":"orgnname","payIDType":"ORG","paymentAmount":"120.00","paymentDescription":"A successful test case when a PayID via Org succeeds","paymentReference":"update-me-to-some-unique-value"}}},"PayID via Phone Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"E. Engineering Pty Ltd","payID":"+61-454444555","payIDType":"PHONE","paymentAmount":"1800.00","paymentDescription":"A successful test case when a PayID via Phone succeeds","paymentReference":"update-me-to-some-unique-value"}}},"PayID via ABN Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"E. Engineering Pty Ltd","payID":"34455445454","payIDType":"ABN","paymentAmount":"344.00","paymentDescription":"A successful test case when a PayID via ABN succeeds","paymentReference":"update-me-to-some-unique-value"}}},"PayID Not Found Error (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Carmen Saint Diago","payID":"not-found@example.com","payIDType":"EMAIL","paymentAmount":"100.00","paymentDescription":"An unsuccessful test case when a PayID can't be found","paymentReference":"update-me-to-some-unique-value"}}},"BSB and Account via NPP Rails Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Ashley Account","bsb":"062000","accountNumber":"12345999","paymentAmount":"100.00","paymentDescription":"A successful test case when an NPP payment is made via BSB and Account Number","paymentReference":"update-me-to-some-unique-value"}}},"BSB and Account via NPP Rails Successful but delayed in settling (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Ashley Account","bsb":"062000","accountNumber":"12345888","paymentAmount":"100.00","paymentDescription":"A successful test case when an NPP payment is made via BSB and Account Number but delayed in settling.","paymentReference":"update-me-to-some-unique-value"}}},"BSB and Account via NPP Rails Successful but later returned (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Ashley Account","bsb":"062000","accountNumber":"12345444","paymentAmount":"100.00","paymentDescription":"A successful test case when an NPP payment is made via BSB and Account Number but later returned.","paymentReference":"update-me-to-some-unique-value"}}},"BSB and Account via NPP Rails Unsuccessful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Ashley Account","bsb":"062000","accountNumber":"12345678","paymentAmount":"100.00","paymentDescription":"An unsuccessful test case when an NPP payment is made via BSB and Account Number","paymentReference":"update-me-to-some-unique-value"}}},"BSB and Account via DE Rails Successful (Test Case)":{"value":{"Payment":{"clientPaymentId":"update-me-to-some-unique-value","payeeName":"Ashley Account","bsb":"062000","accountNumber":"12345777","paymentAmount":"100.00","paymentDescription":"A successful test case when a DE payment is made due to an account being NPP unreachable.","paymentReference":"update-me-to-some-unique-value"}}}}}}},"responses":{"201":{"description":"Payment received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusObj"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"409":{"description":"Duplicated payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}},"callbacks":{"PaymentStatus":{"{$request.body#/Payment/paymentNotification/paymentNotificationEndpointUrl}":{"post":{"summary":"Payment Status Event","description":"If the merchant specifies values for the\n`Payment/paymentNotification` object during the Make Payment invocation, then an event message is sent once the\npayment has reached a status of `SETTLED` or `FAILED`.\n\nThe event will use `paymentNotification.paymentNotificationEndpointUrl` as endpoint and\n`paymentNotification.paymentNotificationAuthorizationHeaderValue` as `Authorization` header.\nWe strongly recommend to use a different value for `paymentNotificationAuthorizationHeaderValue`\non each payment request to increase the level of security.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n\nThe merchant system can correlate the event message using either the `Payment.clientPaymentId` provided on the\noriginal request or the `PaymentStatus.paymentId` provided in the response of the original\nrequest. Also it is required the merchant endpoint to be idempotent, so the outcome of the event\nis the same even if the same event is sent more than once.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{$request.body#/Payment/paymentNotification/paymentNotificationAuthorizationHeaderValue}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentObj"},{"$ref":"#/components/schemas/PaymentStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}}},"get":{"security":[{"SecretKey":[]}],"tags":["Payment"],"summary":"Get a Payment.","description":"Retrieves the status of a previous Make a Payment call. Use the contents of the response body to determine whether the payment has completed.","parameters":[{"in":"query","name":"id","description":"ID of Payment to retrieve. This is the paymentId returned by the makePayment call.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The payment object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentObj"},{"$ref":"#/components/schemas/PaymentStatusObj"}]}}}},"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"}]}}}}}}},"/payment/search":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment"],"summary":"Search for Payments.","description":"Search for Payments\n","operationId":"searchPayment","parameters":[{"in":"query","name":"nextPageId","description":"The next page ID that was obtained on a previous search result. Used to obtain the next set of results","required":false,"schema":{"type":"string"}},{"in":"query","name":"numberOfRecords","description":"Number of records to retrieve. Defaults to 100 if not provided","required":false,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSearchObj"}}}},"responses":{"200":{"description":"The requested page of outbound payments","content":{"application/json":{"schema":{"type":"object","properties":{"nextPageId":{"type":"string","description":"If there are more results you can invoke this search again providing the nextPageId in\nthe query parameters to retrieve the next set of results.\n"},"recordCount":{"type":"number","description":"The number of records that were retrieved.\n"},"records":{"type":"array","description":"The result from the search\n","items":{"$ref":"#/components/schemas/PaymentSearchResponseObj"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}},"/paymentAgreement":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Agreement"],"summary":"Create a Payment Agreement","description":"Create a Payment Agreement","operationId":"createPaymentAgreement","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAgreementObj"}}}},"responses":{"201":{"description":"Payment Agreement Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementObj"},{"$ref":"#/components/schemas/PaymentAgreementStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayToErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"missingPayerDetailsError":{"value":{"message":"[object must contain either ([\"payIDDetails\"]) or ([\"bankAccountDetails\"])]\n"}},"extraPayerDetailsError":{"value":{"message":"[object must not contain both ([\"payIDDetails\"]) and ([\"bankAccountDetails\"])]\n"}},"missingAgreementDetailsError":{"value":{"message":"[object must contain either ([\"variableAgreementDetails\"]) or ([\"fixedAgreementDetails\"]) or  ([balloonAgreementDetails\"]) or ([\"usageBasedAgreementDetails\"])\n"}},"extraAgreementDetailsError":{"value":{"message":"[object must contain only one of ([\"variableAgreementDetails\"]) or ([\"fixedAgreementDetails\"]) or  ([balloonAgreementDetails\"]) or ([\"usageBasedAgreementDetails\"])\n"}},"startDateError":{"value":{"message":"Start date must be today or future dated"}},"lastPaymentDateError":{"value":{"message":"Last payment date must be equal to or after start date': 'End date must be equal to or after start date\n"}},"clientIdMismatchError":{"value":{"message":"ClientId mismatch: Expecting ..."}},"invalidRequestBody":{"value":{"message":"An invalid request body was supplied"}},"invalidBecsUserId":{"value":{"message":"The BECS User ID is invalid"}},"invalidDdrMigrationRequest":{"value":{"message":"Invalid DDR migration request. Both BECS User ID and PayID have been provided"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}}},"callbacks":{"PaymentAgreementStatusEvent":{"{$request.body#/PaymentAgreement/paymentAgreementNotification/endpointURL}":{"post":{"summary":"PaymentAgreementStatus.status Event","description":"If the merchant specifies values for the\n`PaymentAgreement/paymentAgreementNotification` object during the **Create a Payment Agreement**\ninvocation, then a notification will be sent to the merchant system when it's status has changed.\n\nThe event will use `paymentAgreementNotification.endpointURL` as endpoint and\n`paymentAgreementNotification.authorizationHeader` as `Authorization` header.\nWe **strongly** recommend to use a different value for `authorizationHeader`\non each payment request to increase the level of security.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n\nThe merchant system can correlate the event message using either the\n`PaymentAgreement.clientTransactionId` provided on the original request or the\n`PaymentAgreementStatus.paymentAgreementId` provided in the response of the original request.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{$request.body#/PaymentAgreement/paymentAgreementNotification/authorizationHeader}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementObj"},{"$ref":"#/components/schemas/PaymentAgreementStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}}}},"/paymentAgreement/search":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Agreement"],"summary":"Search for Payment Agreements.","description":"Search for Payment Agreements\n","operationId":"searchPaymentAgreement","parameters":[{"in":"query","name":"nextPageId","description":"The next page ID that was obtained on a previous search result. Used to obtain the next set of results","required":false,"schema":{"type":"string"}},{"in":"query","name":"numberOfRecords","description":"Number of records to retrieve. Defaults to 100 if not provided","required":false,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAgreementSearchObj"}}}},"responses":{"200":{"description":"The requested page of payment agreements","content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"nextPageId":{"$ref":"#/components/schemas/nextPageIdResponse"},"recordCount":{"$ref":"#/components/schemas/recordCount"},"records":{"type":"array","description":"The result from the search","items":{"$ref":"#/components/schemas/PaymentAgreementSearchResponseObj"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"mixedFieldsError":{"value":{"message":"[object can't include dates - ([\"toDate\"]), ([\"fromDate\"]) and ([\"paymentAgreementId\"]) in the same request]\n"}},"validDateRangeError":{"value":{"message":"fromDate should be before or equal to toDate\n"}},"missingToDateError":{"value":{"message":"[object must contain ([\"toDate\"]) if ([\"fromDate\"]) is present]\n"}},"missingFromDateError":{"value":{"message":"[object must contain ([\"fromDate\"]) if ([\"toDate\"]) is present]\n"}},"idTooShortError":{"value":{"message":"[string \"\" is too short (length: 0, required minimum: 1)]\n"}},"idTooLongError":{"value":{"message":"[string \"...more than 40 chars...\" is too long (length: 41, maximum allowed: 40)]\n"}},"invalidFromDateError":{"value":{"message":"[ECMA 262 regex \"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$\" does not match input string \"from-date\"]\n"}},"invalidToDateError":{"value":{"message":"[ECMA 262 regex \"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$\" does not match input string \"to-date\"]\n"}},"extraFieldsError":{"value":{"message":"[object instance has properties which are not allowed by the schema: [\"...\"]]\n"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}},"/paymentAgreement/amendment":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Agreement"],"summary":"Amend a Payment Agreement","description":"Amend a Payment Agreement","operationId":"createPaymentAgreementAmendment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAgreementAmendmentObj"}}}},"responses":{"201":{"description":"Payment Agreement Amendment Submitted Successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementAmendmentObj"},{"$ref":"#/components/schemas/PaymentAgreementAmendmentStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayToErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"missingPayerDetailsError":{"value":{"message":"[object must not contain both ([\"payIDDetails\"]) and ([\"bankAccountDetails\"])]\n"}},"extraPayerDetailsError":{"value":{"message":"[object must contain either ([\"payIDDetails\"]) or ([\"bankAccountDetails\"])]\n"}},"missingAgreementDetailsError":{"value":{"message":"[object must contain either ([\"variableAgreementDetails\"]) or ([\"fixedAgreementDetails\"]) or  ([balloonAgreementDetails\"]) or ([\"usageBasedAgreementDetails\"])\n"}},"extraAgreementDetailsError":{"value":{"message":"[object must contain only one of ([\"variableAgreementDetails\"]) or ([\"fixedAgreementDetails\"]) or  ([balloonAgreementDetails\"]) or ([\"usageBasedAgreementDetails\"])\n"}},"startDateError":{"value":{"message":"Start date must be today or future dated"}},"lastPaymentDateError":{"value":{"message":"Last payment date must be equal to or after start date': 'End date must be equal to or after start date\n"}},"frequencyError":{"value":{"message":"[object has missing required properties ([\"frequency\"])]\n"}},"invalidRequestBody":{"value":{"message":"An invalid request body was supplied"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"invalidStateError":{"value":{"message":"Payment Agreement must be in an ACTIVE or SUSPENDED state."}},"unauthorizedError":{"value":{"message":"User is not authorized to access this resource with an explicit deny"}}}}}},"404":{"description":"Payment Agreement Not Found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Payment Agreement Not Found"}}}]}}}},"409":{"description":"Amend Payment Agreement already in progress.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Amend Payment Agreement already in progress."}}}]}}}}},"callbacks":{"PaymentAgreementAmendmentStatusEvent":{"{$request.body#/PaymentAgreementAmendment/paymentAgreementAmendmentNotification/endpointURL}":{"post":{"summary":"PaymentAgreementAmendmentStatus.amendmentStatus Event","description":"If the merchant specifies values for the\n`PaymentAgreementAmendment/paymentAgreementAmendmentNotification` object during the\n**Amend a Payment Agreement** invocation,\nthen a notification will be sent to the merchant system when it's status has changed.\n\nThe event will use `paymentAgreementAmendmentNotification.endpointURL` as endpoint and\n`paymentAgreementAmendmentNotification.authorizationHeader` as `Authorization` header.\nWe **strongly** recommend to use a different value for `authorizationHeader`\non each payment request to increase the level of security.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n\nThe merchant system can correlate the event message using either the\n`PaymentAgreementAmendment.clientTransactionId` provided on the original request or the\n`PaymentAgreementAmendmentStatus.paymentAgreementAmendmentId` provided in the response of the original\nrequest.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{$request.body#/PaymentAgreementAmendment/paymentAgreementAmendmentNotification/authorizationHeader}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementAmendmentObj"},{"$ref":"#/components/schemas/PaymentAgreementAmendmentStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}}}},"/paymentAgreement/changeStatus":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Agreement"],"summary":"Change Status of a Payment Agreement","description":"Change the status of a Payment Agreement","operationId":"changeStatusOfPaymentAgreement","parameters":[{"in":"query","name":"id","required":true,"description":"ID of the payment agreement to change","schema":{"type":"string"}},{"in":"query","name":"status","required":true,"description":"New status of the payment agreement","schema":{"type":"string","enum":["CANCELLED","SUSPENDED","ACTIVE"]}}],"responses":{"200":{"description":"Payment Agreement Status Changed Successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementObj"},{"$ref":"#/components/schemas/PaymentAgreementStatusObj"}]}}}},"201":{"description":"Payment Agreement Change Status Submitted Successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementObj"},{"$ref":"#/components/schemas/PaymentAgreementStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"requestStatusError":{"value":{"message":"instance value ... not found in enum (possible values: [\"CANCELLED\",\"SUSPENDED\",\"ACTIVE\"])"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}},"404":{"description":"Payment Agreement Not Found","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Payment agreement record does not exist"}}}]}}}},"409":{"description":"Change Status Already In Progress","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Payment Agreement Change Status already in progress."}}}]}}}},"412":{"description":"Invalid Status in Change Status Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"suspendedStateError":{"value":{"message":"Payment agreement must be in a SUSPENDED state"}},"activeStateError":{"value":{"message":"Payment agreement must be in an ACTIVE state"}},"activeOrSuspendedStateError":{"value":{"message":"Payment agreement must be in an ACTIVE or SUSPENDED state"}}}}}}}}},"/paymentInitiation":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Initiation"],"summary":"Initiate a Payment","description":"Initiate a Payment","operationId":"makePaymentInitiation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInitiationObj"}}}},"responses":{"201":{"description":"Payment Initiated","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentInitiationObj"},{"$ref":"#/components/schemas/PaymentInitiationStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayToErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"paymentAgreementNotFoundError":{"value":{"message":"Could not find Payment Agreement"}},"fixedAgreementFirstPaymentAmountError":{"value":{"message":"The amount specified does not match the First Payment Amount"}},"fixedAgreementExceedOutstandingBalanceError":{"value":{"message":"The amount specified exceeds the Outstanding Balance of this Agreement"}},"validityNotStartedError":{"value":{"message":"This Payment Agreement's Validity has not started"}},"validityPassedError":{"value":{"message":"This Payment Agreement's Validity End Date has passed"}},"clientIdMismatchError":{"value":{"message":"ClientId mismatch: Expecting ..."}},"invalidStateError":{"value":{"message":"Invalid Payment Agreement status. Should be ACTIVE"}},"invalidRequestBodyError":{"value":{"message":"An invalid request body was supplied"}},"ddrMigrationInProgressError":{"value":{"message":"This payment agreement is still being migrated and payments cannot be initiated in the first 5 \ncalendar days\n"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}}},"callbacks":{"PaymentInitiationStatusEvent":{"{$request.body#/PaymentInitiation/paymentInitiationNotification/endpointURL}":{"post":{"summary":"PaymentInitiationStatus.status Event","description":"If the merchant specifies values for the\n`PaymentInitiation/paymentInitiationNotification` object during the **Initiate a Payment**\ninvocation, then a notification will be sent to the merchant system when it's status has changed.\n\nThe event will use `paymentInitiationNotification.endpointURL` as endpoint and\n`paymentInitiationNotification.authorizationHeader` as `Authorization` header.\nWe **strongly** recommend to use a different value for `authorizationHeader`\non each payment request to increase the level of security.\n\nThis call is made by Azupay on a best effort basis. Azupay will implement retry mechanisms to ensure\ntransient network failures do not affect the\nability to call this endpoint. Azupay may call this endpoint\nmore than once with the same payload so the merchant must ensure that the endpoint is implemented with\nidempotent behaviour always returning a `200 OK` response even after subsequent calls.\n\nIf the target endpoint does not return HTTP `200`, azupay will retry the webhook call 45 times with a 20 second delay.\n\nThe merchant system can correlate the event message using either the\n`PaymentInitiation.clientTransactionId` provided on the original request or the\n`PaymentInitiationStatus.paymentInitiationId` provided in the response of the original request.\n","parameters":[{"in":"header","name":"Authorization","description":"The value will be what was specified in\n{$request.body#/PaymentInitiation/paymentInitiationNotification/authorizationHeader}\n","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentInitiationObj"},{"$ref":"#/components/schemas/PaymentInitiationStatusObj"}]}}}},"responses":{"200":{"description":"The merchant's server should return this code"}}}}}}},"get":{"security":[{"SecretKey":[]}],"tags":["Payment Initiation"],"summary":"Get a Payment Initiation","description":"Retrieves an existing Payment Initiation (PayTo Transaction).\n","parameters":[{"in":"query","name":"id","description":"ID of Payment Initiation to retrieve.  This is the `paymentInitiationId` returned by the **Initiate a Payment** API\n","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Payment Initiation object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentInitiationObj"},{"$ref":"#/components/schemas/PaymentInitiationStatusObj"},{"$ref":"#/components/schemas/PaymentAgreementObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/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"}]}}}}}}},"/paymentInitiation/search":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Initiation"],"summary":"Search for Payment Initiation","description":"Search for Payment Initiation (PayTo Transactions)\n","operationId":"searchPaymentInitiation","parameters":[{"in":"query","name":"nextPageId","description":"The next page ID that was obtained on a previous search result. Used to obtain the next set of results","required":false,"schema":{"type":"string"}},{"in":"query","name":"numberOfRecords","description":"Number of records to retrieve. Defaults to 100 if not provided","required":false,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInitiationSearchObj"}}}},"responses":{"200":{"description":"The requested page of payment agreements","content":{"application/json":{"schema":{"type":"object","required":["nextPageId","recordCount","records"],"properties":{"nextPageId":{"$ref":"#/components/schemas/nextPageIdResponse"},"recordCount":{"$ref":"#/components/schemas/recordCount"},"records":{"type":"array","description":"The result from the search","items":{"$ref":"#/components/schemas/PaymentInitiationSearchResponseObj"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"},"examples":{"invalidRequestBody":{"value":{"message":"An invalid request body was supplied"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}},"/balance":{"get":{"security":[{"SecretKey":[]}],"tags":["Current Balances"],"summary":"Get current balance","description":"Returns balance of your Azupay account.\n","parameters":[{"in":"query","name":"timestamp","required":false,"schema":{"type":"string"},"description":"An optional parameter can be supplied to retrieve the account balance at a specified point in time. \nIn ISO date/time string format in UTC.\n","example":"2024-11-04T03:16:53.350Z"}],"responses":{"200":{"description":"The balance object","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BalanceObj"}]}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"}]}}}}}}},"/paymentAgreementRequest":{"post":{"security":[{"SecretKey":[]}],"tags":["Payment Agreement Request"],"summary":"Create a Payment Agreement Request","description":"Create a Payment Agreement Request","operationId":"createPaymentAgreementRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAgreementRequestObj"}}}},"responses":{"201":{"description":"Payment Agreement Request Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentAgreementRequestObj"},{"$ref":"#/components/schemas/PaymentAgreementRequestStatusObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayToErrorModel"},"examples":{"contentTypeError":{"value":{"message":"Content-Type request header must be application/json"}},"missingTransactionId":{"value":{"message":"[object has missing required properties ([\"clientTransactionId\"])]"}},"startDateError":{"value":{"message":"Start date must be today or future dated"}},"endDateError":{"value":{"message":"End date must be equal to or after start date"}},"suggestedPayerPayIDError":{"value":{"message":"[suggestedPayerPayID] format is incorrect"}}}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}}}}},"/client/{clientId}/apiKeys":{"post":{"security":[{"SecretKey":[]}],"tags":["API Keys"],"summary":"Create API keys for Sub Merchants","description":"Create API keys","operationId":"apiKeysProvision","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubClientIdObj"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeysProvisionObj"}}}},"responses":{"201":{"description":"API key creation","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/apiKeysProvisionResponseObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}},"404":{"description":"Client ID not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}},"get":{"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubClientIdObj"}}],"security":[{"SecretKey":[]}],"tags":["API Keys"],"summary":"Get API keys for Sub Merchants","description":"Get API keys","operationId":"getApiKeys","responses":{"200":{"description":"API keys record","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/GetApiKeysResponseObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}},"404":{"description":"Client ID not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}},"/client/{clientId}/apiKeys/{apiKeyId}":{"patch":{"security":[{"SecretKey":[]}],"tags":["API Keys"],"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubClientIdObj"}},{"name":"apiKeyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyIdObj"}}],"summary":"Update API keys for Sub Merchants","description":"Update API keys","operationId":"updateApiKeys","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdateObj"}}}},"responses":{"204":{"description":"API key updated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}},"404":{"description":"Client ID not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}},"get":{"parameters":[{"name":"clientId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubClientIdObj"}},{"name":"apiKeyId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyIdObj"}}],"security":[{"SecretKey":[]}],"tags":["API Keys"],"summary":"Gets an API key based on the API key ID.","description":"Get API key","operationId":"getApiKey","responses":{"200":{"description":"API key record","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/GetApiKeyResponseObj"}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}},"401":{"description":"Invalid Authorization header","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"Unauthorized"}}}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorModel"},{"properties":{"message":{"example":"User is not authorized to access this resource with an explicit deny"}}}]}}}},"404":{"description":"Client ID not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorModel"}}}}}}}}}