> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nuvion.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept Payments with Interac

> Collect CAD from a payer's Canadian bank account with an Interac e-Transfer request, and confirm when the funds reach your account.

Use an Interac funding session to collect CAD from a payer. Nuvion sends the payer an Interac e-Transfer request by email; the payer accepts it from their Canadian bank, and you confirm the outcome by calling `PATCH /funding-sessions/{id}`. By the end of this guide you can create a request, track it to `settled` or `failed`, and reconcile the inflow in your own records.

You need an approved entity with a CAD account, and the payer's name and email address. To find the account, call `GET /accounts` and use the `id` of the account whose `currency` is `CAD`. See [Accounts](https://docs.nuvion.co/api-reference/accounts.md).

## At a glance

1. You create a funding session. Nuvion emails the payer an Interac e-Transfer request.
2. The payer accepts or declines the request from their bank. A request settles only after the payer accepts it, so the time to settle depends mostly on when the payer responds.
3. You call `PATCH /funding-sessions/{id}` until the status is `settled` or `failed`. Each call returns the current status: `processing` while the payer hasn't responded, `pending_settlement` once the payer has accepted, then `settled` or `failed`. Stop after 3 days.
4. When the session is `settled`, you credit your own records once, using the inflow to reconcile.
5. A settled session also sends `inflows.completed` and `funding_sessions.updated` webhooks. A declined or unanswered session sends none. Treat a webhook as a prompt to check, and poll `PATCH` as the source of truth.

***

## Step 1: Create the funding session

`POST /funding-sessions` with `funding_type: "interac"`. Amounts are in the smallest currency unit, so `10000` is CAD 100.00. `country_code` and `redirect_url` aren't needed for Interac.

```bash curl theme={null}
curl -X POST https://api.nuvion.dev/funding-sessions \
  -H "Authorization: Bearer $NUVION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency": "CAD",
    "funding_type": "interac",
    "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
    "unique_reference": "order-2025-114",
    "narration": "Wallet top up",
    "meta": {
      "name": "Ada Lovelace",
      "email": "ada@example.com"
    }
  }'
```

```json Response theme={null}
{
  "status": "success",
  "message": "Funding session created successfully",
  "data": {
    "id": "01HXYZ5805ABCDEFGHJKMNPQRS",
    "status": "awaiting_user",
    "unique_reference": "order-2025-114",
    "currency": "CAD",
    "amount": 10000,
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "reference_number": "CA1111111111",
    "requires_authentication": false,
    "expires_at": null
  }
}
```

The response has no `checkout_url`. The payer completes the payment from the email, and `reference_number` identifies the Interac request. `requires_authentication` is `false` for Interac sessions. See [Create a funding session](https://docs.nuvion.co/api-reference/funding-session.md#create-a-funding-session) for every field.

### If the create call fails or times out

Retry with the same `unique_reference`. If a session with that reference already exists, whether it is open or failed, the call returns `409 error_duplicate_resource` and doesn't send the payer another request. Find the existing session with the lookup in [Step 3](#step-3-reconcile-the-inflow). Don't change the `unique_reference` to retry, or the payer can receive two requests.

### Rules for Interac requests

| Field | Rule | Error |
| - | - | - |
| `amount` | Required. From `100` (CAD 1.00) to `2500000` (CAD 25,000.00), in the smallest currency unit. | `400 error_validation_invalid_format` for an amount outside the range. |
| `narration` | Required. 5 to 200 characters of letters, digits, spaces and `# . , ' @ $`. | `422 error_validation_invalid_format` for other characters, `422 error_validation_required_field_missing` when omitted. |
| `meta.name` | Required. Letters A to Z, digits, spaces, hyphens, full stops and apostrophes only. An accented letter or an underscore isn't allowed. | `400 error_validation_invalid_format` for unsupported characters, `422 error_validation_required_field_missing` when omitted. |
| `meta.email` | Required. The address that receives the Interac request. | `422 error_validation_required_field_missing` when omitted. |
| `unique_reference` | Required. Unique across all of the entity's payments. | `409 error_duplicate_resource` when already used, `422 error_validation_required_field_missing` when omitted. |
| Repeat requests | A request whose payer email, amount and narration match an existing Interac request is rejected. Use a different narration or amount for each request. | `400 error_validation_invalid_format` |
| `account_id` | Required. The CAD account to credit. | `404 error_resource_not_found` when no account matches. |

A `400` has no field detail, so an unsupported `meta.name`, an `amount` outside the range and a repeat request all look the same. Check the rules above for each. A `422` names the field.

```json 400 Invalid name, amount or repeat request theme={null}
{
  "status": "error",
  "message": "The 'request' format isn't valid. Please use the correct format.",
  "type": "error_validation_invalid_format"
}
```

```json 422 Invalid narration theme={null}
{
  "status": "error",
  "message": "Validation failed for one or more fields",
  "type": "error_validation_error",
  "validations": [
    {
      "narration": {
        "type": "error_validation_invalid_format",
        "message": "The 'narration' format isn't valid. Please use the correct format."
      }
    }
  ]
}
```

```json 422 Missing required field theme={null}
{
  "status": "error",
  "message": "Validation failed for one or more fields",
  "type": "error_validation_error",
  "validations": [
    {
      "meta.email": {
        "type": "error_validation_required_field_missing",
        "message": "The 'meta.email' field is required. Please include it and try again."
      }
    }
  ]
}
```

```json 404 Unknown account theme={null}
{
  "status": "error",
  "message": "We couldn't find that account. It may have been deleted or the ID might be incorrect.",
  "type": "error_resource_not_found"
}
```

```json 409 Reference already used theme={null}
{
  "status": "error",
  "message": "A record with this unique_reference already exists. Please use different details or check your existing records.",
  "type": "error_duplicate_resource"
}
```

***

## What the payer sees

The payer needs a Canadian bank account that supports Interac e-Transfer. They receive an Interac e-Transfer request at the address in `meta.email`, which doesn't have to be a Canadian address. The email shows:

* A greeting that uses `meta.name`.
* The amount and currency.
* Your `narration` as the message.
* The requester, which is the sender the payer approves or declines, and the request date and expiry date.
* Two actions: respond to the request by choosing a financial institution, or decline it.

In the sandbox, the request comes from a shared test sender, not from your business, and the expiry date is two days after the request.

In production, a request expires three days after you create it. If the payer doesn't respond before then, Interac sends them a second email saying the request has expired. It repeats the amount, the date of the request and your `narration`, and tells the payer to contact you with questions. The email arrives after the request expires, not at the moment it expires, and Nuvion sends no webhook for an expired session. Call `PATCH` to read the outcome.

***

## Step 2: Check the outcome with PATCH

`PATCH /funding-sessions/{id}` is the only call that refreshes an Interac session. It takes no request body and never starts another payment. `GET /funding-sessions/{id}` returns the state Nuvion last stored and never checks with the payment provider, so a `GET` can show `awaiting_user` or `processing` after the payer has declined the request or it has expired.

A new session stays `awaiting_user` until your first `PATCH`. Call `PATCH` when the payer tells you they've paid. If you have no signal from the payer, call it every few minutes. Stop when the session is `settled` or `failed`. `PATCH` returns `201` on success.

```bash curl theme={null}
curl -X PATCH https://api.nuvion.dev/funding-sessions/01HXYZ5805ABCDEFGHJKMNPQRS \
  -H "Authorization: Bearer $NUVION_API_KEY"
```

```json 201 Response theme={null}
{
  "status": "success",
  "message": "Funding session updated successfully",
  "data": {
    "id": "01HXYZ5805ABCDEFGHJKMNPQRS",
    "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
    "payment_id": "01HXYZ5851ABCDEFGHJKMNPQRS",
    "status": "processing",
    "unique_reference": "order-2025-114",
    "amount": 10000,
    "reference_number": "CA1111111111"
  }
}
```

| Status after `PATCH` | Meaning | What to do |
| - | - | - |
| `processing` | The payer hasn't responded yet. | Call `PATCH` again later. |
| `pending_settlement` | The payer accepted the request and the money is on its way to the account. | Call `PATCH` again shortly. |
| `settled` | The payment arrived and the account is credited. `GET` returns `settlement.settled_at`. | Credit your own records once. |
| `failed` | The payer declined the request, or never answered it. A request left unanswered is `failed` within 3 days of creation, with no `failure` object. | Offer the payer a new request. |
| `expired` or `cancelled` | The session has ended. | Treat it as final and offer the payer a new request. |

A session that fails because the payer declined has no `failure` object, and its inflow keeps `status_reason: "awaiting_user_input"`.

Repeating `PATCH` is safe. After the session leaves the pending state, a repeat call returns `400 error_funding_request_not_pending`. Read the final status with `GET /funding-sessions/{id}`.

```json 201 PATCH after the payer accepted theme={null}
{
  "status": "success",
  "message": "Funding session updated successfully",
  "data": {
    "id": "01HXYZ5805ABCDEFGHJKMNPQRS",
    "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
    "payment_id": "01HXYZ5851ABCDEFGHJKMNPQRS",
    "status": "pending_settlement",
    "unique_reference": "order-2025-114",
    "amount": 10000,
    "expires_at": null,
    "reference_number": "CA1111111111"
  }
}
```

```json 400 PATCH on a finished session theme={null}
{
  "status": "error",
  "message": "This funding request can't be modified in its current state. Please check the request status and try again.",
  "type": "error_funding_request_not_pending"
}
```

```json 200 GET after a decline theme={null}
{
  "status": "success",
  "message": "Funding session retrieved successfully",
  "data": {
    "id": "01HXYZ5805ABCDEFGHJKMNPQRS",
    "status": "failed",
    "amount": 10000,
    "currency": "CAD",
    "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
    "unique_reference": "order-2025-114",
    "narration": "Wallet top up",
    "meta": {
      "name": "Ada Lovelace",
      "email": "ada@example.com"
    },
    "redirect_url": "https://yourplatform.com/checkout/complete",
    "created": 1793887242278,
    "updated": 1793887542278
  }
}
```

```json 200 GET after settlement theme={null}
{
  "status": "success",
  "message": "Funding session retrieved successfully",
  "data": {
    "id": "01HXYZ5805ABCDEFGHJKMNPQRS",
    "status": "settled",
    "amount": 10000,
    "currency": "CAD",
    "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
    "unique_reference": "order-2025-114",
    "narration": "Wallet top up",
    "meta": {
      "name": "Ada Lovelace",
      "email": "ada@example.com"
    },
    "settlement": {
      "rail": null,
      "settled_at": 1793887782278
    },
    "created": 1793887245278,
    "updated": 1793887782278,
    "expires_at": null
  }
}
```

### Poll until the session is final

Each example takes the session ID as its argument and reads your API key from `NUVION_API_KEY`. It calls `PATCH`, falls back to `GET` when the session has already ended, and stops on `settled`, `failed`, `expired` or `cancelled`. Otherwise it waits three minutes and calls `PATCH` again. The JavaScript example needs Node 18 or later, the Python example uses the `requests` package, and the Go example needs Go 1.21 or later.

**Polling examples in JavaScript, Python, PHP, Ruby, Go and C#**

```javascript JavaScript theme={null}
const url = `https://api.nuvion.dev/funding-sessions/${process.argv[2]}`;
const headers = { Authorization: `Bearer ${process.env.NUVION_API_KEY}` };
const INTERVAL_SECONDS = 180;
const TERMINAL = ["settled", "failed", "expired", "cancelled"];

async function refresh() {
  let res = await fetch(url, { method: "PATCH", headers });
  let body = await res.json();
  if (res.status === 400 && body.type === "error_funding_request_not_pending") {
    res = await fetch(url, { headers });
    body = await res.json();
  }
  if (!res.ok) throw new Error(`${res.status} ${body.type}`);
  return body.data.status;
}

while (true) {
  const status = await refresh();
  console.log(status);
  if (TERMINAL.includes(status)) break;
  await new Promise((resolve) => setTimeout(resolve, INTERVAL_SECONDS * 1000));
}
```

```python Python theme={null}
import os
import sys
import time

import requests

URL = f"https://api.nuvion.dev/funding-sessions/{sys.argv[1]}"
HEADERS = {"Authorization": f"Bearer {os.environ['NUVION_API_KEY']}"}
INTERVAL_SECONDS = 180
TERMINAL = {"settled", "failed", "expired", "cancelled"}


def refresh():
    res = requests.patch(URL, headers=HEADERS)
    if res.status_code == 400 and res.json().get("type") == "error_funding_request_not_pending":
        res = requests.get(URL, headers=HEADERS)
    res.raise_for_status()
    return res.json()["data"]["status"]


while True:
    status = refresh()
    print(status)
    if status in TERMINAL:
        break
    time.sleep(INTERVAL_SECONDS)
```

```php PHP theme={null}
<?php
const INTERVAL_SECONDS = 180;
$url = "https://api.nuvion.dev/funding-sessions/" . $argv[1];
$key = getenv("NUVION_API_KEY");
$terminal = ["settled", "failed", "expired", "cancelled"];

function call(string $method, string $url, string $key): array
{
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST => $method,
        CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
        CURLOPT_RETURNTRANSFER => true,
    ]);
    $body = json_decode(curl_exec($ch), true);
    $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    return [$code, $body];
}

while (true) {
    [$code, $body] = call("PATCH", $url, $key);
    if ($code === 400 && ($body["type"] ?? "") === "error_funding_request_not_pending") {
        [$code, $body] = call("GET", $url, $key);
    }
    if ($code >= 400) {
        throw new RuntimeException("$code " . ($body["type"] ?? ""));
    }
    $status = $body["data"]["status"];
    echo $status, "\n";
    if (in_array($status, $terminal, true)) {
        break;
    }
    sleep(INTERVAL_SECONDS);
}
```

```ruby Ruby theme={null}
require "json"
require "net/http"

URL = URI("https://api.nuvion.dev/funding-sessions/#{ARGV[0]}")
INTERVAL_SECONDS = 180
TERMINAL = %w[settled failed expired cancelled]

def call(request_class)
  request = request_class.new(URL, "Authorization" => "Bearer #{ENV['NUVION_API_KEY']}")
  response = Net::HTTP.start(URL.host, URL.port, use_ssl: true) { |http| http.request(request) }
  [response.code.to_i, JSON.parse(response.body)]
end

loop do
  code, body = call(Net::HTTP::Patch)
  code, body = call(Net::HTTP::Get) if code == 400 && body["type"] == "error_funding_request_not_pending"
  raise "#{code} #{body['type']}" if code >= 400

  status = body.dig("data", "status")
  puts status
  break if TERMINAL.include?(status)

  sleep INTERVAL_SECONDS
end
```

```go Go theme={null}
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"slices"
	"time"
)

const intervalSeconds = 180

var terminal = []string{"settled", "failed", "expired", "cancelled"}

type response struct {
	Type string `json:"type"`
	Data struct {
		Status string `json:"status"`
	} `json:"data"`
}

func call(method, url string) (int, response) {
	req, _ := http.NewRequest(method, url, nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("NUVION_API_KEY"))
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	var body response
	json.NewDecoder(res.Body).Decode(&body)
	return res.StatusCode, body
}

func main() {
	url := "https://api.nuvion.dev/funding-sessions/" + os.Args[1]
	for {
		code, body := call("PATCH", url)
		if code == 400 && body.Type == "error_funding_request_not_pending" {
			code, body = call("GET", url)
		}
		if code >= 400 {
			panic(fmt.Sprintf("%d %s", code, body.Type))
		}
		fmt.Println(body.Data.Status)
		if slices.Contains(terminal, body.Data.Status) {
			break
		}
		time.Sleep(intervalSeconds * time.Second)
	}
}
```

```csharp C# theme={null}
using System.Net.Http.Headers;
using System.Text.Json;

const int IntervalSeconds = 180;
var terminal = new[] { "settled", "failed", "expired", "cancelled" };
var url = $"https://api.nuvion.dev/funding-sessions/{args[0]}";

using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("NUVION_API_KEY"));

async Task<(int Code, JsonElement Body)> Call(HttpMethod method)
{
    var response = await http.SendAsync(new HttpRequestMessage(method, url));
    var body = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement.Clone();
    return ((int)response.StatusCode, body);
}

while (true)
{
    var (code, body) = await Call(HttpMethod.Patch);
    if (code == 400 && body.TryGetProperty("type", out var type) && type.GetString() == "error_funding_request_not_pending")
    {
        (code, body) = await Call(HttpMethod.Get);
    }
    if (code >= 400) throw new Exception($"{code}");

    var status = body.GetProperty("data").GetProperty("status").GetString()!;
    Console.WriteLine(status);
    if (terminal.Contains(status)) break;
    await Task.Delay(IntervalSeconds * 1000);
}
```

***

## Step 3: Reconcile the inflow

Reconciling means matching the money in your account to the order that caused it. Every funding session has one inflow transaction, which Nuvion creates with the session. Credit your own records only when the session is `settled`.

### 1. Look up the inflow

Filter transfers by the `unique_reference` you sent when you created the session.

```bash curl theme={null}
curl "https://api.nuvion.dev/transfers?type=inflow&payment_type=funding-session&unique_reference=order-2025-114" \
  -H "Authorization: Bearer $NUVION_API_KEY"
```

```json 200 Inflow after the payer declined theme={null}
{
  "status": "success",
  "message": "Transfers retrieved successfully",
  "data": {
    "data": [
      {
        "id": "01HXYZ5852ABCDEFGHJKMNPQRS",
        "amount": 10000,
        "currency": "CAD",
        "unique_reference": "order-2025-114",
        "counterparty_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
        "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
        "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
        "status": "failed",
        "status_reason": "awaiting_user_input",
        "narration": "Wallet top up",
        "type": "inflow",
        "payment_type": "funding-session",
        "applicable_fee": 0,
        "meta": {
          "provider_code": "prv",
          "funding_type": "interac",
          "funding_request_id": "01HXYZ5853ABCDEFGHJKMNPQRS",
          "funding_session_id": "01HXYZ5805ABCDEFGHJKMNPQRS",
          "provider_reference": null
        },
        "created": 1793887242278,
        "updated": 1793887542278
      }
    ],
    "meta": {
      "pagination": {
        "order": "desc",
        "has_next": false,
        "limit": 20,
        "has_previous": false,
        "next_cursor": null,
        "previous_cursor": null
      },
      "filters_applied": {
        "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
        "type": "inflow",
        "payment_type": "funding-session",
        "unique_reference": "order-2025-114",
        "sort": {
          "field": "created",
          "order": "desc"
        }
      }
    }
  }
}
```

```json 200 Inflow after settlement theme={null}
{
  "status": "success",
  "message": "Transfers retrieved successfully",
  "data": {
    "data": [
      {
        "id": "01HXYZ5852ABCDEFGHJKMNPQRS",
        "amount": 10000,
        "currency": "CAD",
        "unique_reference": "order-2025-114",
        "counterparty_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
        "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
        "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
        "status": "successful",
        "status_reason": "Transfer completed",
        "narration": "Wallet top up",
        "type": "inflow",
        "payment_type": "funding-session",
        "applicable_fee": 100,
        "meta": {
          "provider_code": "prv",
          "funding_type": "interac",
          "funding_request_id": "01HXYZ5853ABCDEFGHJKMNPQRS",
          "funding_session_id": "01HXYZ5805ABCDEFGHJKMNPQRS",
          "provider_reference": "CA1111111111"
        },
        "created": 1793887242278,
        "updated": 1793887782278
      }
    ],
    "meta": {
      "pagination": {
        "order": "desc",
        "has_next": false,
        "limit": 20,
        "has_previous": false,
        "next_cursor": null,
        "previous_cursor": null
      },
      "filters_applied": {
        "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
        "type": "inflow",
        "payment_type": "funding-session",
        "unique_reference": "order-2025-114",
        "sort": {
          "field": "created",
          "order": "desc"
        }
      }
    }
  }
}
```

### 2. Check that it matches

Before you act on the inflow, confirm all of the following:

* `data.data` has exactly one item.
* `meta.funding_session_id` is the ID of the session you created.
* `amount` and `currency` are what you requested.

### 3. Read the inflow's status and fee

The inflow should agree with the session status from `PATCH`. What to do for each status is in [Step 2](#step-2-check-the-outcome-with-patch).

| Session status | Inflow `status` |
| - | - |
| `awaiting_user`, `processing` or `pending_settlement` | `pending` |
| `settled` | `successful`, with `status_reason: "Transfer completed"` and `provider_reference` set to the session's `reference_number`. |
| `failed` | `failed`, with `status_reason: "awaiting_user_input"` |

`applicable_fee` is `0` until the session settles. Afterwards it is the fee your fee rules charge for the collection, so don't assume it stays `0`. The examples here show `100`, which is CAD 1.00. The account is credited the payer's `amount` less `applicable_fee`. Read the fee from the inflow after `settled` and record it, and account for it when you set your own platform fee.

A settled session also sends `inflows.completed` to your webhook endpoint with the same inflow, and a `funding_sessions.updated` event for the session. A declined session sends neither.

```json inflows.completed theme={null}
{
  "event": "inflows.completed",
  "data": {
    "id": "01HXYZ5852ABCDEFGHJKMNPQRS",
    "amount": 10000,
    "currency": "CAD",
    "unique_reference": "order-2025-114",
    "counterparty_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
    "account_id": "01HXYZ5503ABCDEFGHJKMNPQRS",
    "entity_id": "01HXYZ5502ABCDEFGHJKMNPQRS",
    "status": "successful",
    "status_reason": "Transfer completed",
    "narration": "Wallet top up",
    "type": "inflow",
    "payment_type": "funding-session",
    "applicable_fee": 100,
    "meta": {
      "provider_code": "prv",
      "funding_type": "interac",
      "funding_request_id": "01HXYZ5853ABCDEFGHJKMNPQRS",
      "funding_session_id": "01HXYZ5805ABCDEFGHJKMNPQRS",
      "provider_reference": "CA1111111111"
    },
    "created": 1793887242278,
    "updated": 1793887782278,
    "account": {
      "meta": {
        "asset_type": "",
        "network": ""
      },
      "id": "01HXYZ5503ABCDEFGHJKMNPQRS",
      "display_name": "Wallet CAD"
    }
  }
}
```

See [Event types](https://docs.nuvion.co/webhooks/event-types.md#inflows-completed) for the full payload schema.

### 4. Credit once

Key the credit on your `unique_reference`, so that running the check twice can't credit the same order twice. See [Find the inflow for a session](https://docs.nuvion.co/guides/funding-session.md#find-the-inflow-for-a-session) for the inflow's fields, and [Confirm state before acting](https://docs.nuvion.co/webhooks/overview.md#confirm-state-before-acting).

***

## Collect into a customer's account

If you run a platform, you can collect straight into one of your customers' accounts, so a payer pays that customer directly. Create the funding session with your own API key, and set `entity_id` to the customer's entity and `account_id` to that customer's CAD account. The request is the same as in Step 1 with those two fields added, and the response has the same fields. See [Managing child entities](https://docs.nuvion.co/core-concepts/entities.md#managing-child-entities).

```bash curl theme={null}
curl -X POST https://api.nuvion.dev/funding-sessions \
  -H "Authorization: Bearer $NUVION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency": "CAD",
    "funding_type": "interac",
    "account_id": "01HXYZ5603ABCDEFGHJKMNPQRS",
    "entity_id": "01HXYZ5601ABCDEFGHJKMNPQRS",
    "unique_reference": "sale-2025-031",
    "narration": "Seller payment",
    "meta": {
      "name": "Ada Lovelace",
      "email": "ada@example.com"
    }
  }'
```

The inflow belongs to the customer's entity and account. You still call `PATCH /funding-sessions/{id}` with your own key. To look up the inflow, pass the customer's `entity_id` as well, or the lookup returns no results.

```bash curl theme={null}
curl "https://api.nuvion.dev/transfers?type=inflow&payment_type=funding-session&unique_reference=sale-2025-031&entity_id=01HXYZ5601ABCDEFGHJKMNPQRS" \
  -H "Authorization: Bearer $NUVION_API_KEY"
```

To hold the money before it reaches the customer, or to pay a customer who isn't on Nuvion, collect into your own account instead and then pay out. Use a [book transfer](https://docs.nuvion.co/guides/send-within-nuvion.md) to another Nuvion account, or an Interac payout from [Send a payout](https://docs.nuvion.co/guides/send-a-payout.md).

***

## Test end to end

An Interac request has three possible outcomes. The sandbox can produce two of them. A payment that settles needs a real Canadian bank account, so test it in production.

| Outcome | How to trigger it | Where | Session after `PATCH` | Inflow | Emails to the payer | Webhooks |
| - | - | - | - | - | - | - |
| Declined | The payer declines the request. | Sandbox and production | `failed` | `failed`, `status_reason: "awaiting_user_input"` | The request | None |
| Expired | The payer never responds. | Sandbox (2 days), production (3 days) | `failed`, with no `failure` object | `failed`, `status_reason: "awaiting_user_input"` | The request, then an expiry email after the request expires | None |
| Settled | The payer accepts from their Canadian bank. | Production only | `pending_settlement`, then `settled` | `successful` | The request | `inflows.completed` and `funding_sessions.updated` |

Before every run, give the request an email address you can open and a `narration` or `amount` you haven't used for that address. A repeat of an earlier request returns `400 error_validation_invalid_format`, so change the narration for each run.

### Test a decline in the sandbox

1. Create a session with your own email address in `meta.email`.
2. Open the Interac email and decline the request.
3. Call `PATCH /funding-sessions/{id}`. The session moves to `failed`, and the inflow moves to `failed` too.

### Test an expiry in the sandbox

1. Create a session with your own email address in `meta.email`, and don't respond to the request.
2. Call `PATCH /funding-sessions/{id}` while the request is open. The status stays `processing`.
3. Wait two days, then call `PATCH` again. The session is `failed`, and the inflow is `failed` with `status_reason: "awaiting_user_input"`.
4. Look for the second Interac email. It arrives after the request expires, not at the moment it expires.

Production works the same way with a three-day window.

### Test a settled payment in production

You can't complete an Interac payment in the sandbox. Before general release, make one small live payment in production:

1. Create a session for the minimum amount, `100` (CAD 1.00), with an email address you can open.
2. Accept the request from a Canadian bank account that supports Interac e-Transfer.
3. Call `PATCH /funding-sessions/{id}` until the status is `settled`. The first `PATCH` returns `processing`, and the next returns `pending_settlement` once the payer accepts.
4. Look up the inflow as in [Step 3](#step-3-reconcile-the-inflow). It is `successful`, and `applicable_fee` shows what the collection cost.
5. Check that your webhook endpoint received `inflows.completed` and `funding_sessions.updated`.

See [Sandbox and testing](https://docs.nuvion.co/sandbox.md) for the other sandbox behaviors.

***

## Troubleshooting

| What you see | Why | What to do |
| - | - | - |
| `GET` shows `awaiting_user` or `processing` after the payer paid | `GET` returns the last state Nuvion stored. | Call `PATCH`. |
| `PATCH` keeps returning `processing` | The payer hasn't accepted or declined the request yet. | Keep polling until the session is `settled` or `failed`. Stop after 3 days, because an unanswered request is `failed` by then. A sandbox payment can't be completed, so use the decline or expiry test. |
| No webhook arrived | A declined or unanswered session sends no webhook, and others can arrive late. | Poll with `PATCH`. |
| `PATCH` returns `400 error_funding_request_not_pending` | The session is already final. | Call `GET /funding-sessions/{id}` for its status. |
| The inflow shows `status_reason: "awaiting_user_input"` after a decline | A session that fails because the payer declined leaves the inflow `failed` with that reason. | Read the inflow's `status`, which is `failed`. |
| Create returns `400 error_validation_invalid_format` | `meta.name` has an unsupported character, the `amount` is outside CAD 1.00 to 25,000.00, or the payer email, amount and narration match an existing request. | Fix the name, keep the amount in range, or change the narration or amount. |
| Create returns `422` for `narration` | The narration has unsupported characters, or isn't 5 to 200 characters. | Follow the narration rule in [Rules for Interac requests](#rules-for-interac-requests). |
| Create returns `409 error_duplicate_resource` | The `unique_reference` is already used. | Look up the existing session in [Step 3](#step-3-reconcile-the-inflow) instead of creating another. |
| Create fails with a `5xx` or times out | The request may have been created. | Retry with the same `unique_reference`. See [If the create call fails or times out](#if-the-create-call-fails-or-times-out). |

***

## Before you go live

* Call `PATCH` on a schedule for every open session, and stop when the session is `settled` or `failed`.
* Use a different narration or amount for each request to the same payer.
* Remove accents and other unsupported characters from `meta.name` before sending it.
* Credit your own records once, only after `settled`, and key the credit on `unique_reference`.
* Don't rely on webhooks alone to learn the outcome. If you also consume `inflows.completed`, verify the signature and de-duplicate on `x-nuvion-event-id`. See [Webhooks](https://docs.nuvion.co/webhooks/overview.md).

***

## What's next

> [card] [Funding sessions](https://docs.nuvion.co/guides/funding-session.md)
>
> All funding rails, statuses and webhooks.

> [card] [Funding Session API reference](https://docs.nuvion.co/api-reference/funding-session.md)
>
> Full endpoint documentation for creating, updating, and retrieving funding sessions.

> [card] [Send a payout](https://docs.nuvion.co/guides/send-a-payout.md)
>
> Send CAD to a recipient by Interac.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.