v1

latestOpenAPI 3.1.02026-07-2483219318.4 KB
Payments

Create one-off payment

Akahu's one-off payment service uses official open banking connections to initiate payments directly from your users' New Zealand bank accounts.

Create a payment by specifying the amount, payee account details, and optional statement reference fields. All payments require a redirect_uri. This is where the user will be returned upon completing authorisation.

Once the payment is created, send your user to the authorisation_url to complete payment authorisation.

post/v1/one-off-payments

Request body

amountnumber required

The amount to be paid in dollars, e.g. 12.34. (Rounded to 2 decimal places).

redirect_uristring uri required

The URI to redirect the user to after payment approval

redirect_mode'deep_link'

The mode used by Akahu when redirecting the user to your provided redirect_uri. This option is important for native mobile app developers.

  • deep_link → Specify this value if your provided redirect_uri intends to activate your native mobile application via iOS universal link or Android app link. When you supply this value, the user will be required to tap to confirm before returning to your application. This interaction is important to ensure successful native app activation.
webhook_uristring uri

The URI to send webhooks regarding updates to this payment

expires_atstring date-time

The payment will be cancelled at this time, unless it has been authorised. Defaults to 1 hour in the future.

Example request

{
  "payee": {
    "name": "John Smith",
    "account_number": "12-3456-7890123-00"
  },
  "payer": {
    "name": "Jane Smith",
    "account_number": "12-3456-7890123-10"
  },
  "amount": 12.34,
  "redirect_uri": "https://myapp.com/payments/complete",
  "webhook_uri": "https://myapp.com/payments/webhooks"
}

Response

Success

_idstring required
authorisation_urlstring uri required

The URL the user should be redirected to in order to approve the payment

expires_atstring date-time

The payment will be cancelled at this time, unless it has been authorised

Example response

{
  "_id": "one_off_payment_c01234567890123456789012345",
  "authorisation_url": "https://payments.akahu.nz/?payment=one_off_payment_c01234567890123456789012345"
}