Skip to content

Get started

Quickstart

Register your business, store your key, and create a signed e-invoice. You will need your NRS Business ID and Entity ID.

Before you start, make sure your business is registered on the NRS e-invoicing portal and has selected Qucoon Limited as its Access Point. Requests from businesses that have not done this fail verification.
  1. 1

    Set your environment

    Your base URL combines the Qorpy host and the stage you are calling. Keep both in environment variables so you can switch stage without code changes. See Environments.

    .env
    # Development stage. Swap for production when you go live.
    export QORPY_BASE_URL="https://{host}/{stage}"
    export BUSINESS_ID="6dj03c76-1d83-4a39-a4de-51bd70547aef"
  2. 2

    Request a business key

    This is the only call that needs no authentication. Qorpy checks the IDs and address against NRS records.

    curl -X POST "$QORPY_BASE_URL/external/request-business-key" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -d @business.json

    A successful response returns responseCode 00 and your key.

    {
      "responseCode": "00",
      "responseMessage": "Business successfully registered for external API access.",
      "businessKey": "BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX",
      "businessFirsId": "6dj03c76-1d83-4a39-a4de-51bd70547aef"
    }
  3. 3

    Store the key securely

    Save businessKey in a secrets manager or environment variable. Never commit it to source control or send it to a browser.

    .env
    export QORPY_BUSINESS_KEY="BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX"
    If you call this endpoint again for a business that is already registered, you get 02 and no new key. To replace a key, use Regenerate business key.
  4. 4

    Create your first invoice

    Send the invoice with your key in the X-Business-Key header. This example bills 10 bags of rice at ₦20,000 with 7.5% VAT.

    curl -X POST "$QORPY_BASE_URL/external/businesses/$BUSINESS_ID/invoices" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H "X-Business-Key: $QORPY_BUSINESS_KEY" \
      -d @invoice.json

    The full request body and every field are on the Create invoice page. Keep the IRN from the response; you use it for QR codes, payment updates and reversals.

  5. 5

    Fetch the QR code

    Print the NRS QR code on the invoice you give your customer.

    cURL
    curl "$QORPY_BASE_URL/external/businesses/$BUSINESS_ID/invoices/$INVOICE_IRN/qr" \
      -H "Accept: application/json" \
      -H "X-Business-Key: $QORPY_BUSINESS_KEY"
Next: load the reference data lists once and cache them, so you can validate state, LGA and product codes before you send an invoice.
Qorpy API by Qucoon Limited, an NRS-approved Access PointAPI version v1