🛒 Bringo

Integrations

Push Notifications (FCM)

Order updates, promos and partner alerts are delivered with Firebase Cloud Messaging. Your server sends; the apps receive. One Firebase project powers all three apps.

What you need

  • A Firebase project (the same one used for OTP) — guide.
  • A Firebase service-account JSON key (lets your server send messages).
  • Each app built with its google-services.json / GoogleService-Info.plist so it can receive.

1. Get the service-account key

  1. Firebase Console → ⚙️ Project settings → Service accounts.
  2. Generate new private key → downloads a JSON file.
  3. Keep this file private — it can send notifications as your project.

2. Add it to the admin panel

  1. Admin → Settings → Firebase — this is the tab that holds the Firebase Admin SDK credentials used for push.
  2. Paste the JSON contents (or upload the file) and enter your Firebase Project ID.
  3. Save.
FCM push settings
Admin → Settings → Firebase.

3. Test it

Use Admin → Notifications to send a test message, or place an order and confirm the seller/customer device receives a push. The apps register their device token automatically on login.

🧩
Push uses the modern FCM HTTP v1 API (service-account based), not the old "server key". If you only have a legacy server key, generate a service-account JSON as above instead.

iOS: the extra step Android does not need

Android works as soon as google-services.json matches the package name. iOS additionally requires Apple's own push credential, and this is the single most common reason "push works on Android but not iPhone":

  1. Apple Developer → Certificates, Identifiers & Profiles → Keys → create a key with Apple Push Notifications service (APNs) enabled. You download the .p8 once — keep it.
  2. Firebase Console → Project settings → Cloud Messaging → iOS app → upload the .p8 with its Key ID and your Team ID.
  3. Xcode → your target → Signing & Capabilities → add Push Notifications, and add Background Modes → Remote notifications.
🍎
Push never works on the iOS Simulator — it has no APNs registration. Always test on a physical iPhone.

How a device becomes reachable

Useful to know when debugging: each app asks the OS for a token on launch, then sends it to your backend when the user signs in. The backend stores it against that user and uses it for every later message. Consequences worth remembering:

  • A user who has never signed in on a device cannot receive targeted notifications there.
  • Signing out removes the token — that is intended, so the next user of the phone does not receive the previous user's alerts.
  • Reinstalling the app issues a new token; the old one becomes permanently invalid.
  • On Android 13+ and iOS the user must grant notification permission at the prompt. Declining it is silent from the server's point of view — the send succeeds, nothing appears.

Troubleshooting

Nothing arrives anywhere
Check three things in order: the service-account JSON and Project ID are saved, the queue worker is running (most notifications are queued, so a stopped worker means silence with no error), and storage/logs/laravel.log for FCM errors.
Android fine, iOS silent
Almost always the APNs key is missing from Firebase, or the Push capability is not enabled in Xcode. See the iOS section above.
Only some devices receive
Those apps were built with a different — or the placeholder — Firebase config. The google-services.json must belong to the same project as the service-account JSON.
"SenderId mismatch"
The app's Firebase config and the server's service account are from two different Firebase projects. Re-download both from the same project.
"Requested entity was not found" / 404 on send
That device token is stale (app reinstalled or signed out). Harmless — it clears when the user signs in again.
401 / 403 when sending
The service-account JSON is malformed or from a deleted key. Generate a new private key and paste the whole file contents.
Notifications arrive but with no title/body
The app was backgrounded and the payload was data-only, or the template has an empty field. Check the template in Admin → Notifications.
Works in debug, not in the Play release
The release build is signed with a different key, so its SHA-1 is not registered in Firebase. Add the Play App Signing SHA-1 to your Firebase Android app.
👉
Next: Google Maps.