Email workspaceFailed subscription or upgrade attempt contract
Implementation: App\Mail\subscriptionFailed. Baseline view: resources/views/emails/users/subscriptionFailed.blade.php. Usage: app/Http/Controllers/Billing/AppSubscriptionsController.php:390. Static references are evidence, not proof of current production delivery. Original templates use mail::message; the standalone draft uses the shared compact table shell.
Suggested subject: Subscription attempt failed (proposed explicit subject; source Mailable does not set one). HTML document title does not set the actual mail header.
Suggested preheader: Your subscription or upgrade attempt failed. Review the supplied reason.
Portable placeholder contract
| Token | Existing source / derivation | Handling |
|---|---|---|
| {{logo_url}} | Original Built app_name PNG | Optional deployment override; concrete project HTTPS image is already present. Approved absolute HTTPS or matching CID. |
| {{preheader}} | Suggested text above, assembled only from existing context | Required escaped text; no new backend record or timing promise. |
| {{failure_reason}} | $message constructor argument <- $transaction_verification['message'] | Required escaped provider-verification text, matching the original escaped reason. Review provider data for secrets/PII before delivery; never insert it as raw HTML. |
Content, states and integration decisions
- Audience: request.user(api).email for the failed verification branch. Explicitly queued; preserve configured default sender/header behavior. No first name, business identity, plan, payment amount or currency is supplied by the current body contract; none is invented.
- Preserve subscription/upgrade failure, supplied reason, persistence guidance and telephone 030 397 4832. Replace the misspelled source support@builtaccouting.com with the established support@built.africa already used in CancelSubscription and other API emails. This is a disclosed proposed copy correction, not a production code/header change.
- Source contains mail::button with empty url and Button Text. Remove it rather than inventing a retry, checkout or subscription URL. The notice has no attachment and no usable action link.
- States: standard and long supplied reason. No automatic retry, no-charge guarantee, refund, payment deadline or account downgrade is claimed. A provider reason remains escaped text and must not be treated as an arbitrary link destination.
Safe integration, text and images
ready/subscription-attempt-failed.html and ready/subscription-attempt-failed.txt are portable extracts; every populated state under previews/ has HTML and text. No separate project-owned plain-text alternative was found for these four views, so the supplied text versions are proposed equivalents.
Portable {{placeholder_name}} tokens are not automatically Laravel Blade variables. Prefer an explicitly mapped full Blade view and a separate text alternative inside the existing Mailable, retaining constructors, sender/header choices, recipient routing, attachments and queue behavior. A full document should not be nested inside mail::message. No new templating framework is needed.
Escape all dynamic text, attribute values, failure reasons and internal references. Never insert provider text as raw HTML. Validate any image override separately against approved HTTPS hosts or an actual attached CID before escaping it. If string replacement is chosen, use one pass; inserted token-shaped text must remain text. There are no application action destinations or duplicate legacy action-link fields in this batch; the source failed-attempt button is empty and intentionally removed. Only the confirmation tax block is conditional; remove its entire marked section when false in both HTML/text. Other documented fields are required except the explicit channel fallback.
Default logo: https://built-storage.ams3.cdn.digitaloceanspaces.com/Built/app_name.png. Retain the unchanged assets/built-logo.png original. Use absolute HTTPS hosting or a matching CID attachment, preserve its proportions and account for remote-image blocking. Dark mode is progressive enhancement and needs real client tests.
Fixtures use fictional names, amounts, reasons and references. No payment, subscription change, mail send or provider action is executed. Browser rendering is not proof of Gmail, Outlook or iOS Mail compatibility, actual attachment generation or production delivery. See subscriptions-batch.md, subscriptions-validation.md and integration-notes.html.