Payt psp_mandates API

Operations about psp_mandates

OpenAPI Specification

payt-psp-mandates-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: API Endpoints administrations psp_mandates API
  description: This page allows you to explore the available API endpoints. Select a resource (e.g. debtors) and an endpoint (e.g. /v1/debtors) to inspect an example response and available parameters. An authorization header containing a Bearer token is required, see [Authentication](/authentication/authorization).
  version: 1.0.0
servers:
- url: https://api.paytsoftware.com
  description: Production
- url: https://demo-api.paytsoftware.com
  description: Demo / testing
security:
- bearerAuth: []
tags:
- name: psp_mandates
  description: Operations about psp_mandates
paths:
  /v1/psp_mandates:
    delete:
      summary: Delete PSP mandates
      description: Deactivate PSP mandates and schedule their revocation.
      parameters:
      - in: query
        name: administration_id
        description: Administration identifier
        required: true
        schema:
          type: string
      - in: query
        name: psp_mandate_ids
        description: List of psp_mandate_ids to revoke
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: mandate_identifiers
        description: List of mandate identifiers to revoke
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: mandate_references
        description: List of mandate references to revoke
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: debtor_numbers
        description: List of debtor numbers to revoke
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: PSP mandates deactivated and revoke scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_SuccessEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - psp_mandates
      operationId: deleteV1PspMandates
    post:
      description: Create signed psp mandates, these need to be verified before creating
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postV1PspMandates'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/postV1PspMandates'
        required: true
      responses:
        '200':
          description: Create signed psp mandates, these need to be verified before creating
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_V1_PspMandateEntity'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - psp_mandates
      operationId: postV1PspMandates
      summary: Create signed psp mandates, these need to be verified before creating
    get:
      description: Get administration PSP mandates
      parameters:
      - in: query
        name: administration_id
        description: Administration identifier
        required: true
        schema:
          type: string
      - in: query
        name: ids
        description: Filter PSP mandates with a comma separated list of internal ids
        required: false
        schema:
          type: string
      - in: query
        name: debtor_ids
        description: Filter PSP mandates with a comma separated list of internal debtor ids
        required: false
        schema:
          type: string
      - in: query
        name: debtor_numbers
        description: Filter PSP mandates with a comma separated list of debtor numbers
        required: false
        schema:
          type: string
      - in: query
        name: fields
        description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
        required: false
        schema:
          type: string
      - in: query
        name: updated_after
        description: ISO8601 UTC Timestamp to filter records updated after it
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: cursor
        description: The record identifier after which to start the page
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: How many records will be returned per page, (1..500), defaults to 100
        required: false
        schema:
          type: integer
          format: int32
          minimum: 1
          maximum: 500
          default: 100
      responses:
        '200':
          description: Get administration PSP mandates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_PspMandatePageEntity'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - psp_mandates
      operationId: getV1PspMandates
      summary: Get administration PSP mandates
  /v1/psp_mandates/deleted:
    get:
      description: Get PSP mandates deleted in the last 90 days
      parameters:
      - in: query
        name: administration_id
        description: Administration identifier
        required: true
        schema:
          type: string
      - in: query
        name: deleted_after
        description: ISO8601 UTC Timestamp to filter records deleted after it
        required: true
        schema:
          type: string
          format: date-time
      - in: query
        name: deleted_before
        description: ISO8601 UTC Timestamp to filter records deleted before it
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: cursor
        description: The record identifier after which to start the page
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: How many records will be returned per page, (1..500), defaults to 100
        required: false
        schema:
          type: integer
          format: int32
          minimum: 1
          maximum: 500
          default: 100
      responses:
        '200':
          description: List of deleted PSP mandates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_Deleted_PspMandatesPageEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - psp_mandates
      operationId: getV1PspMandatesDeleted
      summary: Get PSP mandates deleted in the last 90 days
components:
  schemas:
    CustomerApi_PspMandatePageEntity:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerApi_V1_PspMandateEntity'
          description: Psp mandate
        pagination:
          allOf:
          - $ref: '#/components/schemas/CustomerApi_PaginationEntity'
          description: Pagination details
      required:
      - data
      description: CustomerApi_PspMandatePageEntity model
    CustomerApi_ErrorEntity:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      required:
      - code
      - message
      description: CustomerApi_ErrorEntity model
    CustomerApi_SuccessEntity:
      type: object
      properties:
        success:
          type: boolean
          description: Request was handled successfully
        count:
          type: integer
          format: int32
          example: 98
          description: Number of records processed, those without errors
        errors:
          type: object
          example:
            '123456':
            - Validation error 1
            - Validation error 2
            '123461':
            - Validation error
          description: List of records that could not be processed and for which reasons
        warnings:
          type: object
          example:
            '123457':
            - Warning message 1
            - Warning message 2
          description: List of records that were partially processed, the messages contain warnings
      required:
      - success
      - count
      - errors
      description: CustomerApi_SuccessEntity model
    CustomerApi_V1_PspMandateEntity:
      type: object
      properties:
        administration_id:
          type: string
          description: Owning administration identifier
        bank_account_name:
          type: string
          description: Bank account name
        bank_account_number:
          type: string
          description: Bank account number
        debtor_id:
          type: string
          description: Internal debtor identifier
        id:
          type: string
          description: Internal identifier
        mandate_identifier:
          type: string
          description: Identifier from provider
        mandate_reference:
          type: string
          description: Customer-supplied mandate reference
        provider:
          type: string
          description: Provider where mandate is registered
        debtor_number:
          type: string
          description: Debtor number (request with the 'fields' parameter)
        updated_at:
          type: string
          format: date-time
          description: Timestamp at which the psp_mandate was last updated
        deactivated_at:
          type: string
          format: date-time
          description: Timestamp at which the psp_mandate was deactivated
      required:
      - administration_id
      - bank_account_name
      - bank_account_number
      - debtor_id
      - id
      - mandate_identifier
      - provider
      - updated_at
      description: CustomerApi_V1_PspMandateEntity model
    CustomerApi_V1_Deleted_PspMandateEntity:
      type: object
      properties:
        administration_id:
          type: string
          description: Owning administration identifier
        id:
          type: string
          description: Internal identifier
        deleted_at:
          type: string
          format: date-time
          description: Deletion timestamp
        debtor_id:
          type: string
          description: Internal debtor identifier
        mandate_identifier:
          type: string
          description: Identifier from provider
        provider:
          type: string
          description: Provider where mandate is registered
      required:
      - administration_id
      - id
      - deleted_at
      - debtor_id
      - mandate_identifier
      - provider
    CustomerApi_PaginationEntity:
      type: object
      properties:
        cursor:
          type: string
          description: Cursor for fetching the next page
      required:
      - cursor
    CustomerApi_Deleted_PspMandatesPageEntity:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerApi_V1_Deleted_PspMandateEntity'
          description: Deleted PSP mandate
        pagination:
          allOf:
          - $ref: '#/components/schemas/CustomerApi_PaginationEntity'
          description: Pagination details
      required:
      - data
      description: CustomerApi_Deleted_PspMandatesPageEntity model
    postV1PspMandates:
      type: object
      properties:
        administration_id:
          type: string
          description: Administration identifier
        fields:
          type: string
          description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
        psp_mandates:
          type: array
          items:
            type: object
            properties:
              bank_account_name:
                type: string
                description: Bank account name
              bank_account_number:
                type: string
                description: Bank account number
              provider_code:
                type: string
                description: Provider code where mandate is registered
                enum:
                - mollie
                - twikey
              mandate_identifier:
                type: string
                description: Identifier from provider
              debtor_code:
                type: string
                description: External debtor identifier
              debtor_id:
                type: string
                description: Internal debtor identifier
              customer_identifier:
                type: string
                description: Identifier from the psp provider of the customer (for Mollie only)
              mandate_reference:
                type: string
                description: Customer-supplied mandate reference (unique per administration)
            required:
            - bank_account_name
            - bank_account_number
            - provider_code
      required:
      - administration_id
      - psp_mandates
      description: Create signed psp mandates, these need to be verified before creating
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth2 access token or static API token. See [Authorization](/authentication/authorization) for how to obtain one.