---
title: "Create a Charge"
method: POST
path: "/api/v1/charges"
tags: ["Charges"]
---

# Create a Charge

`POST /api/v1/charges`

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).

## Request body

- object
  - `clinic_id` integer — Clinic is on which pet parent is client on.
  - `client_id` integer — Pet parent id
  - `sale_id` integer — 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
  - `amount` number, float
  - `type` 1 | 2 | 3 | 4 | 6 | 7 — `1` - Cash `2` - Card `3` - Order `6` - Check `7` - Other
  - `card_brand` 'master_card' | 'visa' | 'american_express' | 'discover' | 'other', nullable
  - `provider_data` object, nullable — Required for DSP integrated saved card payments.
    - `payment_method_id` string — The saved card payment method id to use for this charge.
  - `date` string, date-time
  - `notes` string, nullable — Payment note
  - `create_receipt` boolean, nullable
  - `as_credit` boolean — If true charge is not applied to due sales and is kept as client credit
  - `surcharge` number, float — Surcharge amount to be added to the charge total. Can be sent only for DSP integrated saved card payments (`provider_data.payment_method_id`).

## Response `201`

Created

- object
  - `data` object — 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.
    - `id` integer
    - `amount` string
    - `amount_refunded` string
    - `amount_left` string, float — Amount left to refund
    - `made_at` string, date-time
    - `type` 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 — `1` - Cash `2` - Card `3` - Order `5` - Online `6` - Check `7` - Other `9` - Care Credit
    - `card_brand` CardBrand — unresolved $ref
    - `main_sale_id` integer, nullable — Sale id charge is associated to
    - `main_sale` object
    - `main_payment_id` integer, nullable
    - `main_payment` object, nullable
    - `has_single_payment` boolean
    - `has_multiple_payment` boolean
    - `payments` Data[] — unresolved $ref
    - `paid_sales` Data[] — unresolved $ref
    - `charge_receipt` object

## Other responses

- `400` — unresolved $ref
- `401` — unresolved $ref
- `403` — unresolved $ref
- `422` — Bad request
- `429` — unresolved $ref

---

[API](https://skmtc.net/digitail/apis/digitail-api.md) · [All operations](https://skmtc.net/digitail/apis/digitail-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitail/digitail-api/revisions/bd9694db5fce/schema)
