Skip to content
Back to News
Changelog

SDK 5.7.0: choose the language of an authorisation request

sdkapiplatform

When you ask one of your customers to authorise their Peppol registration, they get an email, open a confirmation page and confirm a written authorisation. Until now all three were in English. You can now name the language in the request:

import { Peppol } from "@getpeppr/sdk";

const peppol = new Peppol({ apiKey: "sk_live_your_master_key" });

const attestation = await peppol.legalEntities.requestAttestation(entityId, {
  contactEmail: "owner@customer.example",
  language: "en",
});

console.log(attestation.language, attestation.languageSource); // "en", "explicit"

language is a BCP 47 tag, matched without regard to case and never approximated. Leave it out and the request goes out in English, with languageSource: "default". The response always tells you the language the request was actually sent in.

Which languages. A translation is used on production only once a native reader has approved its wording. Two languages are available: en and, since its native review was recorded the same day, nl-BE (Dutch, Belgium). The Supported languages table is the current list. A language that is not available returns 400 attestation.language_unsupported with a supportedLanguages list, and nothing is sent: the request never goes out in another language instead.

Need another language? We assess and add languages on request: write to hello@getpeppr.dev with the language your customers need. A new language goes through the same native review before production uses it.

On the confirmation page, your customer can switch to another available language for the same wording, and the record keeps the language they confirmed in. A resend may use a different language.

Compatibility. Both new response fields are optional in the SDK types. The SDK passes on what the gateway sends and never fills them in itself. A call without language is still sent in English; its response now also carries the two fields.

npm install @getpeppr/sdk@5.7.0

Full contract on the legal entities documentation page.