FeeInquiry
https://test.api.neotek.sa/b2b-unified/v1/moi/fee-inquirySandbox URL · in Production call https://api.neotek.sa
What a Ministry of Interior service costs for one person.
Body — always required:
| Parameter | Required | Description |
|---|---|---|
bankCode | Required | which bank performs the inquiry: RJHISARI or ARNBSARI |
billerCode | Required | the biller, as a 3-digit code |
serviceCode | Required | the service, as a 3-digit code |
beneficiaryId | Required | a 10-digit national ID, iqama or border number |
Body — conditional. Which of these apply is decided by the billerCode and serviceCode pair, so send only what that service needs:
duration, licenseType, visaType, visaNumber, visaCount, vehicleSequence, vehicleCustomCardNumber, registrationType, bodyType, newOwnerId, violationId, verdictNumber, issuanceReason, cardVersionNumber, passportType, eventDate, sponsorId, citizenId, jobCategory, dependentCount, issuingEntityId, violationCategoryId
duration counts months for Iqama services, years for licences and passports, and days for visas; an Iqama renewal takes 12 to 96 months, in steps of 12.
Headers:
| Parameter | Required | Description |
|---|---|---|
authorization | Required | Bearer <ACCESS_TOKEN> |
content-type | Required | application/json |
curl -X POST 'https://test.api.neotek.sa/b2b-unified/v1/moi/fee-inquiry' \ --header 'authorization: Bearer <ACCESS_TOKEN>' \ --header 'content-type: application/json' \ --data '{ "bankCode": "RJHISARI", "billerCode": "090", "serviceCode": "003", "beneficiaryId": "1234567890", "duration": 12 }'Response (fees[] lists each charge, labelled as the bank labels it; traffic violations return one line per fine)
{ "success": true, "code": "SUCCESS", "message": "MOI fee inquiry successful", "billerCode": "090", "serviceCode": "003", "beneficiaryId": "1234567890", "beneficiaryName": "أحمد محمد", "totalFee": "650.00", "fees": [ { "type": "Renew Iqama", "amount": "650.00" } ]}Use totalFee, not the sum of fees[]. totalFee is the authoritative figure and the value you pass as amount when paying.
Errors — each failure carries an error category and a specific code
| Status | Codes | Cause |
|---|---|---|
400 ERROR_CATEGORY_VALIDATION_FAILED | INVALID_ACCOUNT, INVALID_AMOUNT, INVALID_BANK_CODE, ACCOUNT_NOT_FOUND | Unknown biller or service code, a missing conditional field, bad beneficiaryId |
401 ERROR_CATEGORY_AUTH_FAILED | AUTH_FAILED, CREDENTIALS_NOT_FOUND | Token expired, or missing account configuration for that bank |
404 ERROR_CATEGORY_NOT_FOUND | NOT_FOUND | No fee for that service and beneficiary |
409 ERROR_CATEGORY_DUPLICATE | DUPLICATE_TRANSACTION | You reused a transactionReference |
422 ERROR_CATEGORY_BANK_REJECTED | INSUFFICIENT_FUNDS, ACCOUNT_BLOCKED, PAYMENT_NOT_ALLOWED | The bank declined it |
503 ERROR_CATEGORY_TEMPORARY_FAILURE | BANK_UNAVAILABLE, NETWORK_TIMEOUT | Retry with backoff |