Versapay Agreements API

The Agreements API from Versapay — 7 operation(s) for agreements.

Operations 7

POST /api/debit_agreements Create an Agreement
GET /api/debit_agreements/sent View Sent Agreements
GET /api/debit_agreements/received View Received Agreements
POST /api/debit_agreements/{token}/approve Approve an Agreement
POST /api/debit_agreements/{token}/cancel Cancel an Agreement
POST /api/debit_agreements/{token}/reject Reject an Agreement
POST /api/debit_agreements/{token}/revoke Revoke an Agreement #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/versapay-agreements-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

versapay-agreements-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.3.35
  title: Versapay API Reference Agreements API
  contact:
    name: Versapay Support
    url: https://www.versapay.com/support
    email: support@versapay.com
  x-logo:
    url: https://developers.versapay.com/images/logo.png
  termsOfService: https://www.versapay.com/terms-of-use
  license:
    name: Copyright 2022 Versapay. All Rights Reserved.
servers:
- url: https://secure.versapay.com
  description: Production
- url: https://uat.versapay.com
  description: UAT
tags:
- name: Agreements
paths:
  /api/debit_agreements:
    post:
      summary: Create an Agreement
      description: ''
      tags:
      - Agreements
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              properties:
                email:
                  type: string
                  description: Recipient email address.
                  example: bob.smith@example.com
                reference:
                  type: string
                  description: Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc.
                  example: '87769089'
                message:
                  type: string
                  description: A message describing what the agreement is for.
                  example: Debit agreement for order number - 87769089
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
  /api/debit_agreements/sent:
    get:
      summary: View Sent Agreements
      tags:
      - Agreements
      parameters:
      - name: page
        in: query
        description: 50 items are displayed per page.
        schema:
          type: integer
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/debit_agreements/received:
    get:
      summary: View Received Agreements
      tags:
      - Agreements
      parameters:
      - name: page
        in: query
        description: 50 items are displayed per page.
        schema:
          type: integer
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/debit_agreements/{token}/approve:
    post:
      summary: Approve an Agreement
      tags:
      - Agreements
      parameters:
      - in: path
        name: token
        description: The agreement identifier.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fund_token:
                  type: string
                  description: 'Your bank account or balance''s token attribute. Omitting this option will approve the agreement using your default bank account.

                    '
                  example: 5TH3ACC3AU21
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
  /api/debit_agreements/{token}/cancel:
    post:
      summary: Cancel an Agreement
      tags:
      - Agreements
      parameters:
      - in: path
        name: token
        description: The agreement identifier.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/debit_agreements/{token}/reject:
    post:
      summary: Reject an Agreement
      description: 'Reject a *pending* agreement by supplying an agreement''s *token* attribute and providing a *rejection_reason*.

        '
      tags:
      - Agreements
      parameters:
      - in: path
        name: token
        description: The agreement identifier.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agreement'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/debit_agreements/{token}/revoke:
    post:
      summary: Revoke an Agreement
      description: 'Revoke an *approved* agreement for your account by supplying an agreement''s token attribute. The agreement''s creator will no longer be able to debit your account using this agreement.

        '
      operationId: revokeAgreement
      tags:
      - Agreements
      parameters:
      - name: token
        in: path
        required: true
        description: The agreement identifier.
        schema:
          type: string
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agreement'
components:
  responses:
    PreconditionFailed:
      description: Precondition Failed
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Error message
                example: API token does not have permission for this request. Please contact your account administrator.
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Error message
                example: You need to sign in or create an account before continuing.
  schemas:
    Agreement:
      type: object
      properties:
        token:
          type: string
          description: The agreement identifier.
        state:
          type: string
          description: Transaction's current state, see Transaction Lifecycle.
        email:
          type: string
          description: Recipient email address.
        name:
          type: string
          description: Recipient name.
        created_by_user:
          type: string
          description: Name of the user otherwise the API token appears if the transaction was created with the api.
        created_by_account:
          type: string
          description: Account name of the user otherwise the API token appears if the transaction was created with the api.
        reference:
          type: string
          description: An optional reference.
        message:
          type: string
          description: A message describing the agreement.
        rejection_reason:
          type: string
          description: 'Message for the creator of an agreement. Set when state is `rejected`.

            '
        type:
          type: string
          description: 'Type of agreement - `debit_agreement`.

            '
      example:
        token: 3TJWJB36M973
        state: pending
        name: John Doe
        email: user@example.com
        reference: Ad 123
        message: Thank you for your business
        type: debit_agreement
        created_by_user: Uf6TaxzBMBBT_rXjsrN7
        created_by_account: Central Media News
x-tagGroups:
- name: Versapay API
  description: Introduction to the Versapay API.
  tags:
  - Overview
  - Versioning & Compatibility
  - Environments
  - Rate Limits
  - Authentication
  - Webhooks
  - Watermark & Limit
- name: Collaborative AR
  description: Operations available for Collaborative AR integration.
  tags:
  - Reference Data
  - Onboarding
  - Ecommerce Integration
  - Orders
  - Order Transactions
  - Testing Order Transactions
  - Gift Cards
  - Card Present EMV
  - Settlement Reporting
  - Wallets
  - Customers
  - Invoices
  - Autopay
  - Invoicing Payments
  - Divisions
  - Notifications
  - Collaboration
  - File Imports