PayTo - Pay & Subscribe

Initial payment and then recurring subscription payment

This use case for PayTo allows merchants to use the Pay By Bank UX solution to create subscription-based payment agreements with their customers.

This combines an initial payment with recurring payments, enabling ongoing billing relationships with minimal integration effort.

Key features

  • Initial Payment – One-time setup payment or first billing cycle amount.
  • Recurring Payments – Collect ongoing payments via a simple API call.
  • Automatic Agreement Creation – Payment agreements are created during checkout, linking initial and recurring amounts.

Making an initial payment and setting up ongoing subscription payments

  1. Customer lands on the Pay by Bank main landing page
  2. PayID Entry: Customer enters their PayID (email or phone)
  3. Verification: PayID is verified and account holder name is displayed

  1. Confirmation: Customer confirms the payment details and authorises the PayTo agreement in their online banking or mobile banking app

  1. Processing: Initial payment is processed through the NPP (New Payments Platform)

How do I use it?

  1. Create a payment request with API request mandatory fields AND recurringPaymentAmount +recurringPaymentFrequency
  2. Present checkout.url to your customer
  3. Customer makes initial payment with Pay By Bank by providing PayID details
  4. At the time of successful initial payment completed, a Payment agreement is created for regular recurring payments
  5. Initiate PayTo payment(s) regularly at agreed intervals against the agreement

Create PaymentRequest for Pay & Subscribe use case

To use the Pay & Subscribe UX solution:

  • Call the paymentAgreementRequest API using POST method at https://api-uat.azupay.com.au/v1/paymentRequest .
    To create a payment request that includes subscription setup, include the following mandatory fields as specified in the in API reference for Create a Payment Request file spec and also must include: recurringPaymentAmount,recurringPaymentFrequency
  • In the response body of the POST /v1/paymentRequest call, there will be a field called PaymentRequestStatus.checkoutUrl
  • Once you receive the response load the Pay & Subscribe main landing page by redirecting your customer to the checkoutUrl from the API response

Sample request body:

{
  "PaymentRequest": {
    "clientId": "your-client-id",
    "clientTransactionId": "unique-transaction-id",
    "paymentAmount": 100.00,
    "recurringPaymentAmount": 50.00,
    "recurringPaymentFrequency": "ANNUAL",
    "paymentDescription": "Annual subscription setup",
    "paymentNotification": {
      "paymentNotificationEndpointUrl": "https://my-endpoint3df3.free.beeceptor.com",
      "paymentNotificationAuthorizationHeaderValue": "Secret Value"
    }
  }
}

Sample response:

{
  "PaymentRequest": {
    "clientId": "your-client-id",
    "clientTransactionId": "unique-transaction-id",
    "paymentAmount": 100.00,
    "recurringPaymentAmount": 50.00,
    "recurringPaymentFrequency": "ANNUAL",
    "paymentDescription": "Annual subscription setup",
    "checkoutUrl": "https://pay.azupay.com.au/xxxx/pay"
  },
  "PaymentRequestStatus": {
    "paymentRequestId": "abc123",
    "status": "WAITING",
    "createdDateTime": "2024-01-15T10:30:00Z"
  }
}
📘

When both the recurringPaymentAmount and recurringPaymentFrequency fields are provided in the request the UX will remove the PayID option and will only enable PayTo checkout. If neither is provided then it will present the UX depending what was configured in the Client Dashboard Apps Settings.

Verify Payment agreement details

At the time of successful initial payment completed, a Payment Agreement is created for regular recurring payments, a payment agreement is created with the following properties

  • firstPaymentAmount: The initial payment amount that was processed
  • amount: The recurring payment amount for future payments
  • frequency: The payment frequency (WEEKLY, MONTHLY, ANNUAL)
  • endDate: Null for open-ended

Initiate recurring payments

To initiate a recurring payment using the payment agreement after the first period has elapsed, use the payment initiation endpoint: https://api-uat.azupay.com.au/v1/paymentInitiation and refer to the following API file spec and guides for detailed information on initiating a PayTo payment: