Send payment between accounts

POST /payment/send-payment

Transfer funds from one account to another. Can be internal transfers or external payments.

application/json

Body Required

  • data object Required

    The actual request data to be processed

    Hide data attributes Show data attributes object
    • sourceAccountId string Required

      ID of the source account

    • targetAccountId string Required

      ID of the target account

    • amount number Required

      Amount to transfer

    • currency string Required

      Currency code

    • reference string

      Payment reference

    • description string

      Payment description

  • signature string Required

    ed25519 signature of the data, signed with user's private key

  • publicKey string Required

    User's derived public key for signature verification

  • timestamp integer Required

    Unix timestamp when the request was created (milliseconds)

  • nonce string Required

    Unique nonce to prevent replay attacks

Responses

  • 201 application/json

    Payment initiated successfully

    Hide response attributes Show response attributes object
    • success boolean
    • transactionId string
    • status string

      Values are pending, processing, completed, or failed.

    • amount number
    • currency string
    • estimatedCompletion string(date-time)

      Estimated completion time

  • 400

    Invalid request parameters

  • 401

    Authentication failed

  • 403

    Insufficient funds or permissions

  • 429

    Rate limit exceeded

  • 500

    Internal server error

POST /payment/send-payment
curl \
 --request POST 'https://pay-api.aiic.nz/v1/payment/send-payment' \
 --header "X-Public-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"data":{"sourceAccountId":"acc_123","targetAccountId":"acc_456","amount":5000,"currency":"NZD","reference":"Payment for services","description":"Monthly subscription payment"},"signature":"base64-encoded-signature","publicKey":"base64-encoded-public-key","timestamp":1703123456789,"nonce":"abc123-def456-ghi789"}'
Request examples
{
  "data": {
    "sourceAccountId": "acc_123",
    "targetAccountId": "acc_456",
    "amount": 5000,
    "currency": "NZD",
    "reference": "Payment for services",
    "description": "Monthly subscription payment"
  },
  "signature": "base64-encoded-signature",
  "publicKey": "base64-encoded-public-key",
  "timestamp": 1703123456789,
  "nonce": "abc123-def456-ghi789"
}
Response examples (201)
{
  "success": true,
  "transactionId": "txn_def456",
  "status": "pending",
  "amount": 5000,
  "currency": "NZD",
  "estimatedCompletion": "2025-05-04T09:42:00Z"
}