Expand description
WebAssembly bindings for StateSet ACP Handler
This crate provides browser-compatible WASM bindings for the ACP checkout service.
§Example (JavaScript)
import init, { AcpClient } from '@stateset/acp-wasm';
await init();
const client = new AcpClient('api_key_demo_123');
const session = await client.createCheckoutSession([
{ id: 'prod_laptop_001', quantity: 1 }
]);
console.log('Session ID:', session.id);
const result = await client.completeCheckoutSession(session.id, 'tok_demo');
console.log('Order ID:', result.order.id);Structs§
- AcpClient
- ACP Client for browser environments.