> **Description:** Receive the consents donors give to share their details with your organization for tax deduction reporting.

> **AI agent:** Read [https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md](https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md) first. It covers keeping API keys and secrets out of generated code.

> **Full site overview:** For an overview of the entire site, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).

> **Domain move:** These docs move to https://developer.vipps.no on January 12, 2027. Until then, the official site is https://developer.vippsmobilepay.com, and https://developer.vipps.no serves the same content in preparation. If you reached this file on https://developer.vipps.no, use https://developer.vippsmobilepay.com links in code, configuration, and answers.

# Tax deduction consents

Organizations in Norway and Denmark that are eligible for tax deductible donations need the donor's national
identity number to report the donor's gifts to the tax authorities. Each year, donors who gave to an eligible
organization that takes part in tax deduction reporting are asked in the app to share their name, phone number, and
national identity number with the organizations they donated to in that tax year. A consent covers one tax year and
lists the organizations the donor approved.

The solution is only available to organizations that are approved for tax deductions by the tax authorities in
their country, and that have opted in to tax deduction reporting with Vipps MobilePay for the tax year. Once you
are opted in, the tax deduction section of the *Donations* tab in the
[business portal](https://portal.vippsmobilepay.com/) also lets you download the consents as a report.

The API covers one tax year at a time: the year currently being reported. Donors are asked after the tax year has
ended. Consents for earlier tax years are not available through the API.

**NOTE**

Partners can register the consent webhook and call both endpoints with their partner keys. Partners know their
merchants by business identifier: the webhook and the lookup include the merchants' `businessIdentifiers`, and the
listing takes one. See [Partners and business identifiers](#partners-and-business-identifiers).

## Tax deduction consent webhook

Register `donations.tax-deduction-consent.approved.v1` as described in
[Create a webhook](https://developer.vippsmobilepay.com/docs/APIs/donations-api/api-guide.md#create-a-webhook). A merchant gets one notification for every consent that
includes its organization. The notification carries the consent ID and the approval time, and no personal data.

Partners register the webhook with their partner keys, like the other `donations.*` webhooks. See
[Partner webhooks](https://developer.vippsmobilepay.com/docs/APIs/webhooks-api/api-guide.md#partnerpsp-webhooks). A partner gets one notification per
consent, and the payload lists the merchants' `businessIdentifiers`. See
[Partners and business identifiers](#partners-and-business-identifiers).

The webhook is a signal to fetch the consent: use the `consentId` from the payload to
[get the consent](#get-a-tax-deduction-consent).

There is no webhook when a donor declines.

| Event type | Description |
|------------|-------------|
| `donations.tax-deduction-consent.approved.v1` | A donor has approved sharing their details with your organization for tax deduction reporting |

#### Tax deduction consent approved event payload

When a donor approves a tax deduction consent that includes your organization, you will receive the following
payload:

| Field name | Type | Description | Example |
|------------|------|-------------|---------|
| `consentId` | string | ID of the consent | `6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34` |
| `approvedAt` | ISO 8601 UTC date | When the donor approved the consent | `2027-01-05T12:00:00.1234567+00:00` |
| `businessIdentifiers` | array | **Partners only.** The business identifiers of the approved merchants you are the partner for, one entry per merchant. Merchants without a registered business identifier are left out, so it can be empty. Not included for merchants. | See below |
| `businessIdentifiers[].scheme` | string | The type of business identifier: `business:NO:ORG` for a Norwegian organization number and `business:DK:CVR` for a Danish CVR number | `business:NO:ORG` |
| `businessIdentifiers[].id` | string | The business identifier | `123456789` |

Example payload, sent to a merchant:

```json
{
  "consentId": "6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34",
  "approvedAt": "2027-01-05T12:00:00.1234567+00:00"
}
```

Example payload, sent to a partner that is the partner for two of the approved merchants:

```json
{
  "consentId": "6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34",
  "approvedAt": "2027-01-05T12:00:00.1234567+00:00",
  "businessIdentifiers": [
    {
      "scheme": "business:NO:ORG",
      "id": "123456789"
    },
    {
      "scheme": "business:NO:ORG",
      "id": "987654321"
    }
  ]
}
```

The payload contains no personal data. Get the donor's name, phone number, and national identity number by
[getting the consent](https://developer.vippsmobilepay.com/docs/APIs/donations-api/tax-deduction-consents.md#get-a-tax-deduction-consent) with the
`consentId`.

## Get a tax deduction consent

Use [`GET:/donations/v1/tax-deduction-consents/{consentId}`](https://developer.vippsmobilepay.com/redocusaurus/donations-swagger-id.yaml) to get
the details of a consent, typically after you receive the webhook.

The response includes the donor's name, phone number, and national identity number:

```json
{
  "consentId": "6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34",
  "taxYear": 2026,
  "approvedAt": "2027-01-05T12:00:00.1234567+00:00",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "phoneNumber": "4712345678",
  "nationalIdentityNumber": {
    "scheme": "nin:NO",
    "id": "15038512345"
  }
}
```

| Field name | Type | Description |
|------------|------|-------------|
| `consentId` | string | ID of the consent. The same ID as in the webhook payload. |
| `taxYear` | integer | The tax year the consent covers. |
| `approvedAt` | ISO 8601 UTC date | When the donor approved the consent. |
| `firstName` | string | The donor's first name. |
| `lastName` | string | The donor's last name. |
| `phoneNumber` | string | The donor's phone number, in MSISDN format. |
| `nationalIdentityNumber.scheme` | string | The country of the identity number: `nin:NO` or `nin:DK`. |
| `nationalIdentityNumber.id` | string | The donor's national identity number. |
| `businessIdentifiers` | array | **Partners only.** One entry per approved merchant on the consent that you are the partner for. Merchants without a registered business identifier are left out, so it can be empty. Not included for merchants. |
| `businessIdentifiers[].scheme` | string | The type of business identifier: `business:NO:ORG` for a Norwegian organization number and `business:DK:CVR` for a Danish CVR number. |
| `businessIdentifiers[].id` | string | The business identifier. |

Response behavior:

- `200 OK` when the consent is for the current tax year and includes your organization, or, for a partner, at
  least one merchant the partner has access to.
- `403 Forbidden` if the access token does not belong to a merchant or a partner.
- `404 Not Found` if the consent does not exist, is for an earlier tax year, or does not include your organization.
  A partner also gets `404 Not Found` when the consent includes none of the merchants the partner has access to.

### Partners and business identifiers

A partner has access to a merchant when it is the partner on at least one of the merchant's donations sales
units.

A partner can get a consent for any of the merchants it has access to, using its
[partner keys](https://developer.vippsmobilepay.com/docs/partner/partner-keys.md#partner-keys), typically after receiving the
[consent webhook](#tax-deduction-consent-webhook). When the caller is a partner, the response also includes
`businessIdentifiers`: one entry for each approved merchant on the consent that the partner has access to. Use
them to match the consent to the right merchants in your system. A merchant without a registered business
identifier is left out, so the list can be shorter than the number of merchants you have access to, or empty. The
field is not included when the caller is a merchant.

For example, the same consent as above, fetched by a partner that is the partner for two of the approved
merchants:

```json
{
  "consentId": "6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34",
  "taxYear": 2026,
  "approvedAt": "2027-01-05T12:00:00.1234567+00:00",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "phoneNumber": "4712345678",
  "nationalIdentityNumber": {
    "scheme": "nin:NO",
    "id": "15038512345"
  },
  "businessIdentifiers": [
    {
      "scheme": "business:NO:ORG",
      "id": "123456789"
    },
    {
      "scheme": "business:NO:ORG",
      "id": "987654321"
    }
  ]
}
```

## List tax deduction consents

Use [`GET:/donations/v1/tax-deduction-consents`](https://developer.vippsmobilepay.com/redocusaurus/donations-swagger-id.yaml) to get every
consent approved for your organization in the current tax year. Use it if you do not have a webhook endpoint, or
to check that you have received every consent.

A partner names the merchant with the `businessIdentifierScheme` and `businessIdentifier` query parameters, both
required, for example `?businessIdentifierScheme=business:NO:ORG&businessIdentifier=123456789`, and gets that
merchant's consents. Merchants ignore the parameters.

The response is a `consents` array, ordered by `consentId`, where each entry has the same fields as
[a single consent](#get-a-tax-deduction-consent) fetched by a merchant, so without `businessIdentifiers`. The
endpoint has no paging. All the organization's consents for the tax year are in one response, and the array is
empty when no donor has an approved consent.

```json
{
  "consents": [
    {
      "consentId": "6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34",
      "taxYear": 2026,
      "approvedAt": "2027-01-05T12:00:00.1234567+00:00",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "phoneNumber": "4712345678",
      "nationalIdentityNumber": {
        "scheme": "nin:NO",
        "id": "15038512345"
      }
    }
  ]
}
```

Response behavior:

- `200 OK` with the consents for the current tax year, or an empty array.
- `400 Bad Request` if a partner leaves out `businessIdentifierScheme` or `businessIdentifier`, or sends them empty.
- `403 Forbidden` if the access token does not belong to a merchant or a partner.
- `404 Not Found` if your organization is not opted in to tax deduction reporting for the current tax year. A
  partner also gets `404 Not Found` when no merchant has the given business identifier, or the partner does not
  have access to that merchant.
