Welcome to the Pi Network SDK Documentation

The Pi Network SDK is the gateway for developers to build decentralized applications (Pi Apps) that integrate seamlessly with the Pi Ecosystem. By leveraging this SDK, you can create web applications that interact with the Pi Blockchain, authenticate millions of Pioneers, and facilitate secure cryptocurrency transactions within the Pi Browser.

What is the Pi SDK?

The Pi SDK is a suite of development tools and APIs designed to abstract the complexities of blockchain interaction. It allows you to build “Pi-native” experiences where users can use their Pi identity and balance without leaving your application.

Key capabilities include:

  • User Authentication: Securely sign in users using their Pi Network accounts.
  • Payments (U2A & A2U): Facilitate User-to-App (U2A) payments for services or App-to-User (A2U) payments for rewards and withdrawals.
  • Platform Integration: Access Pi-specific features like the Pi Wallet and standardized UI components.

Documentation Structure

To help you navigate the development lifecycle, this site is organized into three primary sections:

Getting Started

New to the ecosystem? Start here to understand the foundational requirements. There you will find checklists for setting up your developer account and registering your first app in the Pi Developer Portal. You will also find instructions on how to use the Pi Sandbox to test your application in a local desktop browser before deploying to the Pi Browser.

Quick Start

Once you have activated your account and registered your app, you can take advantage of our software packages that simplify the setup process. All of the “Ten Minutes to Transaction” packages provide an installation script that creates a “buy” button for initiating a Pi transaction. We support a range of frameworks including Express, Django, and Rails for the backend and React, Stimulus, and raw JavaScript for the frontend.

Core SDK (JavaScript)

This is the core library for your client-side application. It enables the window.Pi object, which serves as the bridge between your web app and the Pi Browser.

Topics include:

  • Installation: How to include the SDK script tag in your HTML.
  • Authentication: Detailed guides on requesting user “scopes” (like usernames) and handling authorization.
  • Payments: Interfacing with the createPayment method and managing the lifecycle of a transaction.
  • And more!

Backend & API Reference

Building a secure app requires server-side validation.

Topics include:

  • Platform API: Endpoint reference for your backend (e.g. GET /me, payment approval/completion, A2U payments, rewarded-ad verification).
  • Payments: Conceptual guide to the “Double-Check” flow (server-side approval + completion) for validating User-to-App transactions.
  • And more!

Key Resources

  • Developer Portal: Access this via the Pi Browser to register your app and manage your API keys.
  • Demo App: A complete, open-source reference implementation to see the SDK in action.
  • PiOS (Pi Open Source): Learn how to contribute to the community and use Pi-licensed code for your own projects.

Ready to build?

Jump straight into the Getting Started Guide to register your app and begin your journey into the Pi Network ecosystem!