API module for Unit Check Payments (print-and-mail outgoing checks).
Not enabled by default — contact Unit to enable for your organization.
Flow
- Create a check payment → status:
New - Unit prints and mails the check → status:
Pending→Clearing→Processed - A
CheckPaymentTransactiondebits the deposit account on processing.
Summary
Functions
Cancel a check payment (only in New or Pending status).
Create an outgoing check payment.
Get a check payment by ID.
Get the back image of a processed check.
Get the front image of a processed check.
List check payments.
Return a processed check payment.
Functions
@spec cancel( String.t(), keyword() ) :: {:ok, Unit.Resource.CheckPayment.t()} | {:error, term()}
Cancel a check payment (only in New or Pending status).
@spec create( map(), keyword() ) :: {:ok, Unit.Resource.CheckPayment.t()} | {:error, term()}
Create an outgoing check payment.
Required params
:account_id:amount— in cents:description:counterparty—%{name:, address:}map (payee)
Optional
:memo— memo line on the check:send_date—Date.t()for scheduled delivery:tags:idempotency_key
@spec get( String.t(), keyword() ) :: {:ok, Unit.Resource.CheckPayment.t()} | {:error, term()}
Get a check payment by ID.
@spec get_back_image( String.t(), keyword() ) :: Unit.Client.response()
Get the back image of a processed check.
@spec get_front_image( String.t(), keyword() ) :: Unit.Client.response()
Get the front image of a processed check.
@spec list(keyword()) :: {:ok, [Unit.Resource.CheckPayment.t()], map()} | {:error, term()}
List check payments.
Filter options
:account_id,:customer_id,:status:since,:until
@spec return(String.t(), String.t(), keyword()) :: {:ok, Unit.Resource.CheckPayment.t()} | {:error, term()}
Return a processed check payment.