Documentation Index
Fetch the complete documentation index at: https://setup.despia.com/llms.txt
Use this file to discover all available pages before exploring further.
wallet://pkpass presents the native wallet sheet pre-loaded with a .pkpass file hosted at any publicly reachable HTTPS URL. The user taps to confirm and the pass lands in their wallet. Your app receives a callback for every outcome.
The
url parameter must be a publicly fetchable HTTPS URL. Data URLs (data:...), blob URLs (blob:...), and file:// paths are not accepted - the runtime fetches the resource over the network and will fail silently if it cannot reach it.Installation
- Bundle
- CDN
How it works
Registerwindow.onWalletEvent before triggering the call. The callback fires once with the outcome - always define it first so no payload is missed.
Callback payloads
The callback receives a single object.status is always present. error is only set when status is "failed".
action | status | error | Meaning |
|---|---|---|---|
add | presented | - | The wallet sheet appeared on screen. |
add | dismissed | - | The user dismissed the sheet without adding the pass. |
add | failed | missing_or_invalid_url | The url param was absent or malformed. |
add | failed | cannot_add_passes | The device cannot add passes. |
add | failed | download_failed: <msg> | The runtime could not fetch the .pkpass file. |
add | failed | invalid_pass | The file was fetched but is not a valid pass. |
add | failed | invalid_pass: <msg> | The file is invalid, with a reason from the system. |
add | failed | no_presenter | No view controller was available to present the sheet. |
unknown | failed | unknown_command: <host> | An unrecognised wallet:// host was used. |
Handle each outcome
Branch onstatus and error to give the user accurate feedback.
Resources
NPM Package
despia-native