Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Document Subscription Contract API with authentication and endpointsFrank35950:patch-1 #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Frank35950 wants to merge 1 commit into PiNetwork:main
base: main
Choose a base branch
Loading
from Frank35950:patch-1
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions ReadMe.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
- [PiRC1: Pi Ecosystem Token Design](./PiRC1/ReadMe.md)
- [PiRC2: Subscription Contract API](./PiRC2/ReadMe.md)
# 📘 Subscription Contract API

## Overview
The **Subscription Contract API** enables applications to manage recurring billing agreements between service providers and customers. It supports creating, updating, retrieving, and canceling subscription contracts.

---

## Authentication
- **API Key**: Include in request headers (`Authorization: Bearer <token>`).
- **OAuth 2.0**: For secure delegated access.

---

## Endpoints

| Endpoint | Method | Description |
|---------------------|--------|------------------------------|
| `/contracts` | POST | Create a new subscription |
| `/contracts/{id}` | GET | Retrieve contract details |
| `/contracts/{id}` | PUT | Update contract terms |
| `/contracts/{id}` | DELETE | Cancel a subscription |

---

## Data Models

### Contract Object
```json
{
"id": "sub_12345",
"customer_id": "cust_67890",
"plan_id": "plan_basic",
"status": "active",
"start_date": "2026年04月27日",
"renewal_date": "2026年05月27日",
"billing_cycle": "monthly"
}- [PiRC1: Pi Ecosystem Token Design](./PiRC1/ReadMe.md)
- [PiRC2: Subscription Contract API](./PiRC2/ReadMe.md)

AltStyle によって変換されたページ (->オリジナル) /