> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://interacdocs.nolimit.money/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://interacdocs.nolimit.money/_mcp/server.

# Refund Deposit

POST https://sandbox-payments.nolimit.money/interac/refund
Content-Type: application/json

Use this endpoint to refund a completed deposit, in full or in part. The refund is sent to the customer who paid the deposit as an Interac e-Transfer, and is paid from your available balance.

Send the following in the body:

* `transactionId` - `[string]` the `transactionId` of the deposit you want to refund, as returned when you created the deposit. The deposit must be `COMPLETED`.

* `amount` - `[float]` optional. The amount to refund in CAD, with up to 2 decimals and a `.` (dot) as decimal separator (e.g. `12.50`). Leave it out to refund the full deposit amount.

The refund is sent to the email address and name of the customer who paid the deposit; you do not provide them. The memo on the e-Transfer is `refund`.

***

The headers must contain your `x-api-key` and a unique `Idempotency-Key` (UUID v4). If you send the same key again, the response of the first request is returned and no new refund is created. If a request with a key is still being processed, you get `409 IDEMPOTENCY_IN_PROGRESS`.

If a request is refused with a `400` or `404` error after the key was accepted, use a **new** `Idempotency-Key` when you retry.

***

**Rules**

* You can refund a deposit several times (partial refunds), but the total refunded cannot be more than the deposit amount. Refunds that were declined, rejected or cancelled do not count towards this total.

* Your available balance must cover the refund amount plus the refund fee. Check it with [Partner Balance](/partner-interac-api/partner-balance).

* The amount and the refund fee are taken from your balance when the refund is accepted. If the refund later fails, the amount is returned to your balance; the refund fee is not.

***

**Security question**

Every refund is protected by a security question that the customer answers when they claim the funds with their bank. The question is `What is the secret code?` and the answer is a random 8-character code.

The response contains the answer in `securityAnswer`, encrypted with AES-256-GCM using your security key (provided by NoLimit staff). Decrypt it on your side and give the answer to the customer. On the sandbox environment the response also contains the answer in plain text in `plainPassword`; this field is not present in production.

***

**Status**

* `PENDING` - the refund was accepted and sent. Its final status is sent to your webhook.

* `INCOMPLETE` - the refund could not be sent. Nothing was taken from your balance and the refund will not be retried; you can create a new refund with a new `Idempotency-Key`.

When the refund reaches its final status (for example `COMPLETED`, `CANCELLED`, `REJECTED` or `DECLINED`) we send it to your registered webhooks:

```
{
  "refund": {
    "id": "3f6c2a8e-1d4b-4f7a-9c2e-8b5d7e1a0c94",
    "customerEmail": "john.doe@example.com",
    "amount": "12.50",
    "status": "COMPLETED",
    "referenceNumber": "CA1MRqWkTe5G",
    "sourceType": "DEPOSIT",
    "sourceId": "2ffb7139-0b50-4840-998b-3cafbe80ebfa",
    "createdAt": "2026-11-02T15:10:04.211Z",
    "postedAt": "2026-11-02T15:10:05.932Z",
    "processedAt": "2026-11-02T15:41:12.087Z"
  },
  "partner_balance": "1507.25"
}
```

Possible errors:

* `400 INSUFFICIENT_FUNDS` - your balance does not cover the amount plus the refund fee, the amount is not greater than 0, or the amount is more than what is left to refund on the deposit.

* `400 MISSING_IDEMPOTENCY` - the `Idempotency-Key` header is missing.

* `401` - the API key is invalid.

* `404 DEPOSIT_NOT_FOUND` - no completed deposit with this `transactionId` belongs to your account, or `amount` is more than the deposit amount.

* `409` - the `x-api-key` header is missing, or `IDEMPOTENCY_IN_PROGRESS`.

* `422 INVALID_TRANSACTION_ID` - `transactionId` is missing or is not a valid ID.

* `500 REFUND_CREATION_FAILED` - the refund could not be created, for example because `amount` has more than 2 decimals. Please check the request and retry with a new `Idempotency-Key`.

Reference: https://interacdocs.nolimit.money/partner-interac-api/refund-deposit

## Servers

- `https://sandbox-payments.nolimit.money/interac` (Sandbox, default)
- `https://payments.nolimit.money/interac` (Production)

## Request

### Headers

- `x-api-key` (string, optional)
- `Idempotency-Key` (string, required)

### Body (application/json)

This endpoint expects an object.

- `transactionId` (string, required) — The `transactionId` of the completed deposit to refund.
- `amount` (double, optional) — Amount to refund in CAD, up to 2 decimals. Leave it out to refund the full deposit.

## Response

### 201

Created

- `data` (RefundPostResponsesContentApplicationJsonSchemaData, required)
- `success` (integer, required)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

### 404 Not Found Error

Not Found

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

### 409 Conflict Error

Conflict

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

### 500 Internal Server Error

Internal Server Error

- `error` (RefundPostResponsesContentApplicationJsonSchemaError, optional)
- `success` (integer, optional)

## Types

### RefundPostResponsesContentApplicationJsonSchemaData

- `transactionId` (string, required) — The refund ID.
- `status` (string, required) — `PENDING` when the refund was sent, `INCOMPLETE` when it could not be sent.
- `payoutEmail` (string, required) — The email of the customer who paid the deposit.
- `postedAmount` (double, required) — Refund amount in CAD.
- `transactionFee` (double, required) — Refund fee in CAD. `0` when the refund is `INCOMPLETE`.
- `securityQuestion` (string, required)
- `securityAnswer` (RefundPostResponsesContentApplicationJsonSchemaDataSecurityAnswer, required) — The answer, encrypted with your security key.
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `plainPassword` (string, optional) — The answer in plain text. Sandbox only.

### RefundPostResponsesContentApplicationJsonSchemaError

- `message` (string, optional)
- `code` (string, optional)

### RefundPostResponsesContentApplicationJsonSchemaDataSecurityAnswer

The answer, encrypted with your security key.

- `alg` (string, required)
- `iv` (string, required)
- `ciphertext` (string, required)
- `tag` (string, required)

## Examples

**Request**

```json
{
  "transactionId": "2ffb7139-0b50-4840-998b-3cafbe80ebfa",
  "amount": 12.5
}
```

**Response**

```json
{
  "data": {
    "transactionId": "3f6c2a8e-1d4b-4f7a-9c2e-8b5d7e1a0c94",
    "status": "PENDING",
    "payoutEmail": "john.doe@example.com",
    "postedAmount": 12.5,
    "transactionFee": 1.25,
    "securityQuestion": "What is the secret code?",
    "securityAnswer": {
      "alg": "AES-256-GCM",
      "iv": "Qm9Yt1x2c3ZkR0hq",
      "ciphertext": "o2Hc7mXk3Qp9Lw==",
      "tag": "Zk4tP2Vb8sN1rT6yQe3WuA=="
    },
    "createdAt": "2026-11-02T15:10:04.211Z",
    "updatedAt": "2026-11-02T15:10:05.932Z",
    "plainPassword": "Xk7pQ2mR"
  },
  "success": 1
}
```

**SDK Code**

```python Refund Deposit_example
import requests

url = "https://sandbox-payments.nolimit.money/interac/refund"

payload = {
    "transactionId": "2ffb7139-0b50-4840-998b-3cafbe80ebfa",
    "amount": 12.5
}
headers = {
    "Idempotency-Key": "{{vault:authorization-secret---uuid}}",
    "x-api-key": "{{kid}}@{{api-key}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Refund Deposit_example
const url = 'https://sandbox-payments.nolimit.money/interac/refund';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': '{{vault:authorization-secret---uuid}}',
    'x-api-key': '{{kid}}@{{api-key}}',
    'Content-Type': 'application/json'
  },
  body: '{"transactionId":"2ffb7139-0b50-4840-998b-3cafbe80ebfa","amount":12.5}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Refund Deposit_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-payments.nolimit.money/interac/refund"

	payload := strings.NewReader("{\n  \"transactionId\": \"2ffb7139-0b50-4840-998b-3cafbe80ebfa\",\n  \"amount\": 12.5\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "{{vault:authorization-secret---uuid}}")
	req.Header.Add("x-api-key", "{{kid}}@{{api-key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Refund Deposit_example
require 'uri'
require 'net/http'

url = URI("https://sandbox-payments.nolimit.money/interac/refund")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '{{vault:authorization-secret---uuid}}'
request["x-api-key"] = '{{kid}}@{{api-key}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"transactionId\": \"2ffb7139-0b50-4840-998b-3cafbe80ebfa\",\n  \"amount\": 12.5\n}"

response = http.request(request)
puts response.read_body
```

```java Refund Deposit_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-payments.nolimit.money/interac/refund")
  .header("Idempotency-Key", "{{vault:authorization-secret---uuid}}")
  .header("x-api-key", "{{kid}}@{{api-key}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"transactionId\": \"2ffb7139-0b50-4840-998b-3cafbe80ebfa\",\n  \"amount\": 12.5\n}")
  .asString();
```

```php Refund Deposit_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-payments.nolimit.money/interac/refund', [
  'body' => '{
  "transactionId": "2ffb7139-0b50-4840-998b-3cafbe80ebfa",
  "amount": 12.5
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '{{vault:authorization-secret---uuid}}',
    'x-api-key' => '{{kid}}@{{api-key}}',
  ],
]);

echo $response->getBody();
```

```csharp Refund Deposit_example
using RestSharp;

var client = new RestClient("https://sandbox-payments.nolimit.money/interac/refund");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "{{vault:authorization-secret---uuid}}");
request.AddHeader("x-api-key", "{{kid}}@{{api-key}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"transactionId\": \"2ffb7139-0b50-4840-998b-3cafbe80ebfa\",\n  \"amount\": 12.5\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Refund Deposit_example
import Foundation

let headers = [
  "Idempotency-Key": "{{vault:authorization-secret---uuid}}",
  "x-api-key": "{{kid}}@{{api-key}}",
  "Content-Type": "application/json"
]
let parameters = [
  "transactionId": "2ffb7139-0b50-4840-998b-3cafbe80ebfa",
  "amount": 12.5
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-payments.nolimit.money/interac/refund")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```