Overview
The intents endpoint allows wallets to resolve a proposal by transaction ID. This is used when a buyer scans a QR code or clicks a payment link.This endpoint is public and does not require authentication.
Endpoints
Get Proposal by Transaction ID
Resolve a proposal by its transaction ID.Path Parameters
Transaction ID (UUID) from the payment URI or QR code
Response
Returns the full CommerceProposal JSON-LD object (see Proposals for schema).JSON-LD context (
https://schema.identipay.net/v1)Type (
CommerceProposal)UUID for this transaction
Merchant information
Array of line items
Total amount and currency
Receipt and warranty information
Age gate or region restrictions
ISO 8601 expiry timestamp
Hash for on-chain verification
Blockchain name (
sui)On-chain settlement module address
Example Request
Example Response
Error Responses
Implementation Details
Resolution Flow
When a wallet resolves an intent (seeroutes/intents.ts:12-42):
- Lookup Proposal: Query database by transaction ID
- Check Existence: Return 404 if not found
- Check Expiry: If expired, update status and return error
- Check Status: Return error if cancelled
- Return Proposal: Return full proposal JSON
Automatic Expiry Detection
The endpoint checks expiry on every request:Payment URI Format
Wallets typically extract the transaction ID from a payment URI:- Extracts the hostname (
acme.com) - Extracts the transaction ID (
550e8400-...) - Constructs the intent URL:
https://acme.com/api/identipay/v1/intents/550e8400-... - Fetches the proposal
- Displays it to the user for approval
Privacy Considerations
The proposal includes the merchant’s Sui address and public key, but:- Does NOT include the buyer’s information (added during settlement)
- Does NOT reveal which addresses are scanning the proposal
- Can be fetched anonymously (no authentication required)
Settlement Workflow
After resolving the proposal, the wallet:- Display Proposal: Show merchant, items, amount, constraints
- Check Constraints: Verify age gate (generate ZK proof if needed)
- Build Settlement: Create settlement transaction via
/transactions/gas-sponsor - Sign & Submit: Sign transaction and submit via
/transactions/submit - Monitor Status: Watch for settlement confirmation via WebSocket
Related Endpoints
- Proposals - Create proposals (merchant endpoint)
- Transactions - Submit settlements
- WebSocket - Monitor settlement status
