openapi: 3.0.1 info: title: MoneyGrit Subscriptions description: "MoneyGrit API calls related with subscription feature." contact: email: allaudet@nakima.es version: 1.0.0 servers: - url: https://api.moneygrit.proj.nakimasolutions.com/api/v1 tags: - name: auth description: Authentication endpoints - name: stripe description: Operations with Stripe paths: /public/auth/signup: post: tags: - auth summary: Register a new User operationId: registerUser requestBody: description: User information content: application/json: schema: $ref: "#/components/schemas/AuthCreate" required: true responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ApiResponseLogin" 400: description: invalid parameters content: application/json: schema: $ref: "#/components/schemas/ApiResponseError" x-codegen-request-body-name: body /public/auth/login: post: tags: - auth summary: Login User operationId: loginUser requestBody: description: User credentials content: application/json: schema: $ref: "#/components/schemas/AuthCredentials" required: true responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ApiResponseSignup" 400: description: invalid parameters content: application/json: schema: $ref: "#/components/schemas/ApiResponseError" x-codegen-request-body-name: body /client/payments/paymentMethods/setupIntent: get: tags: - stripe summary: Add new payment method operationId: addPaymentMethod responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ApiResponsePlaidIntent" 400: description: invalid parameters content: application/json: schema: $ref: "#/components/schemas/ApiResponseError" x-codegen-request-body-name: body /client/payments/subscriptions: post: tags: - stripe summary: Create Subscription operationId: createSub requestBody: description: Subscription parameters content: application/json: schema: $ref: "#/components/schemas/SubCreate" required: true responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ApiResponseSubCreate" 400: description: invalid parameters content: application/json: schema: $ref: "#/components/schemas/ApiResponseError" x-codegen-request-body-name: body components: schemas: AuthCredentials: type: object properties: email: type: string password: type: string AuthCreate: type: object properties: email: type: string username: type: string password: type: string firstName: type: string lastName: type: string accountPlan: type: string description: Account Plan enum: - personal - business AuthRead: type: object properties: id: type: string email: type: string username: type: string password: type: string firstName: type: string lastName: type: string accountPlan: type: string description: Account Plan enum: - personal - business ApiResponseError: type: object properties: message: type: string ApiResponseSignup: type: object properties: token: type: string auth: $ref: "#/components/schemas/AuthRead" ApiResponseLogin: type: object properties: token: type: string auth: $ref: "#/components/schemas/AuthRead" SubCreate: type: object properties: subscriptionChoice: type: string description: Subscription type enum: - monthly - annual ApiResponseSubCreate: type: object properties: message: type: string ApiResponsePlaidIntent: type: object properties: setupIntent: type: object properties: id: type: string