SDK Quickstart
Use @aoexl/sign when you want to embed signing directly inside your product UI.
This path was validated in a real external React app in this repo:
- consumer app:
sdk-consumer-smoke - viewer host:
sdk-consumer-smoke/src/main.jsx
What You Get
- embedded PDF viewer and signer
- signature popup flow
- save callback to your app
- document-loaded and completion callbacks
- mobile-aware signing UI from the same engine used by the hosted app
Install
bash
npm install @aoexl/signMinimal React Example
jsx
import { AoexlViewer } from "@aoexl/sign";
export default function MerchantOnboardingDemo() {
return (
<AoexlViewer
licenseKey="pk_test_local"
engineUrl="/engine.js"
pdfUrl="/Merchant.pdf"
fileName="Merchant.pdf"
mode="sign"
signerInfo={{ name: "SDK Smoke Tester", email: "sdk-smoke@example.com" }}
config={{
enableSignatureIndicator: true,
signatureIndicatorPosition: "top-right",
autoJumpNextSign: false,
}}
onDocumentLoaded={(info) => console.log("document-loaded", info)}
onSave={(result) => console.log("save", result)}
onAllSigned={(result) => console.log("all-signed", result)}
onComplete={(result) => console.log("complete", result)}
onError={(error) => console.error("aoexl-error", error)}
/>
);
}Required Inputs
| Prop | Purpose |
|---|---|
licenseKey | Your Aoexl signing key |
engineUrl | URL to the built engine.js bundle |
pdfUrl | PDF to render/sign |
mode | sign for signer-first UX |
Event Flow
onDocumentLoaded- signer opens a signature field
- signer applies signature
onSaveonAllSignedwhen all required signature fields are completed
Hosting The Engine
The SDK shell package loads the viewer engine separately.
For local development:
txt
/engine.jsFor production:
- host
engine.json your CDN or app origin - point
engineUrlto that asset
Where Signing Requests Fit
Use the SDK when you want the signing UX inside your own app.
Use hosted signing requests when:
- the signer is external
- you want email-based signing links
- you want server-tracked request records and webhook completion flow
Related docs:
Current Notes
- the SDK render/sign/save path is working in a real React host app
- if you pitch embedding, use this guide instead of the older generic docs page
- if you need framework-specific wrappers next, React should be the first fully documented path