pi-payments

Automate Pi Network three-phase payment flows across frontend and backend.

4|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/aaaa47080/stock_agent --skill pi-payments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-payments
Source: https://github.com/aaaa47080/stock_agent/tree/main/.agent/skills/pi-payments
Command: npx skills add https://github.com/aaaa47080/stock_agent --skill pi-payments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pi payments require coordinating a multi-step workflow across frontend and backend. This Skill provides a complete blueprint for implementing the three-phase Pi payment flow: frontend initiates a payment, the server approves it, Pioneer confirms on Pi Wallet, and the backend completes the transaction. It also standardizes the PaymentDTO structure and enforces secure API usage.

Core Features & Use Cases

  • Three-phase Pi payment flow integration covering frontend creation, server approval, and backend completion.
  • Standardized PaymentDTO structure for consistent transaction data.
  • Secure API usage & error handling including server-api-key protection and handling incomplete payments.

Quick Start

Wire your frontend to Pi.createPayment with correct callbacks and implement backend endpoints to approve and complete payments, then handle incomplete payments on re-auth.

Frequently Asked Questions about pi-payments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement the three-phase Pi Network payment flow for in-app transactions?

The three-phase Pi Network payment flow requires frontend payment creation, server-side approval, and backend completion. This Skill automates that workflow by providing createPayment callbacks and secure server endpoints to approve and complete transactions.

What is a PaymentDTO structure and how is it used in Pi payments?

A PaymentDTO structure standardizes transaction data across frontend and backend systems. This Skill enforces a clear PaymentDTO format to maintain consistency during the createPayment, server approval, and backend completion phases of Pi Network transactions.

How do I handle incomplete or failed Pi Network payments on server re-auth?

Incomplete Pi Network payments require robust error handling during re-authentication. This Skill provides logic to detect and manage failed transactions, ensuring the backend only completes a payment after receiving a successful server response.

Can I use a server API key to secure Pi Network payment approval and completion endpoints?

Yes, securing server approval and completion endpoints requires a server API key. This Skill enforces secure API key usage to protect the backend endpoints that approve and complete Pi Network payments during the three-phase flow.

When should I complete a Pi Network payment on the backend server?

You should complete a Pi Network payment on the backend only after a successful server response. This Skill enforces a strict rule to complete transactions solely after verifying the server-side approval endpoint returns a valid confirmation.