vivenu payment-plans API

The payment-plans API from vivenu — 8 operation(s) for payment-plans.

OpenAPI Specification

vivenu-payment-plans-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: vivenu access-lists payment-plans API
  description: vivenu API Documentation
  version: 1.0.0
  contact:
    name: vivenu GmbH
    url: https://vivenu.com
servers:
- url: https://vivenu.com
  description: Production API
- url: https://vivenu.dev
  description: Staging API
tags:
- name: payment-plans
paths:
  /api/payments/plans:
    get:
      security:
      - jwt: []
      - apikey: []
      parameters:
      - name: skip
        required: false
        schema:
          type: number
          format: float
          metas: {}
        in: query
        style: form
        explode: true
      - name: top
        required: false
        schema:
          type: number
          format: float
          default: 25
          metas: {}
        in: query
        style: form
        explode: true
      - name: customerId
        required: false
        schema:
          type: string
          metas: {}
        in: query
        style: form
        explode: true
      - name: customerPaymentMethodId
        required: false
        schema:
          type: string
          metas: {}
        in: query
        style: form
        explode: true
      - name: status
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - DRAFT
            - ACTIVE
            - INCOMPLETE
            - CANCELED
            - COMPLETED
            metas: {}
          metas: {}
        in: query
        style: form
        explode: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GET_Payment-plans_ListPaymentPlans_200_response'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
      - payment-plans
      description: List Payment Plans
      operationId: list_payment_plans
  /api/payments/plans/{id}:
    get:
      security:
      - jwt: []
      - apikey: []
      parameters:
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GET_Payment-plans_GetAPaymentPlan_200_response'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - payment-plans
      description: Get a Payment Plan
      operationId: get_a_payment_plan
    put:
      security:
      - jwt: []
      - apikey: []
      parameters:
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PUT_Payment-plans_UpdateAPaymentPlan_200_response'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PUT_Payment-plans_UpdateAPaymentPlan'
      tags:
      - payment-plans
      description: Update a Payment Plan
      operationId: update_a_payment_plan
  /api/public/payments/plans/{id}:
    get:
      parameters:
      - name: secret
        required: true
        schema:
          type: string
          metas: {}
        in: query
        style: form
        explode: true
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GET_Payment-plans_GetAPublicPaymentPlan_200_response'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      tags:
      - payment-plans
      description: Get a Public Payment Plan
      operationId: get_a_public_payment_plan
    put:
      parameters:
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PUT_Payment-plans_UpdateAPublicPaymentPlan_200_response'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PUT_Payment-plans_UpdateAPublicPaymentPlan'
      tags:
      - payment-plans
      description: Update a Public Payment Plan
      operationId: update_a_public_payment_plan
  /api/public/transactions/{id}/payment-plan:
    get:
      parameters:
      - name: secret
        required: true
        schema:
          type: string
          metas: {}
        in: query
        style: form
        explode: true
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GET_Payment-plans_GetAPaymentPlansPublicInformationBasedOnTheTransaction_200_response'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      tags:
      - payment-plans
      description: Get a payment plan's public information based on the transaction
      operationId: get_a_payment_plans_public_information_based_on_the_transaction
  /api/payments/plans/{id}/complete:
    post:
      security:
      - jwt: []
      - apikey: []
      parameters:
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_Payment-plans_CompleteAPaymentPlan_200_response'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - payment-plans
      description: Complete a Payment Plan
      operationId: complete_a_payment_plan
  /api/public/payments/plans/{id}/complete:
    post:
      parameters:
      - name: id
        required: true
        schema:
          type: string
          metas: {}
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_Payment-plans_CompleteAPublicPaymentPlan_200_response'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/POST_Payment-plans_CompleteAPublicPaymentPlan'
      tags:
      - payment-plans
      description: Complete a Public Payment Plan
      operationId: complete_a_public_payment_plan
  /api/payments/plans/{paymentPlanId}/schedules/{scheduleId}/retry:
    post:
      security:
      - jwt: []
      - apikey: []
      parameters:
      - name: paymentPlanId
        schema:
          type: string
          description: The ID of the payment plan
        description: The ID of the payment plan
        in: path
        required: true
      - name: scheduleId
        schema:
          type: string
          description: The ID of the payment plan schedule
        description: The ID of the payment plan schedule
        in: path
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_Payment-plans_RetryAPaymentPlanSchedule_200_response'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      tags:
      - payment-plans
      description: Retry a Payment Plan Schedule
      operationId: retry_a_payment_plan_schedule
  /api/public/payments/plans/{paymentPlanId}/schedules/{scheduleId}/retry:
    post:
      parameters:
      - name: paymentPlanId
        schema:
          type: string
          description: The ID of the payment plan
        description: The ID of the payment plan
        in: path
        required: true
      - name: scheduleId
        schema:
          type: string
          description: The ID of the payment plan schedule
        description: The ID of the payment plan schedule
        in: path
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST_Payment-plans_RetryAPublicPaymentPlanSchedule_200_response'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                secret:
                  type: string
                  description: The secret of the payment plan
              required:
              - secret
              additionalProperties: false
      tags:
      - payment-plans
      description: Retry a Public Payment Plan Schedule
      operationId: retry_a_public_payment_plan_schedule
components:
  schemas:
    PUT_Payment-plans_UpdateAPaymentPlan:
      type: object
      properties:
        status:
          type: string
          enum:
          - DRAFT
          - ACTIVE
          - INCOMPLETE
          - CANCELED
          - COMPLETED
          description: The status of the payment plan
        customerPaymentMethodId:
          type: string
          description: The ID of the customer payment method
    GET_Payment-plans_ListPaymentPlans_200_response:
      type: object
      properties:
        docs:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
                description: The ID of the payment plan
              sellerId:
                type: string
                description: The ID of the seller
              status:
                type: string
                enum:
                - DRAFT
                - ACTIVE
                - INCOMPLETE
                - CANCELED
                - COMPLETED
                description: The status of the payment plan
              customerId:
                type: string
                description: The ID of the customer
              currency:
                type: string
                enum:
                - EUR
                - USD
                - GBP
                - AUD
                - CHF
                - THB
                - ILS
                - COP
                - MXN
                - DKK
                - NOK
                - SEK
                - QAR
                - CAD
                - ISK
                - GTQ
                - INR
                - DOP
                - SGD
                - PLN
                - SAR
                - TTD
                - ZAR
                - KYD
                - HKD
                - CZK
                - KRW
                - JPY
                - NZD
                - AED
                - MAD
                - TWD
                - BRL
                - BWP
                - NAD
                - KES
                - SCR
                - TRY
                - SZL
                - LSL
                - TZS
                - UGX
                - ZMW
                - ZWG
                - GHS
                - NGN
                - SLE
                - LRD
                - XOF
                - XAF
                - GEL
                - IDR
                - ARS
                - CRC
                - HUF
                - EGP
                - MYR
                - VND
                - PHP
                description: The currency of the payment plan
              customerPaymentMethodId:
                type: string
                description: The ID of the customer payment method
              paymentStrategyId:
                type: string
                description: The ID of the payment strategy
              paymentOptionId:
                type: string
                description: The ID of the payment option
              history:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - paymentPlan.created
                      - paymentPlan.status_changed
                      - paymentPlan.cycle_applied
                      - paymentPlan.payment_method_changed
                      - paymentPlan.item_changed
                      - paymentPlan.down_payment_charged
                      - paymentPlan.down_payment_failed
                      - paymentPlan.canceled
                      - paymentPlan.payoff_charged
                      - paymentPlan.payoff_failed
                      - paymentPlan.schedule_retried
                      - paymentPlan.schedule_retry_failed
                      - paymentPlan.dispute_created
                      - paymentPlan.dispute_countered
                      - paymentPlan.dispute_won
                      - paymentPlan.chargeback_created
                      description: The type of the history entry
                    date:
                      type: string
                      format: date-time
                      description: The date of the history entry
                    data:
                      type: object
                      description: The data of the history entry
                    userId:
                      type: string
                      description: The ID of the user who made the history entry
                  required:
                  - type
                  - date
                description: The history of the payment plan
              schedules:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      description: The ID of the payment schedule
                    due:
                      type: string
                      format: date-time
                      description: The date when the payment is due
                    status:
                      type: string
                      enum:
                      - SCHEDULED
                      - PENDING
                      - SUCCEEDED
                      - FAILED
                      - REFUNDED
                      description: The status of the payment schedule
                    total:
                      type: number
                      format: float
                      description: The total amount of the payment schedule
                    paymentRequestId:
                      type: string
                      description: The ID of the payment request
                    paymentId:
                      type: string
                      description: The ID of the payment
                    attempts:
                      type: array
                      items:
                        type: object
                        properties:
                          _id:
                            type: string
                            description: The ID of the payment schedule attempt
                          date:
                            type: string
                            format: date-time
                            description: The date of the payment schedule attempt
                          status:
                            type: string
                            enum:
                            - SCHEDULED
                            - PENDING
                            - SUCCEEDED
                            - FAILED
                            - REFUNDED
                            description: The status of the payment schedule attempt
                          paymentRequestId:
                            type: string
                            description: The Payment Request ID of the payment schedule attempt
                          paymentMethodId:
                            type: string
                            description: The Payment Method ID of the payment schedule attempt
                        required:
                        - _id
                        - date
                        - status
                        - paymentRequestId
                        - paymentMethodId
                      description: The payment schedule attempts
                    nextAttempt:
                      type: string
                      format: date-time
                      description: The date of the next payment schedule attempt
                  required:
                  - _id
                  - due
                  - status
                  - total
                  - paymentRequestId
                description: The schedules of the payment plan
              checkoutId:
                type: string
                description: The ID of the checkout
              salesChannelId:
                type: string
                description: The ID of the sales channel
              secret:
                type: string
                description: The secret of the payment plan
              canceledAt:
                type: string
                format: date-time
                description: The date when the payment plan was canceled
              createdAt:
                type: string
                format: date-time
                description: The date when the payment plan was created
              updatedAt:
                type: string
                format: date-time
                description: The date when the payment plan was updated
            required:
            - _id
            - sellerId
            - status
            - customerId
            - currency
            - customerPaymentMethodId
            - paymentStrategyId
            - paymentOptionId
            - schedules
            - checkoutId
            - salesChannelId
            - secret
            - createdAt
            - updatedAt
        total:
          type: integer
    PUT_Payment-plans_UpdateAPaymentPlan_200_response:
      type: object
      properties:
        _id:
          type: string
          description: The ID of the payment plan
        sellerId:
          type: string
          description: The ID of the seller
        status:
          type: string
          enum:
          - DRAFT
          - ACTIVE
          - INCOMPLETE
          - CANCELED
          - COMPLETED
          description: The status of the payment plan
        customerId:
          type: string
          description: The ID of the customer
        currency:
          type: string
          enum:
          - EUR
          - USD
          - GBP
          - AUD
          - CHF
          - THB
          - ILS
          - COP
          - MXN
          - DKK
          - NOK
          - SEK
          - QAR
          - CAD
          - ISK
          - GTQ
          - INR
          - DOP
          - SGD
          - PLN
          - SAR
          - TTD
          - ZAR
          - KYD
          - HKD
          - CZK
          - KRW
          - JPY
          - NZD
          - AED
          - MAD
          - TWD
          - BRL
          - BWP
          - NAD
          - KES
          - SCR
          - TRY
          - SZL
          - LSL
          - TZS
          - UGX
          - ZMW
          - ZWG
          - GHS
          - NGN
          - SLE
          - LRD
          - XOF
          - XAF
          - GEL
          - IDR
          - ARS
          - CRC
          - HUF
          - EGP
          - MYR
          - VND
          - PHP
          description: The currency of the payment plan
        customerPaymentMethodId:
          type: string
          description: The ID of the customer payment method
        paymentStrategyId:
          type: string
          description: The ID of the payment strategy
        paymentOptionId:
          type: string
          description: The ID of the payment option
        history:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                - paymentPlan.created
                - paymentPlan.status_changed
                - paymentPlan.cycle_applied
                - paymentPlan.payment_method_changed
                - paymentPlan.item_changed
                - paymentPlan.down_payment_charged
                - paymentPlan.down_payment_failed
                - paymentPlan.canceled
                - paymentPlan.payoff_charged
                - paymentPlan.payoff_failed
                - paymentPlan.schedule_retried
                - paymentPlan.schedule_retry_failed
                - paymentPlan.dispute_created
                - paymentPlan.dispute_countered
                - paymentPlan.dispute_won
                - paymentPlan.chargeback_created
                description: The type of the history entry
              date:
                type: string
                format: date-time
                description: The date of the history entry
              data:
                type: object
                description: The data of the history entry
              userId:
                type: string
                description: The ID of the user who made the history entry
            required:
            - type
            - date
          description: The history of the payment plan
        schedules:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
                description: The ID of the payment schedule
              due:
                type: string
                format: date-time
                description: The date when the payment is due
              status:
                type: string
                enum:
                - SCHEDULED
                - PENDING
                - SUCCEEDED
                - FAILED
                - REFUNDED
                description: The status of the payment schedule
              total:
                type: number
                format: float
                description: The total amount of the payment schedule
              paymentRequestId:
                type: string
                description: The ID of the payment request
              paymentId:
                type: string
                description: The ID of the payment
              attempts:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      description: The ID of the payment schedule attempt
                    date:
                      type: string
                      format: date-time
                      description: The date of the payment schedule attempt
                    status:
                      type: string
                      enum:
                      - SCHEDULED
                      - PENDING
                      - SUCCEEDED
                      - FAILED
                      - REFUNDED
                      description: The status of the payment schedule attempt
                    paymentRequestId:
                      type: string
                      description: The Payment Request ID of the payment schedule attempt
                    paymentMethodId:
                      type: string
                      description: The Payment Method ID of the payment schedule attempt
                  required:
                  - _id
                  - date
                  - status
                  - paymentRequestId
                  - paymentMethodId
                description: The payment schedule attempts
              nextAttempt:
                type: string
                format: date-time
                description: The date of the next payment schedule attempt
            required:
            - _id
            - due
            - status
            - total
            - paymentRequestId
          description: The schedules of the payment plan
        checkoutId:
          type: string
          description: The ID of the checkout
        salesChannelId:
          type: string
          description: The ID of the sales channel
        secret:
          type: string
          description: The secret of the payment plan
        canceledAt:
          type: string
          format: date-time
          description: The date when the payment plan was canceled
        createdAt:
          type: string
          format: date-time
          description: The date when the payment plan was created
        updatedAt:
          type: string
          format: date-time
          description: The date when the payment plan was updated
      required:
      - _id
      - sellerId
      - status
      - customerId
      - currency
      - customerPaymentMethodId
      - paymentStrategyId
      - paymentOptionId
      - schedules
      - checkoutId
      - salesChannelId
      - secret
      - createdAt
      - updatedAt
    GET_Payment-plans_GetAPublicPaymentPlan_200_response:
      type: object
      properties:
        _id:
          type: string
          description: The ID of the payment plan
        schedules:
          type: array
          items:
            type: object
            properties:
              due:
                type: string
                format: date-time
                description: The date when the payment is due
              status:
                type: string
                enum:
                - SCHEDULED
                - PENDING
                - SUCCEEDED
                - FAILED
                - REFUNDED
                description: The status of the payment schedule
              total:
                type: number
                format: float
                description: The total amount of the payment schedule
              attempts:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      description: The ID of the payment schedule attempt
                    date:
                      type: string
                      format: date-time
                      description: The date of the payment schedule attempt
                    status:
                      type: string
                      enum:
                      - SCHEDULED
                      - PENDING
                      - SUCCEEDED
                      - FAILED
                      - REFUNDED
                      description: The status of the payment schedule attempt
                    paymentRequestId:
                      type: string
                      description: The Payment Request ID of the payment schedule attempt
                    paymentMethodId:
                      type: string
                      description: The Payment Method ID of the payment schedule attempt
                  required:
                  - _id
                  - date
                  - status
                  - paymentRequestId
                  - paymentMethodId
                description: The payment schedule attempts
              nextAttempt:
                type: string
                format: date-time
                description: The date of the next payment schedule attempt
            required:
            - due
            - status
            - total
          description: Public information about the schedules of the payment plan
        secret:
          type: string
          description: The secret of the payment plan
        status:
          type: string
          enum:
          - DRAFT
          - ACTIVE
          - INCOMPLETE
          - CANCELED
          - COMPLETED
          description: The status of the payment plan
        currency:
          type: string
          enum:
          - EUR
          - USD
          - GBP
          - AUD
          - CHF
          - THB
          - ILS
          - COP
          - MXN
          - DKK
          - NOK
          - SEK
          - QAR
          - CAD
          - ISK
          - GTQ
          - INR
          - DOP
          - SGD
          - PLN
          - SAR
          - TTD
          - ZAR
          - KYD
          - HKD
          - CZK
          - KRW
          - JPY
          - NZD
          - AED
          - MAD
          - TWD
          - BRL
          - BWP
          - NAD
          - KES
          - SCR
          - TRY
          - SZL
          - LSL
          - TZS
          - UGX
          - ZMW
          - ZWG
          - GHS
          - NGN
          - SLE
          - LRD
          - XOF
          - XAF
          - GEL
          - IDR
          - ARS
          - CRC
          - HUF
          - EGP
          - MYR
          - VND
          - PHP
          description: The currency of the payment plan
        customerPaymentMethodId:
          type: string
          description: The ID of the customer payment method
        paymentStrategyId:
          type: string
          description: The ID of the payment strategy
        paymentOptionId:
          type: string
          description: The ID of the payment option
        checkoutId:
          type: string
          description: The ID of the checkout
        subscriptionId:
          type: string
          description: The ID of the subscription
        sellerId:
          type: string
          description: The ID of the seller
      required:
      - _id
      - schedules
      - secret
      - status
      - currency
      - customerPaymentMethodId
      - paymentStrategyId
      - paymentOptionId
      - sellerId
    POST_Payment-plans_CompleteAPublicPaymentPlan_200_response:
      type: object
      properties:
        _id:
          type: string
          description: The ID of the payment plan
        schedules:
          type: array
          items:
            type: object
            properties:
              due:
                type: string
                format: date-time
                description: The date when the payment is due
              status:
                type: string
                enum:
                - SCHEDULED
                - PENDING
                - SUCCEEDED
                - FAILED
                - REFUNDED
                description: The status of the payment schedule
              total:
                type: number
                format: float
                description: The total amount of the payment schedule
              attempts:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      description: The ID of the payment schedule attempt
                    date:
                      type: string
                      format: date-time
                      description: The date of the payment schedule attempt
                    status:
                      type: string
                      enum:
                      - SCHEDULED
                      - PENDING
                      - SUCCEEDED
                      - FAILED
                      - REFUNDED
                      description: The status of the payment schedule attempt
                    paymentRequestId:
                      type: string
                      description: The Payment Request ID of the payment schedule attempt
                    paymentMethodId:
        

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vivenu/refs/heads/main/openapi/vivenu-payment-plans-api-openapi.yml