---
title: "Pay Sale with client credit"
method: POST
path: "/api/v1/sales/{id}/pay-with-credit"
tags: ["Sales"]
---

# Pay Sale with client credit

`POST /api/v1/sales/{id}/pay-with-credit`

Permissions needed: any of (CREATE_CHECKUPS, VIEW_COUNTER_SALE)
If amount sent is greater than sale amount due, after the sale is paid, difference between amount sent and sale amount due is used to pay outstanding balance sales.

## Parameters

- `#/paths/~1api~1v1~1sales/delete/parameters/0` — unresolved $ref

## Request body

- object
  - `amount` number, double
  - `type` integer — Payment from client credit has type 8
  - `date` string, date-time — Payment date.
  - `notes` string — Payment notes - if not sent then the notes from the charge will be used

## Response `200`

Successful operation - return sale's payments

- object
  - `data` object — A payment is the act of allocating a charge to a sale. A payment can be made in full or partially.
    - `id` integer
    - `amount` number, double
    - `amount_refunded` number, double
    - `amount_left` number, double
    - `made_at` string, date-time
    - `notes` string, nullable
    - `sale_id` integer
    - `sale` Data — unresolved $ref
    - `charge_id` integer
    - `charge` Data — unresolved $ref

## Other responses

- `400` — unresolved $ref
- `401` — unresolved $ref
- `403` — unresolved $ref
- `422` — unresolved $ref
- `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)
