Refund a payment
Refund all or part of a previous payment. Can be full or partial refunds.
POST
/payment/refund
curl \
--request POST 'https://pay-api-dev.aiic.nz/v1/payment/refund' \
--header "X-Public-Key: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"data":{"originalTransactionId":"txn_abc123","amount":2500,"reason":"Customer requested refund","description":"string"},"signature":"base64-encoded-signature","publicKey":"base64-encoded-public-key","timestamp":1703123456789,"nonce":"abc123-def456-ghi789"}'
Request examples
{
"data": {
"originalTransactionId": "txn_abc123",
"amount": 2500,
"reason": "Customer requested refund",
"description": "string"
},
"signature": "base64-encoded-signature",
"publicKey": "base64-encoded-public-key",
"timestamp": 1703123456789,
"nonce": "abc123-def456-ghi789"
}
Response examples (201)
{
"success": true,
"refundId": "ref_xyz789",
"originalTransactionId": "txn_abc123",
"amount": 2500,
"status": "pending",
"timestamp": "2025-05-04T09:42:00Z"
}