Skip to content
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

[FEAT] Billing Plans - Creation #633

Open
3 tasks
MuthoniMN opened this issue Feb 28, 2025 · 0 comments
Open
3 tasks

[FEAT] Billing Plans - Creation #633

MuthoniMN opened this issue Feb 28, 2025 · 0 comments
Labels
enhancement New feature or request mentor approved

Comments

@MuthoniMN
Copy link
Contributor

Description

The current API does not have a way to create a new billing plan

Acceptance Criteria

  • A POST endpoint (/api/v1/billing-plans)
  • Error handling
  • Unit tests for the controller method

Request

POST - \api\v1\billing-plans

{
     Authorization: "Bearer {auth-token}"
}

Request Body:

{
  "name": "Free",
  "description": "Free",
  "frequency": "monthly",
  "amount": 0,
  "is_active": true
}

Responses

201- Successful billing plan creation

{
    status: string,
    message: string,
   data: {
     "name": "Free",
     "description": "Free",
      "frequency": "monthly",
       "amount": 0,
        "is_active": true
   }
}

403 - Billing plan already exists

{
  status: "error",
  message: "This billing plan already exists",
  data: {}
}

500 - Internal server error

{
  status: "error",
  message: "Internal server error",
  data: {}
}

Expected Outcome

There is an endpoint for creating billing plans

@MuthoniMN MuthoniMN mentioned this issue Feb 28, 2025
12 tasks
@bhimbho bhimbho assigned bhimbho and unassigned bhimbho Feb 28, 2025
@bhimbho bhimbho added enhancement New feature or request mentor approved labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mentor approved
Projects
None yet
Development

No branches or pull requests

2 participants