payment-gateway.app Docs
Features & User Guide

PDF Storage

Configure private S3 storage, understand temporary retention, and verify document downloads.

PDF Storage

Configure storage under Settings > Invoicing > PDF Storage. The same setting covers invoice and credit-note PDFs. Admin and customer downloads continue through the existing document access controls; administrators do not need to make a bucket public.

Supported providers

SettingBehavior
Amazon S3 / S3-compatibleAuthenticated uploads and reads from a private bucket.
Custom storage offWorker temporary cache; files are cleaned up after about 24 hours and may disappear on restart.
Saved Local / Filesystem configurationWorker filesystem storage, subject to temporary-cache cleanup. It is not a durable archive.
Azure Blob / Google Cloud Storage / unknown providerNot implemented. Existing values remain visible, but enabled unsupported configurations are rejected. Choose S3 or explicitly disable custom storage.

The worker fails PDF generation if configured cloud storage fails. It does not silently replace a failed cloud upload with a temporary-cache success.

Configure a private bucket

Create the bucket with your storage provider before saving these settings.

FieldWhat to enter
Endpoint URLLeave blank for Amazon S3, or enter your S3-compatible service endpoint. Do not include the bucket, credentials, a query, or a fragment. HTTPS is recommended; HTTP is only appropriate within a trusted development network.
RegionThe region used for request signing, including for compatible providers.
Bucket nameThe existing private bucket name, without a URL or path.
Path prefixOptional folder prefix before organization/document paths. Avoid dot segments, backslashes, queries, and fragments.
Access key ID / Secret access keyCredentials with access to the configured bucket and prefix.

Use provider permissions scoped to the required object prefix: upload (s3:PutObject), read (s3:GetObject), and delete (s3:DeleteObject). Public-read permissions and public bucket policies are not required.

Saved credentials are masked. Leave a credential unchanged or blank to keep its saved value; enter a new value to replace it. A blank endpoint selects the Amazon S3 default. Do not paste credentials into tickets, screenshots, or logs.

A saved legacy base URL is retained for compatibility. New S3 documents use managed worker references rather than that public URL. The database does not store expiring signed download URLs.

Save and verify

Settings saved means configuration validation and persistence succeeded. It does not mean the endpoint was contacted or bucket permissions were tested.

  1. Save the settings and resolve any highlighted field errors.
  2. Generate or regenerate a PDF from an invoice detail page.
  3. Wait for generation to finish, then download and open the PDF.
  4. Repeat for a credit note if your organization issues them. Check configured attachment and ZUGFeRD workflows when those features are used.
  5. In a controlled maintenance or test environment, restart the worker and download the same generated PDF again without regenerating it. This verifies the stored copy can be retrieved independently of the temporary cache.

A failed generation appears in the PDF dialog with retry guidance. Correct storage access before retrying; repeatedly saving the settings does not test or repair provider connectivity.

Retention and configuration changes

Temporary storage is a delivery cache, not an accounting archive. Keep MongoDB backups and a separate accounting archive appropriate for your organization. For S3, configure and monitor bucket lifecycle rules, backups, and retention with the provider; the gateway does not establish an archival retention policy.

Changing the bucket, endpoint, prefix, credentials, or provider does not migrate existing objects. Disabling custom storage can also make earlier S3 PDFs unavailable because managed downloads resolve through the current organization configuration. Keep the original storage configuration and object permissions until the documents have been migrated and their downloads verified. Rotating credentials must retain access to the existing objects.

Regeneration can recover a missing delivery copy, but it is not a substitute for preserving an issued document's original archived bytes.

Troubleshooting

SymptomNext step
Required field errorSupply region, bucket, and credentials for a new S3 configuration. Saved masked credentials can be retained.
Unsupported saved providerChoose S3 and configure it, or turn off custom storage and save after reviewing the retention impact.
Generation fails after savingCheck worker connectivity, endpoint, region, credentials, and upload permissions. No automatic local fallback occurs.
Generation succeeds but download failsCheck read permissions and whether storage configuration or bucket lifecycle rules changed.
Old PDF unavailable after a settings changeRestore the original configuration/access, or follow your document migration and recovery process.
Temporary PDF missingRegenerate the delivery copy from the invoice or credit note; restore the original from your archive when exact original bytes are needed.

See Invoicing & Credit Notes, Worker configuration, and Backup & Recovery.

On this page