Secure Backend Integration for Mobile Bitcoin Applications
Research status: Theoretical SDK design. Examples are illustrative and have not been built or tested against the live engine.
Credential isolation
A backend-mediated mobile SDK translates application operations into authorized engine calls. The backend holds the merchant BTC KEY in protected configuration. Mobile authentication identifies the application user, not the engine wallet identity. Map each order to its owner and wallet server-side; never let a caller select an arbitrary wallet credential or engine URL. The engine is not assumed to provide tenant-level access controls.
Conceptual application contract
POST /app/invoices
Content-Type: application/json
{"order_id":"order-123"}This is a proposed application endpoint, not a WAB endpoint. The backend obtains the expected amount from its trusted product catalog, creates a durable invoice intent and invokes WATCH using the documented engine contract. It returns only the payment address, amount, network, application invoice ID and public status. Store the watch identifier privately and reconcile it with the order. Authenticate every status lookup and enforce ownership.
Settlement and authorization
Use a durable uniqueness constraint for order fulfillment. A WATCH observation is not automatically sufficient for every merchant's confirmation policy. Handle late payments, underpayment and overpayment as explicit application states. If the app supports withdrawals, use a separate authorized workflow with persistent request IDs and spending limits; a client-side PIN alone is not a server-side control. Never retry an ambiguous send with a new identifier merely because the mobile connection dropped.
Acceptance plan
Test cross-account access, manipulated prices, replayed requests, duplicate invoice creation, process crashes and concurrent fulfillment. Assert that rejected requests cannot reach the engine. Verify a testnet invoice using independent transaction evidence and direct engine observations. Review TLS, logging, secret rotation procedures and backup access before production. Credential rotation capabilities of the engine must be verified rather than assumed.
Primary reference
https://thamer.org/api
Related reading
https://thamer.org/docs/wab-sdk-api-engine-application-boundaries
https://thamer.org/docs/wab-sdk-authentication-credential-management
https://thamer.org/docs/wab-sdk-idempotency-retry-strategies
https://thamer.org/docs/wab-sdk-payment-reconciliation
https://thamer.org/docs/wab-sdk-mobile-bitcoin-architecture
https://thamer.org/docs/wab-sdk-swift-bitcoin-payments
https://thamer.org/docs/wab-sdk-kotlin-bitcoin-applications
https://thamer.org/docs/wab-sdk-flutter-cross-platform
https://thamer.org/docs/wab-sdk-desktop-applications
