---
title: "Calculate payment timing"
method: POST
path: "/paymentTiming"
tags: ["calculate"]
---

# Calculate payment timing

`POST /paymentTiming`

## Request

- Base URL: `https://api.mercoa.com`
- URL: `https://api.mercoa.com/paymentTiming`
- Auth: HTTP bearer

Calculate the estimated payment timing given the deduction date, payment source, and disbursement method. Can be used to calculate timing for a payment.

## Request body

- union
  - CalculateEstimatedTiming
    - `estimatedDeductionDate` string, date-time: Date the payment is scheduled to be deducted from the payer's account. Use this field if the payment has not yet been deducted.
    - `processedAt` string, date-time: Date the payment was processed. Use this field if the payment has already been deducted.
    - `paymentSourceId` string, required
    - `paymentDestinationId` string, required
    - `paymentDestinationOptions` union
      - object
        - `type` 'check', required: Discriminator value: check
        - `delivery` 'PRINT' | 'MAIL' | 'MAIL_PRIORITY' | 'MAIL_UPS_NEXT_DAY'
        - `printDescription` boolean: If true, prints the invoice description (noteToSelf) on the check note. Defaults to false.
      - object
        - `type` 'bankAccount', required: Discriminator value: bankAccount
        - `delivery` 'ACH_STANDARD' | 'ACH_SAME_DAY' | 'ACH_ACCELERATED'
        - `description` string: ACH Statement Description. By default, this will be 'AP' followed by the first 8 characters of the invoice ID (for a single invoice) or the first 8 characters of the transaction ID (for a batch payment). Must be at least 4 characters and no more than 10 characters, and follow this regex pattern `^[a-zA-Z0-9\-#.$&* ]{4,10}$`
      - object
        - `type` 'utility', required: Discriminator value: utility
        - `accountId` string, required: The ID for the utility account to pay with. Links to accounts listed on payor/payee relationship.
      - object
        - `type` 'custom', required: Discriminator value: custom
        - `dynamicUrls` object: Map of field names to dynamic URL values that will be used for dynamicUrl fields in custom payment method schemas
  - CalculateInvoiceTiming
    - `invoiceId` string, required

## Response `200`

Response with status 200

- CalculateCalculatePaymentTimingResponse
  - `estimatedProcessingDate` string, date-time, required: Estimated date the payment will be or was processed.
  - `businessDays` integer, required: Number of business days between the estimated processing date and the estimated settlement date. This does not take into account bank holidays or weekends.
  - `estimatedProcessingTime` integer, required: Estimated payment time in days. This time takes into account bank holidays and weekends.
  - `estimatedSettlementDate` string, date-time, required: Estimated date the payment will be or was settled. This is the same as the request's deductionDate plus the paymentTiming.

## Other responses

- `400`: Error response with status 400
- `401`: Error response with status 401
- `403`: Error response with status 403
- `404`: Error response with status 404
- `409`: Error response with status 409
- `500`: Error response with status 500
- `501`: Error response with status 501

---

[API](https://skmtc.dev/mercoa/apis/mercoa-2.md) - [All operations](https://skmtc.dev/mercoa/apis/mercoa-2/llms.txt) - [OpenAPI document](https://skmtc.dev/mercoa/apis/mercoa-2/revisions/00a8e403ae18?raw)
