Skip to main content

Tax deduction consents

View as Markdown (opens in a new tab)
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.

Run both commands, in order.

claude plugin marketplace add vippsas/agent-toolkit
claude plugin install vipps-developer@agent-toolkit

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.

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.

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 typeDescription
donations.tax-deduction-consent.approved.v1A donor has approved sharing their details with your organization for tax deduction reporting

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

Field nameTypeDescriptionExample
consentIdstringID of the consent6f3c1d2e-9b4a-4c8e-8f21-0b5d7e9a1c34
approvedAtISO 8601 UTC dateWhen the donor approved the consent2027-01-05T12:00:00.1234567+00:00
businessIdentifiersarrayPartners 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[].schemestringThe type of business identifier: business:NO:ORG for a Norwegian organization number and business:DK:CVR for a Danish CVR numberbusiness:NO:ORG
businessIdentifiers[].idstringThe business identifier123456789

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.

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 nameTypeDescription
consentIdstringID of the consent. The same ID as in the webhook payload.
taxYearintegerThe tax year the consent covers.
approvedAtISO 8601 UTC dateWhen the donor approved the consent.
firstNamestringThe donor's first name.
lastNamestringThe donor's last name.
phoneNumberstringThe donor's phone number, in MSISDN format.
nationalIdentityNumber.schemestringThe country of the identity number: nin:NO or nin:DK.
nationalIdentityNumber.idstringThe donor's national identity number.
businessIdentifiersarrayPartners 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[].schemestringThe type of business identifier: business:NO:ORG for a Norwegian organization number and business:DK:CVR for a Danish CVR number.
businessIdentifiers[].idstringThe 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, 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 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.