Digitail Charges API

The Charges API from Digitail — 1 operation(s) for charges.

Operations 2

POST /api/v1/sales/{id}/charges Update a Charge #
POST /api/v1/charges Create a Charge #

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/digitail:digitail-charges-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

digitail-charges-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Digitail Charges API
  description: Digitail API
  contact:
    email: developer@digitail.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
- url: https://developer.digitail.io
  description: Sandbox server (uses test data)
- url: https://vet.digitail.io
  description: Production server (uses live data)
security:
- passport: []
- Bearer: []
tags:
- name: Charges
paths:
  /api/v1/sales/{id}/charges:
    post:
      tags:
      - Charges
      summary: Update a Charge
      description: 'Permissions needed: any of (CREATE_CHECKUPS, VIEW_COUNTER_SALE)

        Updates charge and returns it.'
      parameters:
      - $ref: '#/paths/~1api~1v1~1sales/delete/parameters/0'
      - name: include
        in: query
        description: 'Additional info to include:  mainSale,mainPayment,payments,chargeReceipt'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                  format: float
                  example: 100
                type:
                  type: integer
                  enum:
                  - 1
                  - 2
                  - 3
                  - 6
                  - 7
                  description: '`1` - Cash `2` - Card `3` - Order `6` - Check `7` - Other

                    '
                  example: 2
                card_brand:
                  $ref: '#/paths/~1api~1v1~1charges/post/requestBody/content/application~1json/schema/properties/card_brand'
                date:
                  type: string
                  format: date-time
                  example: '2020-01-01T00:00:00Z'
                notes:
                  type:
                  - string
                  - 'null'
                  example: null
                create_receipt:
                  type:
                  - boolean
                  - 'null'
                  example: false
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/paths/~1api~1v1~1charges/post/responses/201/content/application~1json/schema/properties/data'
        '400':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/400'
        '401':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/401'
        '403':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/403'
        '422':
          description: Bad request
          content:
            application/json:
              schema:
                example:
                  message: The given data was invalid.
                  errors:
                    card_brand:
                    - The card brand field can only be provided on Payments with Cards
        '429':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/429'
      operationId: postApiV1SalesByIdCharges
      x-operation-id-source: derived
  /api/v1/charges:
    post:
      tags:
      - Charges
      summary: Create a Charge
      description: 'Permissions needed: any of (CREATE_CHECKUPS, VIEW_COUNTER_SALE)

        Creates a new charge for a specific pet parent and clinic and returns it.

        `surcharge` is accepted only for DSP integrated saved card payments (when `provider_data.payment_method_id` is provided).'
      parameters:
      - name: include
        in: query
        description: 'Additional info to include:  mainSale,mainPayment,payments,chargeReceipt'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                clinic_id:
                  description: Clinic is on which pet parent is client on.
                  type: integer
                  example: 1234
                client_id:
                  description: Pet parent id
                  type: integer
                  example: 234
                sale_id:
                  description: Id of sale to associate the charge to, if <i>as_credit</i> is <i>false</i> the sale will be paid first if there are multiple due sales and <i>amount</i> is greater than sale amount due
                  type: integer
                  example: 234
                amount:
                  type: number
                  format: float
                  example: 100
                type:
                  type: integer
                  enum:
                  - 1
                  - 2
                  - 3
                  - 4
                  - 6
                  - 7
                  description: '`1` - Cash `2` - Card `3` - Order `6` - Check `7` - Other

                    '
                  example: 2
                card_brand:
                  type:
                  - string
                  - 'null'
                  enum:
                  - master_card
                  - visa
                  - american_express
                  - discover
                  - other
                  example: master_card
                provider_data:
                  type:
                  - object
                  - 'null'
                  title: Payment provider data
                  description: Required for DSP integrated saved card payments.
                  properties:
                    payment_method_id:
                      type: string
                      description: The saved card payment method id to use for this charge.
                      example: pm_123
                date:
                  type: string
                  format: date-time
                  example: '2020-01-01T00:00:00Z'
                notes:
                  description: Payment note
                  type:
                  - string
                  - 'null'
                  example: null
                create_receipt:
                  type:
                  - boolean
                  - 'null'
                  example: false
                as_credit:
                  description: If true charge is not applied to due sales and is kept as client credit
                  type: boolean
                  example: false
                surcharge:
                  description: Surcharge amount to be added to the charge total. Can be sent only for DSP integrated saved card payments (`provider_data.payment_method_id`).
                  type: number
                  format: float
                  example: 0.35
                  exclusiveMinimum: 0
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    title: Charge
                    description: A charge is the act of the customer paying the clinic. A charge can later on be allocated to different sales through payments. If no sale is outstanding, the charge will be left as a credit in the customer's account.
                    properties:
                      id:
                        type: integer
                        example: 0
                      amount:
                        type: string
                        example: '100.00'
                      amount_refunded:
                        type: string
                        example: '0.00'
                      amount_left:
                        description: Amount left to refund
                        type: string
                        format: float
                        example: 0
                      made_at:
                        type: string
                        format: date-time
                        example: '2023-12-14T11:32:44.000000Z'
                      type:
                        type: integer
                        enum:
                        - 1
                        - 2
                        - 3
                        - 4
                        - 5
                        - 6
                        - 7
                        - 8
                        - 9
                        - 10
                        - 11
                        description: '`1` - Cash `2` - Card `3` - Order `4` - Overdraft `5` - Online `6` - Check `7` - Other `8` - Client Credit `9` - Care Credit `10` - Pet Transfer Acquitted `11` - Credit Note

                          '
                        example: 2
                      card_brand:
                        $ref: '#/paths/~1api~1v1~1charges/post/requestBody/content/application~1json/schema/properties/card_brand'
                      main_sale_id:
                        description: Sale id charge is associated to
                        type:
                        - integer
                        - 'null'
                        example: 1
                      main_sale:
                        type: object
                      main_payment_id:
                        type:
                        - integer
                        - 'null'
                        example: 1
                      main_payment:
                        type:
                        - object
                        - 'null'
                      has_single_payment:
                        type: boolean
                        example: false
                      has_multiple_payment:
                        type: boolean
                        example: true
                      payments:
                        type: array
                        items:
                          $ref: '#/paths/~1api~1v1~1sales~1%7Bid%7D~1pay-with-credit/post/responses/200/content/application~1json/schema/properties/data'
                      paid_sales:
                        type: array
                        items:
                          $ref: '#/paths/~1api~1v1~1sales/post/responses/200/content/application~1json/schema/properties/data'
                      charge_receipt:
                        type: object
        '400':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/400'
        '401':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/401'
        '403':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/403'
        '422':
          description: Bad request
          content:
            application/json:
              schema:
                example:
                  message: The given data was invalid.
                  errors:
                    card_brand:
                    - The card brand field can only be provided on Payments with Cards
                    surcharge:
                    - The surcharge field can only be provided for DSP integrated saved card payments.
        '429':
          $ref: '#/paths/~1api~1v1~1pets/get/responses/429'
      operationId: postApiV1Charges
      x-operation-id-source: derived
components:
  securitySchemes:
    passport:
      type: oauth2
      description: Laravel passport oauth2 security.
      flows:
        authorizationCode:
          authorizationUrl: https://developer.digitail.io/oauth/authorize
          tokenUrl: https://developer.digitail.io/oauth/token
          refreshUrl: https://developer.digitail.io/oauth/token
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-provenance:
  method: harvested
  publisher: Digitail
  source: https://developer.digitail.io/api-docs
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)