Access purchased assets
This guide explains how to retrieve secure access links for purchased digital assets after an order has been successfully completed.
HL Connector does not stream or proxy asset files directly. Instead, it provides secure that grant access to purchased content.
Overview
Access to assets is only available after a purchase reaches the
COMPLETED state.
- The vendor completes a sale on their side
- The purchase is registered and fulfilled asynchronously
- The order reaches
COMPLETED - The vendor requests secure access URLs
- The customer downloads or views the asset
Access URLs are generated on demand and can be safely exposed to end users.
Prerequisites
Before requesting access URLs, ensure that:
- The purchase order exists
- The order status is
COMPLETED - The order was not canceled
Attempting to access assets for orders in other states may result in an error.
Download the asset
Use this endpoint to retrieve a secure URL for downloading the purchased asset file (PDF, audio, media file, etc.).
The returned URL:
- Can be safely shared with the end user
- Provides direct access to the file
HL Connector does not require additional authentication when accessing the URL.
View the asset online
Some assets support online viewing instead of direct download (for example, sheet music or interactive viewers).
This endpoint returns a secure URL suitable for embedding or redirecting the user to an online viewer.
Access lifecycle
Asset access is tightly coupled to the order lifecycle.
| Order status | Access behavior |
|---|---|
PROCESSING |
Access not available |
COMPLETED |
Access URLs can be generated |
FAILED |
No access available |
CANCELED |
Previously granted access is revoked |
Vendor-initiated revocation
If a refund, dispute, or other business event occurs on the vendor side, access to the asset can be revoked.
After cancellation:
- Previously issued URLs may stop working
- New access URLs can no longer be generated
- The order transitions to
CANCELED
Common access pattern
sequenceDiagram
participant Vendor
participant HL as HL Connector
participant Customer
Vendor->>HL: GET /purchase/download-url
HL-->>Vendor: Secure URL
Vendor-->>Customer: Redirect / link
Customer->>HL: Download / View asset
Error handling
Asset access endpoints use standard HTTP status codes:
401— missing or invalid access token404— order or asset not found409— order state does not allow access5xx— internal or fulfillment errors
Errors are returned in a structured JSON format and are safe to log.
Summary
- Access is only available after
COMPLETED - Use secure URLs for download or online viewing
- Access can be revoked at any time by the vendor