From ccb7cf21fd61cca86a6033ecd39b30ebf5e40836 Mon Sep 17 00:00:00 2001 From: Frank35950 <169876435+Frank35950@users.noreply.github.com> Date: Mon, 27 Apr 2026 00:06:56 +0100 Subject: [PATCH] Document Subscription Contract API Added detailed documentation for the Subscription Contract API, including authentication methods, endpoints, and data models. --- ReadMe.md | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 043f8a08c..b3da402c6 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,2 +1,38 @@ -- [PiRC1: Pi Ecosystem Token Design](./PiRC1/ReadMe.md) -- [PiRC2: Subscription Contract API](./PiRC2/ReadMe.md) \ No newline at end of file +# 📘 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 `). +- **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)