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.
- 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.
# 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
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.jsonA successful response returns
responseCode00and your key.{ "responseCode": "00", "responseMessage": "Business successfully registered for external API access.", "businessKey": "BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX", "businessFirsId": "6dj03c76-1d83-4a39-a4de-51bd70547aef" } - 3
Store the key securely
Save
businessKeyin a secrets manager or environment variable. Never commit it to source control or send it to a browser.export QORPY_BUSINESS_KEY="BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX"If you call this endpoint again for a business that is already registered, you get02and no new key. To replace a key, use Regenerate business key. - 4
Create your first invoice
Send the invoice with your key in the
X-Business-Keyheader. 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.jsonThe 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
Fetch the QR code
Print the NRS QR code on the invoice you give your customer.
curl "$QORPY_BASE_URL/external/businesses/$BUSINESS_ID/invoices/$INVOICE_IRN/qr" \ -H "Accept: application/json" \ -H "X-Business-Key: $QORPY_BUSINESS_KEY"