A Network logo

A Network

Testnet

Back to Main Site
Pi Browser Ready

Pi DEX Access Surface

This page initializes the Pi SDK in sandbox mode, authenticates the current Pi user, charges a one-time 1 Pi lifetime DEX access fee, and then lets that user quote and execute Layer 1 ANET swaps through your backend.

SDK: Initializing...

App Checklist Bridge

  • App setup completed
  • Wallet connected
  • Production URL configured
  • Lifetime DEX unlock + swap flow

Process A Transaction On The App

This is the minimal Pi SDK sandbox payment example for https://a-network.net/pi-testnet. It initializes the SDK in the browser, authenticates the Pi user, opens the Pi payment sheet, then sends callback data to your backend /approve and /complete endpoints.

Click "Pay with Pi" to run a sandbox user-to-app transaction.

1) Authenticate Pi User

Run this inside Pi Browser sandbox mode for full Pi context.

No Pi user connected yet.

2) Pay Lifetime DEX Access Fee (1 Pi Once)

Creates a Pi-only user-to-app payment and sends approval/completion callbacks to your backend before lifetime DEX access is unlocked.

Payment not started.
Lifetime DEX access: locked (1 Pi payment required).

3) Quote And Execute Layer 1 Swap

After the one-time lifetime unlock is paid, the Pi app can request a quote and execute a Layer 1 ANET swap through your backend and DEX node.

DEX pool bootstrap not requested.
Swap quote not requested.
Swap not executed.

Backend Endpoints Required

Create these endpoints on your server so Pi can finalize the unlock payment and then bridge DEX quotes and swaps into your Layer 1 node:

Your backend should validate payment IDs server-side with your Pi API key, persist the user's one-time unlock, and only then forward quote and swap requests to your Layer 1 /dex/swap/quote and /dex/swap/execute routes.