V1.2 REST API
Migrate from V1.0
See how the three V1.0 server calls become the V1.2 flow, with the code before and after.
Migration from V1.0
Upgrading from V1.0 to V1.2 preserves the REST API approach while adding Shield security. The key difference: V1.2 merges "create" and "activate" into a single "send" call, but adds a prerequisite "get challenge" step.
V1.0 Flow (3 server calls)
- POST
/transactions-- create transaction - POST
/transactions/activate/{id}-- send OTP - POST
/transactions/verify/{id}-- verify OTP
V1.2 Flow (3 server calls + 1 client step)
- GET
/v1.2/transactions/challenge-- get PoW challenge - Client: solve PoW + get Turnstile token (Shield SDK)
- POST
/v1.2/transactions/send-- send OTP with proofs - POST
/v1.2/transactions/verify-- verify OTP (transactionReqIDin body)
