Emirates ID and Trade Licence Number on Long-Lived Payments — Sending Them as a TPP, Checking Them as an LFI
A long-lived payment consent is authorized once and then pays many times. From v2.2, the TPP sends an identifier on every POST /payments under such a consent: a Retail User's Emirates ID in Risk.DebtorIndicators.EmiratesId, or, for an SME or Corporate User, the Trade Licence number of the business in Risk.DebtorIndicators.TradeLicenceNumber. The LFI uses it to confirm that each payment is being made for the same User, or the same business, for whom the consent was authorized.
One identifier, on every payment
A Single Instant Payment consent is authorized and used once. Every other payment consent is long-lived: the User authorizes it at the LFI once, and the TPP then initiates payments under it for weeks or months, often with the User not present. Each of those later payments reaches the LFI with no authentication of its own — only the consent it was made under.
v2.1 identifies the User initiating a payment in Risk.DebtorIndicators only by name. v2.2 adds two identifiers (changelog §21), and for long-lived consents the TPP requirements make the one that applies to the User mandatory. The LFI compares it with what it holds for the customer behind the consent.
| User | Field | Holds | Format |
|---|---|---|---|
| Retail | EmiratesId | The Emirates ID number of the User | ^784-?[0-9]{4}-?[0-9]{7}-?[0-9]{1}$ — 15 digits, hyphens optional |
| SME or Corporate | TradeLicenceNumber | The Trade Licence number of the business on whose behalf the User is initiating the payment | No pattern — the format varies by issuing authority |
| Who | What | When |
|---|---|---|
| TPP | Captures the Retail User's Emirates ID, or the Trade Licence number of the SME or Corporate User's business | Before the first payment under the consent |
| TPP | Sends it in Risk.DebtorIndicators.EmiratesId or Risk.DebtorIndicators.TradeLicenceNumber inside the encrypted PII | Every POST /payments under a long-lived consent |
| LFI | Compares it with the Emirates ID or Trade Licence number held for the customer | On receiving POST /payments at its Ozone Connect endpoint |
Risk is part of the payment PII, which the TPP signs and encrypts to the LFI. The API Hub passes it through without decrypting it, so neither identifier is ever held centrally. See Payment PII Encryption.
Every payment type except Single Instant Payment
The requirement applies to the seven multi-payment types. An LFI can tell them apart from a Single Instant Payment consent by its ControlParameters:
| Payment type | Identified on the consent by | TPP requirements |
|---|---|---|
| Fixed Defined Schedule | ConsentSchedule.MultiPayment | Payment Initiation |
| Fixed Periodic Schedule | ConsentSchedule.MultiPayment | Payment Initiation |
| Fixed On Demand | ConsentSchedule.MultiPayment | Payment Initiation |
| Variable Defined Schedule | ConsentSchedule.MultiPayment | Payment Initiation |
| Variable Periodic Schedule | ConsentSchedule.MultiPayment | Payment Initiation |
| Variable On Demand | ConsentSchedule.MultiPayment | Payment Initiation |
| Delegated SCA | IsDelegatedAuthentication: true, with an empty ConsentSchedule | Payment Initiation |
A Single Instant Payment consent carries ConsentSchedule.SinglePayment instead, and is out of scope.
Capture the one that applies, then send it on every payment
- For a Retail User, the TPP MUST capture the User's Emirates ID before initiating payments under a long-lived consent, and send it in
Risk.DebtorIndicators.EmiratesId. - For an SME or Corporate User, the TPP MUST capture the Trade Licence number of the business on whose behalf the User is initiating payments, and send it in
Risk.DebtorIndicators.TradeLicenceNumber. - The TPP MUST send it in the PII of every
POST /paymentsunder that consent — not only the first. EmiratesIdmust match^784-?[0-9]{4}-?[0-9]{7}-?[0-9]{1}$: the 15 digits of the Emirates ID, with or without hyphens.TradeLicenceNumberhas no pattern, as the format varies by issuing authority; send it as it appears on the business's Trade Licence.
{
"Risk": {
"DebtorIndicators": {
"EmiratesId": "784-1990-1234567-1",
"Authentication": { "...": "..." },
"...": "..."
},
"TransactionIndicators": { "...": "..." },
"CreditorIndicators": { "...": "..." }
}
}{
"Risk": {
"DebtorIndicators": {
"TradeLicenceNumber": "CN-1234567",
"Authentication": { "...": "..." },
"...": "..."
},
"TransactionIndicators": { "...": "..." },
"CreditorIndicators": { "...": "..." }
}
}The rule is listed in the Payment Initiation requirements of each multi-payment type (linked above), and both fields are described on the Risk page.
An LFI that checks the identifier rejects a payment under a long-lived consent that does not carry the one for its customer, as well as one that carries the wrong value. Both come back as 400 Consent.BusinessRuleViolation — see For LFIs.
Compare it with the customer behind the consent
When your Ozone Connect POST/payments endpoint receives a payment, you can check the identifier as part of validating the PII:
| Step | What to do |
|---|---|
| 1 | Identify the consent from o3-consent-id and check that it is long-lived — it does not carry ConsentSchedule.SinglePayment. |
| 2 | Identify the customer from o3-psu-identifier — the reference your LFI patched onto the consent when the User authorized it — and whether the customer is Retail, or SME or Corporate. That decides which field you check. |
| 3 | Read Risk.DebtorIndicators.EmiratesId (Retail) or Risk.DebtorIndicators.TradeLicenceNumber (SME or Corporate) from the decrypted payment-time PII. |
| 4 | Compare EmiratesId with the Emirates ID you hold for the customer, ignoring hyphens. Compare TradeLicenceNumber with the Trade Licence number you hold for the business, using only its letters and digits and ignoring case: the field has no pattern, so the TPP may send the same number with different separators from your record. |
// EmiratesId: the pattern makes the hyphens optional, so 784-1990-1234567-1
// and 784199012345671 are the same Emirates ID. Compare the digits only.
const emiratesIdKey = (id: string) => id.replace(/-/g, '')
// TradeLicenceNumber has no pattern, so the same licence can arrive in a
// different case or with different separators. Compare letters and digits only.
const licenceKey = (n: string) => n.toUpperCase().replace(/[^A-Z0-9]/g, '')
// Single Instant Payment is the only consent that carries
// ControlParameters.ConsentSchedule.SinglePayment; every other payment
// consent is long-lived.
const isLongLived = (consent: PaymentConsent) =>
!consent.ControlParameters.ConsentSchedule?.SinglePayment
const reject = (detail: string): ErrorResponse => ({
errorCode: 'Consent.BusinessRuleViolation',
errorMessage: 'Validation failed for AEPaymentPII: ' + detail,
})
function checkDebtorIdentifier(
consent: PaymentConsent, // the consent identified by o3-consent-id
customer: Customer, // resolved from o3-psu-identifier
pii: PaymentPII, // the decrypted payment-time PII
): ErrorResponse | null {
if (!isLongLived(consent)) return null
const debtor = pii.Risk?.DebtorIndicators
if (customer.type === 'Retail') {
const sent = debtor?.EmiratesId
if (!sent) {
return reject('risk.debtorIndicators.emiratesID is required for a long-lived payment consent')
}
if (emiratesIdKey(sent) !== emiratesIdKey(customer.emiratesId)) {
return reject('risk.debtorIndicators.emiratesID does not match the PSU ID')
}
return null
}
// SME or Corporate: the business on whose behalf the consent was authorized
const sent = debtor?.TradeLicenceNumber
if (!sent) {
return reject('risk.debtorIndicators.tradeLicenceNumber is required for a long-lived payment consent')
}
if (licenceKey(sent) !== licenceKey(customer.tradeLicenceNumber)) {
return reject('risk.debtorIndicators.tradeLicenceNumber does not match the business Trade Licence')
}
return null
}Error responses
Reject the payment with 400 and Consent.BusinessRuleViolation. Every case has the same shape; only errorMessage changes.
| Condition | errorCode | errorMessage |
|---|---|---|
Retail: EmiratesId is absent | Consent.BusinessRuleViolation | Validation failed for AEPaymentPII: risk.debtorIndicators.emiratesID is required for a long-lived payment consent |
Retail: EmiratesId does not match the PSU | Consent.BusinessRuleViolation | Validation failed for AEPaymentPII: risk.debtorIndicators.emiratesID does not match the PSU ID |
SME or Corporate: TradeLicenceNumber is absent | Consent.BusinessRuleViolation | Validation failed for AEPaymentPII: risk.debtorIndicators.tradeLicenceNumber is required for a long-lived payment consent |
SME or Corporate: TradeLicenceNumber does not match the business | Consent.BusinessRuleViolation | Validation failed for AEPaymentPII: risk.debtorIndicators.tradeLicenceNumber does not match the business Trade Licence |
{
"errorCode": "Consent.BusinessRuleViolation",
"errorMessage": "Validation failed for AEPaymentPII: risk.debtorIndicators.tradeLicenceNumber is required for a long-lived payment consent"
}Check only the field that matches the customer behind the consent: EmiratesId for a Retail customer, TradeLicenceNumber for an SME or Corporate customer. Do not reject a payment because the other field is absent.
