---
title: "Record a payment"
method: POST
path: "/payments"
tags: ["Payments"]
---

# Record a payment

`POST /payments`

**Plan: Pro.**

## Request body

- PaymentWrite
  - `payment` object, required
    - `payment_method_id` string, uuid
    - `amount_in_dollars` number
    - `paid_on` string, date
    - `company_id` string, uuid
    - `check_number` string
    - `posted` boolean
    - `info` string
    - `note` string
    - `cc_name` string
    - `cc_type` string
    - `cc_auth_code` string
    - `cc_number` string
    - `amount_in_cents` integer — 4-decimal fixed point (dollars * 10000).
    - `balance_in_cents` integer — 4-decimal fixed point (dollars * 10000).
    - `applied_payments_in_cents` integer — 4-decimal fixed point (dollars * 10000).
    - `accounting_sync_state` string
    - `void_reason` string
    - `void_date` string, date
    - `credit_card_payment` object — Card details when paying by credit card.
      - `card_type` string
      - `first_name` string
      - `last_name` string
      - `card_number` string
      - `expiry_date` string
      - `street` string
      - `street1` string
      - `city` string
      - `state` string
      - `country` string
      - `zip` string
      - `cvs` string
      - `verification_token` string
      - `shopvox_pay_payment_token` string
    - `ach_payment` object — Bank details when paying by ACH.
      - `account_holder_name` string
      - `verification_token` string
    - `invoice_payments` object[] — Allocate the payment to invoices.
      - `invoice_id` string, uuid
      - `amount_in_dollars` number
      - `selected` boolean
    - `order_payments` object[] — Allocate the payment to sales orders.
      - `work_order_id` string, uuid
      - `amount_in_dollars` number
      - `selected` boolean

## Response `200`

Created.

- Payment
  - `id` string, uuid
  - `checkNumber` string, nullable
  - `ccName` string, nullable
  - `ccType` string, nullable
  - `ccAuthCode` string, nullable
  - `ccNumber` string, nullable — Masked.
  - `amountInDollars` number, nullable — US dollars.
  - `accountingSyncState` string, nullable
  - `balanceInCents` integer, nullable — dollars * 10000.
  - `appliedPaymentsInCents` integer, nullable — dollars * 10000.
  - `amountInCents` integer, nullable — dollars * 10000.
  - `posted` boolean
  - `info` string, nullable
  - `company` object
    - `id` string, uuid
    - `name` string
    - `phoneWithExt` string, nullable
    - `specialNotes` string, nullable
  - `paymentMethod` NamedRef — Lightweight reference to a related record.
    - `id` string, uuid
    - `name` string
  - `invoices` object[]
    - `id` string, uuid
    - `txnNumber` string
    - `amountInDollars` number, nullable
    - `paymentId` string, uuid
    - `totalPaymentsInCents` integer, nullable
    - `balanceInCents` integer, nullable
  - `workOrders` object[]
    - `id` string, uuid
    - `amountInDollars` number, nullable
    - `paymentId` string, uuid
    - `totalPaymentsInCents` integer, nullable
    - `balanceInCents` integer, nullable
  - `createdById` string, uuid, nullable
  - `createdBy` NamedRef — Lightweight reference to a related record.
    - `id` string, uuid
    - `name` string
  - `updatedById` string, uuid, nullable
  - `updatedBy` NamedRef — Lightweight reference to a related record.
    - `id` string, uuid
    - `name` string

## Other responses

- `422` — Unprocessable entity - field errors keyed by attribute.

---

[API](https://skmtc.net/shopvox/apis/shopvox-public-api.md) · [All operations](https://skmtc.net/shopvox/apis/shopvox-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shopvox/shopvox-public-api/versions/7ac1ff5d444a/schema)
