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

[FIX](PHP) Refactor Billing API Endpoint for Creating New Plans #598

Open
tulbadex opened this issue Aug 25, 2024 · 0 comments
Open

[FIX](PHP) Refactor Billing API Endpoint for Creating New Plans #598

tulbadex opened this issue Aug 25, 2024 · 0 comments

Comments

@tulbadex
Copy link
Contributor

Description

Refactor our current API endpoint for creating a new billing plan to have the following route, request body, and response body.

Route

POST: /api/v1/billing-plans

Request Body:

{
  "name": "string",
  "frequency": "Monthly",
  "is_active": true,
  "amount": 0,
  "description": "string"
}

Response Body:

Status Code: 201 Created

{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "frequency": "Monthly",
    "is_active": true,
    "amount": 0,
    "description": "string",
    "created_at": "2024-08-24T14:53:25.025Z",
    "updated_at": "2024-08-24T14:53:25.025Z"
  },
  "message": "string",
  "status_code": 0
}

Status Code:

400 Bad Request

{
  "data": "string",
  "error": "string",
  "message": "string",
  "status_code": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant