SEO Title: Day 10: Capture IRB Response and Store UUID, QR Code #irbresponse #einvoicecomplete
Focus Keyphrase: IRB e-invoice integration
Meta Description: Finalize your IRB e-invoice integration by storing UUID, submission time, and QR code from IRBM’s response in your Laravel system.
Finalizing the IRB Invoice Submission
Once IRBM accepts your invoice, their API responds with:
- ✅ uuid — the official invoice identifier
- 🕘 submissionDateTime
- 📦 invoiceStatus
- 🔗 qrCode (base64 image or link)
Today you’ll store these in your database and prepare to display them in PDFs or emails.
Step 1: Update Your Invoices Table
Add fields to your migration:
$table->string('irb_uuid')->nullable();
$table->timestamp('irb_submitted_at')->nullable();
$table->string('irb_status')->nullable();
$table->text('irb_qr_code')->nullable(); // base64 or link
Run the migration:
php artisan migrate
Step 2: Store the Response in Laravel
In your controller or job after submission:
$response = app(IRBSubmitService::class)->submitInvoice($signedXml);
$invoice->update([
'irb_uuid' => $response['uuid'] ?? null,
'irb_submitted_at' => now(),
'irb_status' => $response['invoiceStatus'] ?? 'unknown',
'irb_qr_code' => $response['qrCode'] ?? null,
]);
Step 3: Display the QR Code (Optional)
In your Blade PDF/email view:
@if($invoice->irb_qr_code)
<img src="data:image/png;base64,{{ $invoice->irb_qr_code }}" alt="IRB QR Code" />
@endif
Use Case: Show QR in Invoice
Malaysia’s IRBM encourages showing the QR code on printed/digital invoices for easy validation by buyers. You can embed it:
- 🧾 In your PDF view
- 📧 In invoice confirmation emails
What You’ve Built in 10 Days
You’ve completed a full IRB e-invoice integration in Laravel:
- ✔ UBL XML generation
- ✔ Digital signature with IRBM cert
- ✔ UBLExtensions + signature placement
- ✔ Submission with token auth
- ✔ Response handling with UUID & QR
All using clean service-based Laravel code — ready for production.
Next Steps (Bonus)
- 🕓 Schedule auto re-submission for failed invoices
- 📥 Build a dashboard to track invoice statuses
- 🔐 Validate signature using IRBM’s QR code verifier
Tags: #IRBIntegration #EInvoice #LaravelUBL #MyInvois #MalaysiaTax