Kutanapay Merchant API
  1. Merchant Wallet
Kutanapay Merchant API
  • Merchant API Keys
    • Create Api Key
      POST
    • Get Api Keys
      GET
    • Revoke Api Key
      DELETE
  • Merchant Wallet
    • Get All Wallets
      GET
    • Get Wallet Transactions
      GET
    • Process Refund
      POST
    • Get Settlement Batches
      GET
    • Update Wallet Status
      PATCH
    • Get Wallet By Currency
      GET
  • Merchant Customer Transactions
    • Get Merchant Transactions
      GET
    • Get Merchant Transaction
      GET
  • Merchant Checkout
    • Create Checkout
      POST
    • List Checkouts
      GET
    • Get Checkout
      GET
  • Merchant Webhooks
    • Create Webhook
      POST
    • Get Webhooks
      GET
    • Update Webhook
      PUT
    • Delete Webhook
      DELETE
  • Merchant Branding
    • Get Branding
      GET
    • Update Branding
      PUT
  • Merchant Payment Accounts
    • Add Payment Account
      POST
    • Get Payment Accounts
      GET
    • Get Payment Account
      GET
    • Update Payment Account
      PUT
    • Delete Payment Account
      DELETE
  • Merchant Withdrawals
    • Initiate Withdrawal
    • Get Withdrawal History
    • Cancel Withdrawal
    • Get Withdrawal
  • Merchant Payouts
    • Initiate Payout
    • Get Payout History
    • Cancel Payout
    • Get Payout
  1. Merchant Wallet

Process Refund

POST
/api/v1/merchants/wallet/refund
Process refund for a deposit (API Key Auth).
Refunds are settlement-aware:
Unsettled deposits: Refunded from holding_balance
Settled deposits: Refunded from available_balance
Request Body:
original_transaction_id (required): ID of the original deposit transaction to refund
refund_amount (required): Amount to refund (must be ≤ original deposit amount minus previous refunds)
currency_code (required): Currency code (must match original deposit currency)
reason (required): Reason for the refund (e.g., "Customer requested refund")
notes (optional): Additional notes about the refund
Validations:
Refund amount must be ≤ original deposit amount (minus previous refunds)
Currency must match original deposit currency (no cross-currency refunds)
Sufficient balance required (either holding or available, depending on settlement status)
Original transaction must be a completed deposit
Returns:
refund_transaction_id: ID of the created refund transaction
original_transaction_id: ID of the original deposit
refund_amount: Amount refunded
balance_source: Which balance was debited ('holding_balance' or 'available_balance')
original_settlement_status: Settlement status of the original deposit ('unsettled' or 'settled')
holding_balance: Updated holding balance
available_balance: Updated available balance
balance: Total balance (holding + available)
refunded_at: Timestamp when refund was processed
Example:
Original deposit: $100 (unsettled, in holding_balance)
Refund request: $30
Result: $30 debited from holding_balance, refund transaction created
Supports partial refunds: You can refund multiple times until the original amount is exhausted.
API Key authentication required

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Successful Response
Body

🟠422Parameter Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/merchants/wallet/refund' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "currency_code": "USD",
    "notes": "Refund approved by support team",
    "original_transaction_id": "550e8400-e29b-41d4-a716-446655440000",
    "reason": "Customer requested refund",
    "refund_amount": 50
}'
Response Response Example
200 - Example 1
{}
Modified at 2025-10-16 13:16:45
Previous
Get Wallet Transactions
Next
Get Settlement Batches
Built with