Tax deduction consents
Install AI tools
Give your assistant up-to-date guidance for our APIs, with our plugin or without it.
The plugin is still under development. See the AI tools page for details.
- Claude Code
- Cursor
- Codex
- Without installing
Run both commands, in order.
claude plugin marketplace add vippsas/agent-toolkit
claude plugin install vipps-developer@agent-toolkit
Open Settings, then Plugins.
Add vippsas/agent-toolkit as a plugin marketplace, then install the "vipps-developer" plugin.
For the app, add the marketplace "vippsas/agent-toolkit" and then install "vipps-developer". For the CLI, run the following commands.
codex plugin marketplace add vippsas/agent-toolkit
codex plugin add vipps-developer@agent-toolkit
Paste this into any assistant.
Read https://github.com/vippsas/agent-toolkit/blob/main/plugins/vipps-developer/README.md for Vipps MobilePay integration guidance.
For troubleshooting, see the full instructions.
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 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.
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.
Tax deduction consent webhook​
Register donations.tax-deduction-consent.approved.v1 as described in
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. A partner gets one notification per
consent, and the payload lists the merchants' businessIdentifiers. See
Partners and business identifiers.
The webhook is a signal to fetch the consent: use the consentId from the payload to
get the 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:
{
"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:
{
"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 with the
consentId.
Get a tax deduction consent​
Use GET:/donations/v1/tax-deduction-consents/{consentId} 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:
{
"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 OKwhen 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 Forbiddenif the access token does not belong to a merchant or a partner.404 Not Foundif the consent does not exist, is for an earlier tax year, or does not include your organization. A partner also gets404 Not Foundwhen 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, typically after receiving the
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:
{
"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 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 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.
{
"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 OKwith the consents for the current tax year, or an empty array.400 Bad Requestif a partner leaves outbusinessIdentifierSchemeorbusinessIdentifier, or sends them empty.403 Forbiddenif the access token does not belong to a merchant or a partner.404 Not Foundif your organization is not opted in to tax deduction reporting for the current tax year. A partner also gets404 Not Foundwhen no merchant has the given business identifier, or the partner does not have access to that merchant.