openapi: 3.0.3 info: title: Paymob Accept Legacy (v2) Accounts Subscription Plans API version: '2.0' description: 'The legacy Paymob Accept API uses a three-step flow: authenticate to receive a bearer auth_token, register an order, then request a payment_key. The payment_key is used either with the iframe redirect or the headless /payments/pay endpoint. Refund, void, capture, transaction inquiry, and saved-card MOTO operations are exposed on this surface.' contact: name: Paymob Developers url: https://developers.paymob.com servers: - url: https://accept.paymob.com description: Egypt production - url: https://ksa.paymob.com description: Saudi Arabia production - url: https://uae.paymob.com description: UAE production - url: https://oman.paymob.com description: Oman production - url: https://pakistan.paymob.com description: Pakistan production security: - BearerAuth: [] tags: - name: Subscription Plans paths: /api/acceptance/subscription-plans: post: summary: Create Subscription Plan operationId: createSubscriptionPlan tags: - Subscription Plans requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionPlanRequest' responses: '201': description: Plan created content: application/json: schema: $ref: '#/components/schemas/SubscriptionPlan' get: summary: List Subscription Plans operationId: listSubscriptionPlans tags: - Subscription Plans responses: '200': description: List of plans content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionPlan' /api/acceptance/subscription-plans/{subscription_plan_id}: put: summary: Update Subscription Plan operationId: updateSubscriptionPlan tags: - Subscription Plans parameters: - $ref: '#/components/parameters/PlanId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionPlanRequest' responses: '200': description: Plan updated content: application/json: schema: $ref: '#/components/schemas/SubscriptionPlan' /api/acceptance/subscription-plans/{subscription_plan_id}/suspend: post: summary: Suspend Subscription Plan operationId: suspendSubscriptionPlan tags: - Subscription Plans parameters: - $ref: '#/components/parameters/PlanId' responses: '200': description: Plan suspended /api/acceptance/subscription-plans/{subscription_plan_id}/resume: post: summary: Resume Subscription Plan operationId: resumeSubscriptionPlan tags: - Subscription Plans parameters: - $ref: '#/components/parameters/PlanId' responses: '200': description: Plan resumed components: schemas: SubscriptionPlan: allOf: - $ref: '#/components/schemas/SubscriptionPlanRequest' - type: object properties: id: type: string status: type: string enum: - active - suspended created_at: type: string format: date-time SubscriptionPlanRequest: type: object required: - frequency - amount_cents - name properties: name: type: string amount_cents: type: integer frequency: type: string enum: - day - week - month - year integration: type: integer reminder_days: type: integer retrial_days: type: integer number_of_deductions: type: integer plan_type: type: string enum: - renew - installment parameters: PlanId: name: subscription_plan_id in: path required: true schema: type: string securitySchemes: BearerAuth: type: http scheme: bearer description: Bearer auth_token from /api/auth/tokens (60-minute TTL).