Quickstart
Get your first invoice fiscalized in under 5 minutes. This guide covers authentication, product mapping, and your first successful submission to URA.
Prerequisites
API Keys
Get your sandbox API key from the TaxBridge Portal.
Keys start with sk_test_ for sandbox or sk_live_ for production.
HTTP Client
Any language that can make HTTP requests (Node.js, Python, cURL, etc.).
1 Authentication
All API requests require two headers: your API key for authentication, and the taxpayer ID to identify which URA registration to use.
curl -H "Authorization: Bearer sk_test_your_api_key" \
-H "X-Tax-Payer-Id: tp_abc123" \
-H "Content-Type: application/json" \
https://api.taxbridge.io/v1/tax-intents Authorization
Your API key. Use sk_test_ for sandbox,
sk_live_ for production.
X-Tax-Payer-Id The taxpayer (business) making the sale. Get this from the Portal after onboarding.
2 Map Your Products
Before creating invoices, map your internal SKUs to URA's goods codes. This ensures automatic validation and tax compliance.
curl -X POST https://api.taxbridge.io/v1/product-maps \
-H "Authorization: Bearer $TAXBRIDGE_API_KEY" \
-H "X-Tax-Payer-Id: tp_abc123" \
-H "Content-Type: application/json" \
-d '{
"externalRef": "CHIA-50KG",
"uraCode": "204024000000",
"goodsName": "Organic Chia Seeds",
"measureUnit": "KGM",
"categoryCode": "10101501",
"refPrice": 50000
}' 3 Create a Tax Intent
A Tax Intent is a draft invoice. TaxBridge validates it and prepares the URA payload automatically. Use your mapped SKUs in the items array.
curl -X POST https://api.taxbridge.io/v1/tax-intents \
-H "Authorization: Bearer $TAXBRIDGE_API_KEY" \
-H "X-Tax-Payer-Id: tp_abc123" \
-H "Content-Type: application/json" \
-d '{
"taxMethodId": "DOMESTIC_B2C",
"externalRef": "INV-2025-001",
"currency": "UGX",
"paymentMode": "101",
"buyerName": "John Doe",
"items": [
{
"externalRef": "CHIA-50KG",
"quantity": 10,
"unitPrice": 50000,
"unit": "KGM"
}
]
}' Tax Method Options
-
DOMESTIC_B2C— Domestic sale to consumer -
DOMESTIC_B2B— Domestic B2B (requires buyerTin) -
EXPORT_ZERO_RATED— Zero-rated export (requires passport)
4 Confirm & Fiscalize
Once you're satisfied with the draft, confirm it to trigger fiscalization. TaxBridge handles encryption, signing, and submission to URA.
curl -X POST https://api.taxbridge.io/v1/tax-intents/ti_xyz789/confirm \ -H "Authorization: Bearer $TAXBRIDGE_API_KEY"
5 Check Status (Optional)
Fiscalization is asynchronous. Poll the GET endpoint to check the final status.
curl https://api.taxbridge.io/v1/tax-intents/ti_xyz789 \ -H "Authorization: Bearer $TAXBRIDGE_API_KEY"
PROCESSING SUCCEEDED
or
FAILED Next Steps
Authentication Guide
Learn about API keys, environments, and security best practices.
Smart Registry
Deep dive into product mapping, unit scaling, and category management.
Webhooks
Get notified when fiscalization completes instead of polling.
Error Handling
Handle URA rejections and implement retry strategies.