Taxly API v1
https://taxly.ng/api/v1
API REFERENCE · V1

Build on Taxly

Integrate your ERP, POS or accounting software with the Nigerian NRS e-invoicing platform. Register as an integrator, issue and transmit invoices, and receive your suppliers’ invoices by webhook — every endpoint below, plus step-by-step guides for the common workflows.

EnvironmentBase URL
Productionhttps://taxly.ng/api/v1
Sandboxhttps://dev.taxly.ng/api/v1

Authentication

Two mechanisms are supported. Most invoice, webhook and integrator endpoints accept either; each endpoint below shows what it needs.

ModeHeaderUse for
API keyX-API-KEYServer-to-server integrations
Bearer tokenAuthorizationUser-facing apps, after /auth/login
Headers
X-API-KEY: txl_live_xxxxxxxxxxxxxxxx
Authorization: Bearer 1|your-token

An invalid or revoked key returns 401; a key whose tenant is not an approved integrator returns 403. If an X-API-KEY header is present it is used even when a Bearer token is also sent. Always send Accept: application/json.

Response format

Taxly-owned endpoints wrap results like this:

Success
{
  "success": true,
  "data": { ... },
  "message": "..."
}
Error
{
  "success": false,
  "message": "...",
  "data": { ... }
}
Not every response is wrappedRegistration and login return message plus fields at the top level. Invoice endpoints that proxy NRS return NRS’s own code, data and message, and on failure pass NRS’s status code through. Laravel validation errors use {"message","errors"}. Each endpoint’s examples show its exact shape.

Rate limits

The public NRS callback endpoints are limited to 60 requests per minute. Other limits may vary by deployment. On 429, retry with exponential backoff.

Errors

CodeMeaning
400Bad request, or a callback payload missing required fields.
401Missing, invalid or revoked credentials — or NRS rejected the credentials you supplied.
403Authenticated but not allowed (tenant not an approved integrator, or resource belongs to another tenant).
404Resource not found.
405Wrong HTTP method (typically a POST redirected from HTTP and retried as GET).
409Conflict, e.g. a webhook URL that is already registered.
422Validation failed. Field errors are under errors or data.
429Rate limit exceeded.
502NRS was unreachable or rate limiting during an authentication call. Safe to retry.
422 validation error
{
  "message": "The given data was invalid.",
  "errors": {
    "email": ["The email field is required."]
  }
}

Use cases

Follow these in order. Each step links to the endpoint it uses.

Onboard as an integrator and get your API key

Do this once per product. You finish with an API key for every later call.

  1. Register your integrator application

    Submit your company details. Keep the returned tenant_id and the contact_email you used.

    POST/integrators/register
  2. Wait for approval

    Taxly reviews the application. Poll the public status endpoint until integrator_status is approved and can_generate_api_keys is true.

    GET/integrators/status
  3. Generate your first API key

    Call the endpoint with X-Integrator-Email set to your registered contact email - no key is needed for this first call. Copy the key from the response now; it is never shown again.

    POST/integrators/{tenant}/api-keys
  4. Use the key on every request

    Send it as X-API-KEY. Verify it works by listing your keys.

    GET/integrators/{tenant}/api-keys

Issue an invoice end to end

From an invoice in your ERP to an invoice delivered to your customer through NRS.

  1. Look up valid codes

    Fetch the values your invoice needs: HS or ISIC codes for each line, currency, tax categories, states and countries. Cache them - they rarely change.

    GET/resources/hs-codes
  2. Verify the buyer (optional)

    Confirm the customer's TIN is valid before you invoice them.

    GET/resources/tin/{tin_number}
  3. Validate the IRN

    Build the IRN as {invoice_reference}-{service_id}-{YYYYMMDD} and check it with NRS.

    POST/invoices/irn/validate
  4. Dry-run the invoice

    Send the full payload to validate. Fix any errors it reports - the submit step runs the same checks.

    POST/invoices/validate
  5. Submit (sign) the invoice

    Send the same payload. A 200 means NRS has signed it. Remember: every line uses either HS (goods) or ISIC (services) classification, never both.

    POST/invoices/submit
  6. Transmit to the buyer

    Queue transmission, optionally passing a webhook_url for status updates. This is asynchronous.

    POST/invoices/{irn}/transmit
  7. Track the result

    Confirm the invoice state, or look up the transmission record for the IRN.

    GET/invoices/{irn}/confirm
  8. Record payment later

    When the buyer pays, update the payment status at NRS.

    PATCH/invoices/{irn}/update

Receive invoices from your suppliers

Get supplier invoices delivered, decrypted, straight into your system.

  1. Expose an HTTPS endpoint

    Create a POST route that accepts JSON and returns 2xx quickly. Do the heavy work asynchronously.

  2. Register it as a webhook

    Choose a strong secret and subscribe to invoice.transmitted.decrypted.

    POST/webhooks
  3. Verify every delivery

    Compute HMAC-SHA256 of the raw body with your secret and compare it to X-Webhook-Signature using a constant-time comparison. See Webhook events for code.

  4. Process idempotently

    Key your records on irn. The same invoice can be delivered more than once if a delivery is retried.

  5. Catch up on anything missed

    If your endpoint was down, pull transmitted invoices and acknowledge each one to trigger delivery again.

    GET/invoices/transmit/pull
  6. Acknowledge receipt

    NRS releases the invoice only after acknowledgement. Taxly then downloads, decrypts and delivers it to your webhook.

    PATCH/invoices/transmit/{irn}/confirmation

Rotate or revoke an API key

Do this on a schedule, or immediately if a key may have leaked.

  1. Create a replacement key

    Generate a second key so you can switch without downtime.

    POST/integrators/{tenant}/api-keys
  2. Deploy the new key

    Update your servers' configuration and confirm calls succeed.

  3. Revoke the old key

    Find its id in the key list and revoke it. It stops working at once.

    DELETE/integrators/{tenant}/api-keys/{apiKey}
  4. Or rotate in place

    If you only have one key, regenerate it. Send the key being rotated in X-API-KEY and save the new one from the response immediately.

    POST/integrators/{tenant}/api-keys/regenerate

Auth

Create an account, sign in with your NRS e-invoice credentials and manage Bearer tokens. Bearer tokens are for user-facing apps; server-to-server integrations should use an API key (see Integrators).

POST /auth/register No auth

Creates a tenant, its organization and the first user in one call, and returns a Bearer token. Your credentials are verified against NRS first; the NRS entity_id, TIN, trade name and business id are then fetched and stored for you.

Body parameters

FieldDescription
email
stringrequired
Your NRS e-invoice login email. Must be unique among Taxly users.
password
stringrequired
Your NRS e-invoice password. Minimum 8 characters.
password_confirmation
stringrequired
Must match password.
tenant_name
stringoptional
Display name for the tenant (max 255). Generated if omitted.
brand
stringoptional
Brand name (max 255).
domain
stringoptional
Tenant domain (max 255).
NRS credentialsUse the same email and password you use to sign in to the NRS e-invoice portal. If NRS rejects them, the call fails with 401 (or 502 if NRS is unreachable / rate limiting) and nothing is created.
201 created 401 NRS rejected credentials 422 validation / entity lookup failed 502 NRS unreachable
cURL
curl -X POST https://taxly.ng/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
  "tenant_name": "Acme Corp",
  "email": "dev@acme.com",
  "password": "your-nrs-password",
  "password_confirmation": "your-nrs-password"
}'
201 Created
{
  "message": "Tenant, organization, and user created successfully",
  "tenant": {
  "id": 3,
  "name": "Acme Corp",
  "brand": "Acme",
  "domain": "acme.com",
  "email": "dev@acme.com",
  "entity_id": "********-b06e-****-a89d-***********"
},
  "organization": { "id": 1, "tin": "30000002-0001", "trade_name": "Acme Corp", "email": "dev@acme.com" },
  "user": { "id": 1, "name": "Acme Corp", "email": "dev@acme.com" },
  "token": "1|XyzExampleToken…"
}
POST /auth/login No auth

Signs in an existing Taxly user and returns a Bearer token for Authorization: Bearer ….

Body parameters

FieldDescription
email
stringrequired
Account email.
password
stringrequired
Account password.
200 OK 401 invalid credentials
cURL
curl -X POST https://taxly.ng/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
  "email": "dev@acme.com",
  "password": "your-password"
}'
200 Response
{
  "message": "User logged in successfully",
  "user": { "id": 1, "name": "Acme Corp", "email": "dev@acme.com" },
  "token": "1|XyzExampleToken…"
}
401 Response
{ "message": "Invalid credentials" }
POST /auth/tax-payer-login No auth

Verifies NRS e-invoice credentials and returns the NRS login response, including the entity_id. Nothing is stored in Taxly and no token is issued - use it to check credentials before registering.

Body parameters

FieldDescription
email
stringrequired
NRS e-invoice login email.
password
stringrequired
NRS e-invoice password.
200 OK 401 missing or rejected credentials 502 NRS unreachable / rate limited
cURL
curl -X POST https://taxly.ng/api/v1/auth/tax-payer-login \
  -H "Content-Type: application/json" \
  -d '{
  "email": "dev@acme.com",
  "password": "your-nrs-password"
}'
200 Response
{
  "message": "User logged in",
  "id": "********-323c-****-9061-***********",
  "status": "200 OK",
  "received_at": "2026-04-06T16:01:56.517426199+01:00",
  "entity_id": "********-b06e-****-a89d-***********"
}
GET /auth/me Bearer token only

Returns the authenticated user with their organization and tenant.

200 OK 401 unauthenticated 404 user not found
cURL
curl https://taxly.ng/api/v1/auth/me \
  -H "Authorization: Bearer $TOKEN"
200 Response
{
  "success": true,
  "data": {
    "id": 1,
    "name": "Acme Corp",
    "email": "dev@acme.com",
    "organization": {
      "id": 1,
      "tin": "30000002-0001",
      "tenant": { "id": 3, "name": "Acme Corp" }
    }
  },
  "message": "User retrieved successfully"
}
POST /auth/logout Bearer token only

Revokes the Bearer token used for this request.

200 OK 401 unauthenticated
cURL
curl -X POST https://taxly.ng/api/v1/auth/logout \
  -H "Authorization: Bearer $TOKEN"
200 Response
{
  "success": true,
  "data": { "message": "Logged out successfully" },
  "message": "Operation successful"
}

Integrators & API Keys

ERPs, POS and accounting vendors register as an integrator, wait for approval, then generate API keys for server-to-server calls. Registration and status checks are public.

POST /integrators/register No auth

Submits an integrator application. A tenant is created with status pending and must be approved before API keys can be issued.

Body parameters

FieldDescription
name
stringrequired
Company name (max 255).
tin
stringrequired
Tax Identification Number. Unique (max 20).
description
stringrequired
What your product does (max 500).
use_case
stringrequired
How you will use the API (max 1000).
contact_person
stringrequired
Technical contact name (max 255).
contact_email
stringrequired
Technical contact email.
brand
stringoptional
Brand name (max 255).
domain
stringoptional
Unique domain (max 255).
website
stringoptional
Valid URL (max 255).
landlord_id
integeroptional
Existing active landlord. Defaults to the first active landlord.
Keep the contact emailThe contact_email you register with is later used as proof of identity when generating your first API key (see Generate API key).
Use HTTPSCall the HTTPS URL. If a POST is redirected from HTTP to HTTPS and retried as GET, the API answers 405 asking you to use POST.
201 submitted 422 validation / domain taken 500 no active landlord
cURL
curl -X POST https://taxly.ng/api/v1/integrators/register \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme ERP Ltd",
  "tin": "30000002-0001",
  "description": "Cloud ERP for SMEs",
  "use_case": "Issue and receive NRS e-invoices from our ERP",
  "contact_person": "Ada Obi",
  "contact_email": "dev@acme.com",
  "website": "https://acme.com"
}'
201 Response
{
  "success": true,
  "data": {
    "tenant_id": 3,
    "tenant": { "id": 3, "name": "Acme ERP Ltd", "is_integrator": true, "integrator_status": "pending" },
    "message": "Integrator application submitted successfully. Please wait for approval.",
    "status_check": {
      "endpoint": "/api/v1/integrators/status",
      "method": "GET",
      "parameters": { "tenant_id": 3 },
      "note": "Use this endpoint to check your approval status. No authentication required."
    }
  },
  "message": "Integrator application submitted successfully"
}
GET /integrators/status No auth

Checks the review status of an integrator application. Pass tenant_id, email (the contact email) or both.

Query parameters

FieldDescription
tenant_id
integeroptional
Tenant id returned at registration.
email
stringoptional
Contact email used at registration. At least one of the two is required.
200 OK 404 integrator not found 422 missing tenant_id/email
cURL
curl "https://taxly.ng/api/v1/integrators/status?tenant_id=3"
Approved
{
  "success": true,
  "data": {
    "tenant_id": 3,
    "name": "Acme ERP Ltd",
    "integrator_status": "approved",
    "status_message": "Your integrator application has been approved. You can now generate API keys and use the API.",
    "can_generate_api_keys": true,
    "can_use_api": true,
    "applied_at": "2026-04-01T08:00:00.000Z",
    "reviewed_at": "2026-04-02T10:30:00.000Z",
    "review_reason": null,
    "next_steps": [
      "Generate API keys using POST /api/v1/integrators/{tenant}/api-keys",
      "Use your API key to authenticate requests",
      "Start integrating with the invoice API"
    ]
  },
  "message": "Integrator status retrieved successfully"
}
Pending
{
  "success": true,
  "data": {
    "tenant_id": 3,
    "integrator_status": "pending",
    "status_message": "Your integrator application is pending review. Please check back later.",
    "can_generate_api_keys": false,
    "can_use_api": false
  },
  "message": "Integrator status retrieved successfully"
}
POST /integrators/{tenant}/api-keys X-API-KEY or Bearer

Issues a new API key for an approved integrator. The plaintext key is returned once - store it securely.

Body parameters

FieldDescription
name
stringrequired
Label for the key (max 255).
description
stringoptional
Free text (max 500).
permissions
string[]optional
Permission strings to attach.
active
booleanoptional
Defaults to true.
contact_email
stringoptional
Alternative to the X-Integrator-Email header for the bootstrap call.
First key (bootstrap)If your tenant has no API keys yet, authenticate with the X-Integrator-Email header (or a contact_email body field) set to your registered contact email. No API key is needed for this very first call.
Subsequent keysOnce you hold a key, send it as X-API-KEY (or use a Bearer token). The tenant in the URL must be your own tenant.
201 created 401 not authenticated / wrong tenant 403 tenant not an approved integrator 422 validation errors
cURL
curl -X POST https://taxly.ng/api/v1/integrators/{tenant}/api-keys \
  -H "X-API-KEY: $API_KEY" \
  -H "X-Integrator-Email: dev@acme.com" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Production ERP",
  "description": "Key for the production ERP"
}'
201 Response
{
  "success": true,
  "data": {
    "api_key": {
      "id": 7,
      "name": "Production ERP",
      "key": "txl_live_9f8e7d6c5b4a3210…",
      "masked": "txl_****3210",
      "description": "Key for the production ERP",
      "permissions": ["invoices:write"],
      "created_at": "2026-04-06T09:00:00.000000Z"
    },
    "message": "API key generated successfully"
  },
  "message": "API key generated successfully"
}
GET /integrators/{tenant}/api-keys X-API-KEY or Bearer

Lists the API keys of your tenant. Plaintext keys are never returned again.

200 OK 401 not authenticated / not your tenant 404 tenant not found
cURL
curl https://taxly.ng/api/v1/integrators/{tenant}/api-keys \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "success": true,
  "data": {
    "api_keys": [
      { "id": 7, "name": "Production ERP", "description": null, "active": true, "last_used_at": "2026-04-06T09:00:00.000000Z", "created_at": "2026-04-01T08:00:00.000000Z" }
    ],
    "tenant": { "id": 3, "name": "Acme ERP Ltd", "is_integrator": true, "integrator_status": "approved" }
  },
  "message": "API keys retrieved successfully"
}
DELETE /integrators/{tenant}/api-keys/{apiKey} X-API-KEY or Bearer

Revokes (deactivates) an API key. Requests using it fail immediately with 401.

200 OK 401 not authorised for this tenant 403 key belongs to another tenant 404 tenant not found
cURL
curl -X DELETE https://taxly.ng/api/v1/integrators/{tenant}/api-keys/{apiKey} \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "success": true,
  "data": { "message": "API key revoked successfully" },
  "message": "Operation successful"
}
POST /integrators/{tenant}/api-keys/regenerate X-API-KEY or Bearer

Rotates the key used to authenticate this request and returns a new plaintext key.

Send the key you are rotatingThe current key must be supplied in X-API-KEY, even if you also send a Bearer token. Update your systems with the new key straight away.
200 OK 401 current key not supplied 403 key belongs to another tenant
cURL
curl -X POST https://taxly.ng/api/v1/integrators/{tenant}/api-keys/regenerate \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "success": true,
  "data": {
    "api_key": {
      "id": 7,
      "name": "Production ERP",
      "key": "txl_live_new1234…",
      "masked": "txl_****1234",
      "active": true,
      "updated_at": "2026-04-06T09:30:00.000000Z"
    }
  },
  "message": "API key regenerated successfully"
}
GET /integrators/{tenant} X-API-KEY or Bearer

Returns the integrator tenant with its landlord, API keys and sub-tenants.

200 OK 400 tenant is not an integrator 401 unauthenticated
cURL
curl https://taxly.ng/api/v1/integrators/{tenant} \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "success": true,
  "data": {
    "integrator": {
      "id": 3,
      "name": "Acme ERP Ltd",
      "is_integrator": true,
      "integrator_status": "approved",
      "landlord": { "id": 1 },
      "api_keys": [],
      "sub_tenants": []
    }
  },
  "message": "Integrator details retrieved successfully"
}

Invoices

Validate, submit, transmit and track e-invoices with NRS. These endpoints accept either X-API-KEY or a Bearer token. Responses proxy the NRS result: code, data and message.

POST /invoices/irn/validate X-API-KEY or Bearer

Checks with NRS that an IRN is well-formed and unused before you build the invoice.

Body parameters

FieldDescription
business_id
stringrequired
NRS business id of the supplier.
invoice_reference
stringrequired
Your own invoice number.
irn
stringrequired
The IRN to validate.
IRN formatAn IRN is {invoice_reference}-{service_id}-{YYYYMMDD}, e.g. INV001-94ND90NR-20260406.
200 valid 422 validation failed 4xx NRS status passed through
cURL
curl -X POST https://taxly.ng/api/v1/invoices/irn/validate \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "business_id": "11111111-2222-3333-4444-555555555555",
  "invoice_reference": "INV001",
  "irn": "INV001-94ND90NR-20260406"
}'
200 Response
{ "message": "IRN validated successfully" }
Error
{
  "success": false,
  "message": "NRS IRN validation failed",
  "data": {
    "code": 400,
    "message": "<reason returned by NRS>",
    "errors": []
  }
}
POST /invoices/validate X-API-KEY or Bearer

Validates a full invoice payload with NRS without submitting it. Use it as a dry run. Same body as Submit invoice.

200 valid 422 validation failed
cURL
curl -X POST https://taxly.ng/api/v1/invoices/validate \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "api",
  "business_id": "11111111-2222-3333-4444-555555555555",
  "invoice_reference": "INV001",
  "irn": "INV001-94ND90NR-20260406",
  "issue_date": "2026-04-06",
  "due_date": "2026-05-06",
  "invoice_kind": "B2B",
  "invoice_type_code": "380",
  "document_currency_code": "NGN",
  "tax_currency_code": "NGN",
  "payment_status": "PENDING",
  "accounting_supplier_party": {
    "party_name": "Demo Supplier Nigeria Limited",
    "tin": "30000002-0001",
    "email": "billing@demosupplier.example.com",
    "telephone": "+2348000000002",
    "postal_address": {
      "street_name": "12 Example Crescent",
      "city_name": "Abuja",
      "postal_zone": "900001",
      "state": "FCT",
      "country": "NG"
    }
  },
  "accounting_customer_party": {
    "party_name": "Demo Buyer Ventures",
    "tin": "20000001-0001",
    "email": "accounts@demobuyer.example.com",
    "telephone": "+2348000000001",
    "postal_address": {
      "street_name": "45 Sample Avenue",
      "city_name": "Lagos",
      "postal_zone": "100001",
      "state": "Lagos",
      "country": "NG"
    }
  },
  "payment_means": [
    {
      "payment_means_code": "10",
      "payment_due_date": "2026-05-06"
    }
  ],
  "tax_total": [
    {
      "tax_amount": 375,
      "tax_subtotal": [
        {
          "taxable_amount": 5000,
          "tax_amount": 375,
          "tax_category": {
            "id": "VAT",
            "percent": 7.5
          }
        }
      ]
    }
  ],
  "legal_monetary_total": {
    "line_extension_amount": 5000,
    "tax_exclusive_amount": 5000,
    "tax_inclusive_amount": 5375,
    "payable_amount": 5375
  },
  "invoice_line": [
    {
      "isic_code": "6201",
      "service_category": "Software",
      "invoiced_quantity": 2,
      "line_extension_amount": 5000,
      "item": {
        "name": "Software Subscription",
        "description": "Monthly SaaS subscription"
      },
      "price": {
        "price_amount": 2500,
        "base_quantity": 1,
        "price_unit": "XBG"
      }
    }
  ]
}'
200 Response
{
  "code": 200,
  "data": { "ok": true },
  "message": "Invoice validated successfully"
}
Error
{
  "success": false,
  "message": "NRS Invoice validation failed",
  "data": {
    "code": 400,
    "message": "<reason returned by NRS>",
    "errors": []
  }
}
POST /invoices/submit X-API-KEY or Bearer

Validates the IRN, validates the invoice, then signs it with NRS. On success the invoice exists at NRS and can be transmitted.

Body parameters

FieldDescription
channel
stringrequired
api, portal or batch.
business_id
stringrequired
NRS business id of the supplier.
invoice_reference
stringrequired
Your invoice number.
irn
stringrequired
Invoice Reference Number.
issue_date
daterequired
YYYY-MM-DD.
invoice_kind
stringrequired
Transaction class: B2B, B2C, B2G.
invoice_type_code
stringrequired
Three digits (UNCL1001): 380 commercial, 381 credit note, 383 debit note, 384 corrected, 396 factored.
document_currency_code
stringrequired
e.g. NGN.
accounting_supplier_party
objectrequired
party_name, tin, email and postal_address are required.
accounting_customer_party
objectoptional
Same shape as the supplier.
legal_monetary_total
objectrequired
Numeric line_extension_amount, tax_exclusive_amount, tax_inclusive_amount, payable_amount.
invoice_line
object[]required
At least one line. Each needs invoiced_quantity, line_extension_amount, item.name, item.description, price.price_amount, price.price_unit plus a classification group.
invoice_line[].hsn_code
stringoptional
Group A. Pattern \d{2,4}(.\d{2}){0,3}, e.g. 2710.12.
tax_total / payment_means / allowance_charge
arrayoptional
Passed through to NRS.
Line classificationEach invoice_line must use exactly one group: Group A (goods) hsn_code + product_category, or Group B (services) isic_code + service_category. Mixing groups, or giving a code without its category, is rejected with 422. Look codes up under Resources.
Customer is optionalaccounting_customer_party may be omitted (e.g. B2C). When omitted it is not sent to NRS.
SequenceTaxly runs: validate IRN → validate invoice → sign. The first failing step stops the request and its NRS error is returned.
200 signed 422 validation failed 4xx NRS status passed through
cURL
curl -X POST https://taxly.ng/api/v1/invoices/submit \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "api",
  "business_id": "11111111-2222-3333-4444-555555555555",
  "invoice_reference": "INV001",
  "irn": "INV001-94ND90NR-20260406",
  "issue_date": "2026-04-06",
  "due_date": "2026-05-06",
  "invoice_kind": "B2B",
  "invoice_type_code": "380",
  "document_currency_code": "NGN",
  "tax_currency_code": "NGN",
  "payment_status": "PENDING",
  "accounting_supplier_party": {
    "party_name": "Demo Supplier Nigeria Limited",
    "tin": "30000002-0001",
    "email": "billing@demosupplier.example.com",
    "telephone": "+2348000000002",
    "postal_address": {
      "street_name": "12 Example Crescent",
      "city_name": "Abuja",
      "postal_zone": "900001",
      "state": "FCT",
      "country": "NG"
    }
  },
  "accounting_customer_party": {
    "party_name": "Demo Buyer Ventures",
    "tin": "20000001-0001",
    "email": "accounts@demobuyer.example.com",
    "telephone": "+2348000000001",
    "postal_address": {
      "street_name": "45 Sample Avenue",
      "city_name": "Lagos",
      "postal_zone": "100001",
      "state": "Lagos",
      "country": "NG"
    }
  },
  "payment_means": [
    {
      "payment_means_code": "10",
      "payment_due_date": "2026-05-06"
    }
  ],
  "tax_total": [
    {
      "tax_amount": 375,
      "tax_subtotal": [
        {
          "taxable_amount": 5000,
          "tax_amount": 375,
          "tax_category": {
            "id": "VAT",
            "percent": 7.5
          }
        }
      ]
    }
  ],
  "legal_monetary_total": {
    "line_extension_amount": 5000,
    "tax_exclusive_amount": 5000,
    "tax_inclusive_amount": 5375,
    "payable_amount": 5375
  },
  "invoice_line": [
    {
      "isic_code": "6201",
      "service_category": "Software",
      "invoiced_quantity": 2,
      "line_extension_amount": 5000,
      "item": {
        "name": "Software Subscription",
        "description": "Monthly SaaS subscription"
      },
      "price": {
        "price_amount": 2500,
        "base_quantity": 1,
        "price_unit": "XBG"
      }
    }
  ]
}'
200 Response
{
  "code": 200,
  "data": { "ok": true },
  "message": "Invoice submission initiated successfully"
}
Error
{
  "success": false,
  "message": "NRS Invoice signing failed",
  "data": {
    "code": 400,
    "message": "<reason returned by NRS>",
    "errors": []
  }
}
POST /invoices/{irn}/transmit X-API-KEY or Bearer

Queues transmission of a signed invoice to the buyer through NRS. Transmission is asynchronous - track it with the lookup endpoint or your webhook.

Body parameters

FieldDescription
webhook_url
stringoptional
URL that receives status updates for this transmission.
MeteringTransmitted invoices are counted once per unique IRN, regardless of the outcome.
200 queued 422 invalid webhook_url
cURL
curl -X POST https://taxly.ng/api/v1/invoices/{irn}/transmit \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "webhook_url": "https://erp.acme.com/hooks/taxly"
}'
200 Response
{
  "code": 200,
  "data": { "ok": true },
  "message": "Invoice transmission queued successfully.",
  "irn": "INV001-94ND90NR-20260406",
  "webhook_url": "https://erp.acme.com/hooks/taxly"
}
GET /invoices/{irn}/confirm X-API-KEY or Bearer

Returns the current confirmation state of an invoice at NRS.

200 OK 4xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/{irn}/confirm \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": { "irn": "INV001-94ND90NR-20260406", "status": "…" },
  "message": "Invoice confirmation state from NRS"
}
PATCH /invoices/{irn}/update X-API-KEY or Bearer

Updates the payment status of an invoice at NRS.

Body parameters

FieldDescription
payment_status
stringrequired
e.g. PAID, PENDING.
reference
stringoptional
Payment reference.
200 OK 422 validation failed
cURL
curl -X PATCH https://taxly.ng/api/v1/invoices/{irn}/update \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "payment_status": "PAID",
  "reference": "PAY-2026-0042"
}'
200 Response
{
  "code": 200,
  "data": { "ok": true },
  "message": "Invoice updated successfully in NRS"
}
GET /invoices/{irn}/download X-API-KEY or Bearer

Downloads an invoice from NRS by IRN.

Received invoicesNRS only releases a received invoice after you acknowledge it. Use the acknowledge endpoint first.
200 OK 4xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/{irn}/download \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": { "…": "invoice as returned by NRS" },
  "message": "Invoice download from NRS is successful"
}
GET /invoices/transmit/health-check X-API-KEY or Bearer

Checks that the NRS transmission service is reachable.

200 OK 4xx/5xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/transmit/health-check \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": { "status": "ok" },
  "message": "Health check succeeded."
}
GET /invoices/transmit/{irn}/lookup X-API-KEY or Bearer

Looks up the transmission record for an IRN.

200 OK 4xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/transmit/{irn}/lookup \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": { "…": "transmission parties" },
  "message": "Transmission parties loaded successfully."
}
GET /invoices/transmit/tin/{tin}/lookup X-API-KEY or Bearer

Looks up transmitted invoices by party TIN.

200 OK 4xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/transmit/tin/{tin}/lookup \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": [ { "irn": "…" } ],
  "message": "Transmission parties loaded successfully."
}
GET /invoices/transmit/pull X-API-KEY or Bearer

Pulls invoices that have been transmitted to you through NRS. Use it to catch up if a webhook was missed.

200 OK 4xx NRS status passed through
cURL
curl https://taxly.ng/api/v1/invoices/transmit/pull \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "code": 200,
  "data": [ { "irn": "…" } ],
  "message": "Transmitted Invoices pulled successfully."
}
PATCH /invoices/transmit/{irn}/confirmation X-API-KEY or Bearer

Acknowledges receipt of a transmitted invoice with NRS. For an invoice you did not send yourself, Taxly then downloads, decrypts and delivers it to your webhook.

Body parameters

FieldDescription
irn
stringrequired
Must match the IRN in the URL.
agent_tin / beneficiary_tin
stringoptional
Parties for tax reporting.
base_amount / total_amount / other_taxes
numberoptional
Amounts.
currency
stringoptional
3-letter ISO code.
item_description
stringoptional
Free text.
transaction_date
dateoptional
Date of the transaction.
integrator_service_id
stringoptional
Your NRS service id.
vat_calculated / vat_rate / vat_status
mixedoptional
VAT details.
AliasThe same action is also available at PATCH /api/v1/invoice/transmit/{irn} (no auth middleware) for backwards compatibility.
200 acknowledged 422 validation failed 4xx NRS status passed through
cURL
curl -X PATCH https://taxly.ng/api/v1/invoices/transmit/{irn}/confirmation \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "irn": "INV001-94ND90NR-20260406",
  "currency": "NGN",
  "total_amount": 5375,
  "vat_rate": 7.5
}'
200 Response
{
  "code": 200,
  "data": { "status": "acknowledged", "irn": "INV001-94ND90NR-20260406" },
  "message": "Invoice acknowledgment sent to NRS successfully."
}

Webhook Endpoints

Register the URL where Taxly delivers events such as decrypted incoming invoices. A tenant can hold up to 10 endpoints. Accepts X-API-KEY or a Bearer token.

GET /webhooks X-API-KEY or Bearer

Lists your tenant's webhook endpoints.

200 OK 401 unauthenticated
cURL
curl https://taxly.ng/api/v1/webhooks \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "data": [
    {
      "id": 12,
      "tenant_id": 3,
      "url": "https://erp.acme.com/hooks/taxly",
      "subscribed_events": ["invoice.transmitted.decrypted"],
      "description": "Receives incoming invoices",
      "message": "Production receiver",
      "forward_status": "pending",
      "created_at": "2026-04-06T09:00:00.000000Z",
      "updated_at": "2026-04-06T09:00:00.000000Z"
    }
  ],
  "message": "Webhook endpoints retrieved successfully"
}
POST /webhooks X-API-KEY or Bearer

Registers a webhook endpoint.

Body parameters

FieldDescription
url
stringrequired
Public HTTPS URL. Must be unique per tenant.
secret
stringrequired
Signing secret, minimum 10 characters. Used for the X-Webhook-Signature HMAC.
events
string[]required
Any of exchange_invoice.received, invoice.transmitted.decrypted, invoice.transmission.status, webhook.delivered, webhook.failed.
name
stringoptional
Label (max 100).
description
stringoptional
Description (max 255).
Subscribe to receive invoicesTo receive the decrypted invoice payload for transmitted invoices, subscribe to invoice.transmitted.decrypted. Without it, processing still completes but nothing is delivered to your endpoint.
201 created 403 tenant not resolved 409 URL already registered 422 validation / limit of 10 reached
cURL
curl -X POST https://taxly.ng/api/v1/webhooks \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://erp.acme.com/hooks/taxly",
  "secret": "a-long-random-secret",
  "events": ["invoice.transmitted.decrypted"],
  "name": "Production receiver"
}'
201 Response
{
  "success": true,
  "data": {
    "endpoint": {
      "id": 12,
      "tenant_id": 3,
      "url": "https://erp.acme.com/hooks/taxly",
      "subscribed_events": ["invoice.transmitted.decrypted"],
      "description": "Receives incoming invoices",
      "message": "Production receiver",
      "forward_status": "pending",
      "created_at": "2026-04-06T09:00:00.000000Z",
      "updated_at": "2026-04-06T09:00:00.000000Z"
    }
  },
  "message": "Webhook endpoint created successfully"
}
409 Duplicate
{
  "success": false,
  "message": "A webhook endpoint with this URL already exists for your tenant.",
  "data": { "existing_endpoint": { "id": 12 } }
}
PUT /webhooks/{id} X-API-KEY or Bearer

Updates an endpoint you own. PATCH behaves identically. Send only the fields you want to change.

Body parameters

FieldDescription
url
stringoptional
New URL (still unique per tenant).
secret
stringoptional
New secret (min 10).
events
string[]optional
Replaces the subscribed events.
name / description
stringoptional
Labels.
200 OK 403 not your endpoint 404 not found 409 URL already registered
cURL
curl -X PUT https://taxly.ng/api/v1/webhooks/{id} \
  -H "X-API-KEY: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "events": ["invoice.transmitted.decrypted", "invoice.transmission.status"]
}'
200 Response
{
  "success": true,
  "data": { "endpoint": { "id": 12, "…": "…" } },
  "message": "Webhook endpoint updated successfully"
}
DELETE /webhooks/{id} X-API-KEY or Bearer

Deletes an endpoint you own.

200 OK 403 not your endpoint 404 not found
cURL
curl -X DELETE https://taxly.ng/api/v1/webhooks/{id} \
  -H "X-API-KEY: $API_KEY"
200 Response
{
  "success": true,
  "message": "Webhook endpoint deleted successfully"
}

Resources

Public reference data from NRS - code lists, geography and TIN/entity lookups. Use them to populate dropdowns and to find valid values for invoice fields. No authentication required.

GET /resources/invoice-types No auth

Invoice type codes for invoice_type_code.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/invoice-types
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/payment-means No auth

Payment means codes for payment_means.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/payment-means
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/tax-categories No auth

Tax categories for tax_category.id (e.g. VAT).

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/tax-categories
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/currencies No auth

ISO currency codes for document_currency_code.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/currencies
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/quantity-codes No auth

Unit-of-quantity codes. Results are paginated, 20 per page - pass ?page=2 for more.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/quantity-codes
200 Response
{
  "code": 200,
  "data": {
    "current_page": 1,
    "data": [
      { "code": "…", "description": "…" }
    ],
    "per_page": 20,
    "total": 1432,
    "last_page": 72,
    "next_page_url": "https://taxly.ng/api/v1/resources/hs-codes?page=2"
  },
  "message": "…"
}
GET /resources/hs-codes No auth

Harmonised System codes for goods lines (hsn_code + product_category). Results are paginated, 20 per page - pass ?page=2 for more.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/hs-codes
200 Response
{
  "code": 200,
  "data": {
    "current_page": 1,
    "data": [
      { "code": "…", "description": "…" }
    ],
    "per_page": 20,
    "total": 1432,
    "last_page": 72,
    "next_page_url": "https://taxly.ng/api/v1/resources/hs-codes?page=2"
  },
  "message": "…"
}
GET /resources/services-codes No auth

ISIC service codes for service lines (isic_code + service_category). Results are paginated, 20 per page - pass ?page=2 for more.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/services-codes
200 Response
{
  "code": 200,
  "data": {
    "current_page": 1,
    "data": [
      { "code": "…", "description": "…" }
    ],
    "per_page": 20,
    "total": 1432,
    "last_page": 72,
    "next_page_url": "https://taxly.ng/api/v1/resources/hs-codes?page=2"
  },
  "message": "…"
}
GET /resources/countries No auth

Country codes for postal_address.country.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/countries
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/states No auth

State codes for postal_address.state.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/states
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/lgas No auth

Local government areas.

200 OK 500 NRS lookup failed
cURL
curl https://taxly.ng/api/v1/resources/lgas
200 Response
{
  "code": 200,
  "data": [
    { "code": "…", "description": "…" }
  ],
  "message": "…"
}
GET /resources/tin/{tin_number} No auth

Looks up a Tax Identification Number with NRS - handy for verifying a buyer before invoicing.

200 OK 500 lookup failed
cURL
curl https://taxly.ng/api/v1/resources/tin/{tin_number}
200 Response
{
  "code": 200,
  "data": { "tin": "20000001-0001", "…": "…" },
  "message": "…"
}
GET /resources/entity/{entity_id} No auth

Fetches NRS entity details, including its businesses, by entity_id.

200 OK 500 lookup failed
cURL
curl https://taxly.ng/api/v1/resources/entity/{entity_id}
200 Response
{
  "code": 200,
  "data": { "businesses": [ { "id": "…", "tin": "…", "name": "…" } ] },
  "message": "…"
}

Tenants

Read and create tenants. Bearer token only - API keys are not accepted on these routes.

GET /tenants Bearer token only

Super admins receive all tenants; other users receive only their own organization's tenant.

200 OK 401 unauthenticated
cURL
curl https://taxly.ng/api/v1/tenants \
  -H "Authorization: Bearer $TOKEN"
200 Response
{ "success": true, "data": [ {   "id": 3,   "name": "Acme Corp",   "brand": "Acme",   "domain": "acme.com",   "email": "dev@acme.com",   "entity_id": "********-b06e-****-a89d-***********" } ], "message": "Tenants retrieved successfully" }
POST /tenants Bearer token only

Creates a tenant.

Body parameters

FieldDescription
name
stringrequired
Max 255.
brand
stringoptional
Max 255.
domain
stringoptional
Unique.
feature_flags
objectoptional
Feature toggles.
retention_policy
stringoptional
Max 255.
201 created 422 validation failed
cURL
curl -X POST https://taxly.ng/api/v1/tenants \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme Corp",
  "brand": "Acme",
  "domain": "acme.com"
}'
201 Response
{ "success": true, "data": { "tenant": { "id": 4, "name": "Acme Corp" } }, "message": "Tenant created successfully" }
GET /tenants/{tenant} Bearer token only

Returns one tenant. Non-super-admins can only read their own.

200 OK 403 forbidden 404 not found
cURL
curl https://taxly.ng/api/v1/tenants/{tenant} \
  -H "Authorization: Bearer $TOKEN"
200 Response
{ "success": true, "data": {   "id": 3,   "name": "Acme Corp",   "brand": "Acme",   "domain": "acme.com",   "email": "dev@acme.com",   "entity_id": "********-b06e-****-a89d-***********" }, "message": "Tenant retrieved successfully" }

Draft Invoices

Taxly-managed invoice records for portal-style workflows. Bearer token only. For ERP integrations, prefer the Invoices endpoints above.

POST /invoices Bearer token only

Creates a draft invoice for your organization.

Body parameters

FieldDescription
buyer_organization_ref
stringrequired
Buyer TIN / reference.
total_amount
numberrequired
Minimum 0.
tax_breakdown
arrayrequired
Tax lines.
vat_treatment
stringrequired
standard, zero-rated or exempt.
201 created 422 validation failed
cURL
curl -X POST https://taxly.ng/api/v1/invoices \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "buyer_organization_ref": "20000001-0001",
  "total_amount": 5375,
  "tax_breakdown": [ { "type": "VAT", "rate": 7.5, "amount": 375 } ],
  "vat_treatment": "standard"
}'
201 Response
{
  "data": { "invoice": { "id": 15, "status": "draft", "total_amount": 5375 } },
  "message": "Invoice created successfully"
}
POST /invoices/{invoice}/validate Bearer token only

Validates a draft and marks it validated. Requires permission to update the invoice.

200 OK 403 not allowed 422 validation failed
cURL
curl -X POST https://taxly.ng/api/v1/invoices/{invoice}/validate \
  -H "Authorization: Bearer $TOKEN"
200 Response
{ "data": { "invoice": { "id": 15, "status": "validated" } }, "message": "Invoice validated successfully" }
422 Response
{ "data": { "invoice": {} }, "errors": { "field": ["…"] }, "message": "Invoice validation failed" }
POST /invoices/{invoice}/submit Bearer token only

Submits a validated draft. Returns 202 as processing continues in the background.

Body parameters

FieldDescription
channel
stringrequired
api, web or manual.
202 accepted 403 not allowed 422 not validated / failed
cURL
curl -X POST https://taxly.ng/api/v1/invoices/{invoice}/submit \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "channel": "api" }'
202 Response
{ "data": { "result": { "submission_id": "…", "txn_id": "…" } }, "message": "Invoice submitted successfully" }

Admin

Landlord operations for reviewing integrator applications. Bearer token only; intended for Taxly administrators.

GET /admin/integrators Bearer token only

Lists integrators, paginated.

Query parameters

FieldDescription
status
stringoptional
pending, approved or rejected.
per_page
integeroptional
Default 15.
200 OK 401 unauthenticated
cURL
curl "https://taxly.ng/api/v1/admin/integrators?status=pending" \
  -H "Authorization: Bearer $TOKEN"
200 Response
{ "success": true, "data": { "integrators": { "current_page": 1, "data": [ { "id": 3, "integrator_status": "pending" } ], "per_page": 15 } }, "message": "Integrators retrieved successfully" }
PATCH /admin/integrators/{tenant}/review Bearer token only

Approves or rejects an application. Approved integrators can then generate API keys.

Body parameters

FieldDescription
status
stringrequired
approved or rejected.
reason
stringoptional
Shown to the applicant on the status endpoint (max 1000).
200 OK 400 not an integrator 422 validation failed
cURL
curl -X PATCH https://taxly.ng/api/v1/admin/integrators/{tenant}/review \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "approved"
}'
200 Response
{ "success": true, "data": { "tenant": { "id": 3, "integrator_status": "approved" }, "message": "Integrator application approved successfully" }, "message": "Integrator application approved successfully" }

NRS Callbacks

Endpoints that NRS calls on Taxly when an invoice is transmitted. Integrators do not call these - they are documented so you understand how incoming invoices reach your webhook.

POST /firs-exchange/webhook Called by NRS

Receives NRS exchange events. TRANSMITTING and TRANSMITTED trigger a background pull of the invoice.

Body parameters

FieldDescription
irn
stringrequired
Invoice Reference Number.
message
stringrequired
TRANSMITTING, TRANSMITTED, ACKNOWLEDGED or FAILED.
Rate limit60 requests per minute. Taxly answers 200 even if internal processing fails, so NRS does not retry immediately.
200 received 400 invalid payload 429 rate limited
cURL
curl -X POST https://taxly.ng/api/firs-exchange/webhook \
  -H "Content-Type: application/json" \
  -d '{
  "irn": "INV001-94ND90NR-20260406",
  "message": "TRANSMITTED"
}'
200 Response
{ "message": "Webhook received successfully", "event_id": 481 }
400 Response
{ "error": "Invalid payload", "message": "IRN and message are required" }
POST /webhooks/firs Called by NRS

Receives NRS transmission status callbacks. Duplicates are detected and ignored. For TRANSMITTING/TRANSMITTED messages for invoices addressed to you, Taxly starts the incoming flow: look up, confirm, acknowledge, download, decrypt and deliver to your webhook.

Body parameters

FieldDescription
irn
stringrequired
Invoice Reference Number.
message
stringrequired
Status message.
webhook_url
stringoptional
Optional URL to forward the status to.
200 received 422 validation failed
cURL
curl -X POST https://taxly.ng/api/webhooks/firs \
  -H "Content-Type: application/json" \
  -d '{
  "irn": "INV001-94ND90NR-20260406",
  "message": "TRANSMITTED"
}'
200 Response
{ "status": "received", "message": "Webhook received and processed successfully" }
Duplicate
{ "status": "duplicate", "message": "Webhook already received and processed" }

Webhook events

Events Taxly sends to the endpoints you registered. Each delivery is a POST with a JSON body. Respond with any 2xx quickly and process asynchronously.

Request headers

HeaderValue
Content-Typeapplication/json
X-Webhook-SourceTaxly
X-Webhook-EventThe event name, e.g. invoice.transmitted.decrypted
X-Webhook-SignatureHMAC-SHA256 hex of the raw request body, keyed with your endpoint secret (sent when the endpoint has a secret)

Events

EventWhen
invoice.transmitted.decryptedRecommended. A supplier invoice addressed to you was received, downloaded and decrypted. Contains the full invoice.
exchange_invoice.receivedOlder event carrying NRS exchange details. Only sent when Taxly can resolve your tenant from the exchange data — NRS masks party TINs, so prefer the decrypted event.
invoice.transmission.statusStatus updates for invoices you transmitted.
webhook.deliveredA webhook delivery succeeded.
webhook.failedA webhook delivery failed.
Subscribe or you will not receive itIf your endpoint is not subscribed to invoice.transmitted.decrypted, Taxly completes processing but sends no decrypted invoice payload.
Verify the signatureSign the raw request body, not re-serialised JSON, and compare in constant time.
invoice.transmitted.decrypted
{
  "event": "invoice.transmitted.decrypted",
  "source": "taxly",
  "irn": "INV001-94ND90NR-20260406",
  "status": "TRANSMITTED",
  "customer_tin": "20000001-0001",
  "supplier_tin": "30000002-0001",
  "invoice_payload": {
    "business_id": "11111111-2222-3333-4444-555555555555",
    "irn": "INV001-94ND90NR-20260406",
    "payment_status": "PENDING",
    "invoice_kind": "B2B",
    "issue_date": "2026-04-06",
    "invoice_type_code": "380",
    "document_currency_code": "NGN",
    "accounting_supplier_party": {
      "party_name": "Demo Supplier Nigeria Limited",
      "tin": "30000002-0001",
      "email": "billing@demosupplier.example.com",
      "telephone": "+2348000000002",
      "postal_address": {
        "street_name": "12 Example Crescent",
        "city_name": "Abuja",
        "postal_zone": "900001",
        "state": "FCT",
        "country": "NG"
      }
    },
    "accounting_customer_party": {
      "party_name": "Demo Buyer Ventures",
      "tin": "20000001-0001",
      "email": "accounts@demobuyer.example.com",
      "telephone": "+2348000000001",
      "postal_address": {
        "street_name": "45 Sample Avenue",
        "city_name": "Lagos",
        "postal_zone": "100001",
        "state": "Lagos",
        "country": "NG"
      }
    },
    "legal_monetary_total": {
      "line_extension_amount": 5000,
      "tax_exclusive_amount": 5000,
      "tax_inclusive_amount": 5375,
      "payable_amount": 5375
    },
    "invoice_line": [
      {
        "isic_code": "6201",
        "service_category": "Software",
        "invoiced_quantity": 2,
        "line_extension_amount": 5000,
        "item": {
          "name": "Software Subscription",
          "description": "Monthly SaaS subscription"
        },
        "price": {
          "price_amount": 2500,
          "base_quantity": 1,
          "price_unit": "XBG"
        }
      }
    ]
  },
  "is_json_payload": true,
  "timestamp": "2026-04-06T09:18:45+00:00"
}
exchange_invoice.received
{
  "irn": "INV001-94ND90NR-20260406",
  "direction": "INCOMING",
  "status": "TRANSMITTED",
  "buyer_tin": "20000001-0001",
  "seller_tin": "30000002-0001",
  "source": "FIRS_EXCHANGE",
  "received_at": "2026-04-06T09:18:45+00:00",
  "invoice_data": { "…": "complete invoice details from NRS" }
}
Verify signature · PHP
$payload   = file_get_contents('php://input');           // raw body - do not re-encode
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';
$expected  = hash_hmac('sha256', $payload, getenv('TAXLY_WEBHOOK_SECRET'));

if (! hash_equals($expected, $signature)) {
    http_response_code(401);
    exit;
}

http_response_code(200);   // acknowledge fast, process asynchronously
Verify signature · Node.js
const crypto = require('crypto');

app.post('/hooks/taxly', express.raw({ type: 'application/json' }), (req, res) => {
  const expected = crypto
    .createHmac('sha256', process.env.TAXLY_WEBHOOK_SECRET)
    .update(req.body)                                   // raw Buffer
    .digest('hex');

  const received = req.get('X-Webhook-Signature') || '';
  if (expected.length !== received.length ||
      !crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(received))) {
    return res.sendStatus(401);
  }

  res.sendStatus(200);   // acknowledge fast, process asynchronously
});