---
title: "Retrieve a payment run"
method: GET
path: "/object-query/payment-runs/{key}"
tags: ["Object Queries"]
---

# Retrieve a payment run

`GET /object-query/payment-runs/{key}`

Retrieve the details of a specific Payment Run object.

## Path parameters

- `key` string, required

## Query parameters

- `pageSize` integer
- `cursor` string
- `sort[]` string[]
- `expand[]` string[]
- `filter[]` string[]
- `fields[]` string[]
- `includeNullFields` boolean

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Response `200`

OK

- ExpandedPaymentRun
  - `id` string — The unique identifier of the payment run.
  - `createdById` string — The unique identifier of the user who created the payment run.
  - `createdDate` string, date-time — The time that the payment run gets created in the system, in the `YYYY-MM-DD HH:MM:SS` format.
  - `updatedById` string — The unique identifier of the user who last updated the payment run.
  - `updatedDate` string, date-time — The time that the payment run gets updated in the system, in the `YYYY-MM-DD HH:MM:SS` format.
  - `endDate` string — The end date of the payment run.
  - `executedDate` string, date-time — The date and time when the payment run is executed, in `yyyy-mm-dd hh:mm:ss` format. For example, 2024-03-01 11:30:37.
  - `numberOfCreditBalanceAdjustments` integer — **Note:** This field is only available if you have the Credit Balance feature enabled. The number of credit balance adjustments that are successfully processed in the payment run.
  - `numberOfErrors` integer — The number of payments with the status of `Error` and `Processing`.
  - `numberOfInvoices` integer — **Note:** This field is only available if you have the Invoice Settlement feature enabled. The total number of invoices that are picked up for processing in the payment run.
  - `numberOfPayments` integer — The number of payments that are successfully processed in the payment run.
  - `numberOfUnprocessed` integer — The number of billing documents with remaining positive balances after the payment run is completed.
  - `paymentRunNumber` string — Number of the payment run.
  - `status` 'Pending' | 'Processing' | 'Completed' | 'Error' | 'Canceled' — The status of the created payment run.
  - `targetDate` string, date — The target date used to determine which receivables to be collected in the payment run.
  - `applyCreditBalance` boolean — Whether to apply credit balances in the payment run. This field is only available when you have Invoice Settlement feature disabled.
  - `consolidatedPayment` boolean — **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://docs.zuora.com?resourceId=platform-payments-roles) for more information. Whether to process a single payment for all receivables that are due on an account.
  - `processPaymentWithClosedPM` boolean — Whether to process payments even if the default payment method is closed. **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://docs.zuora.com?resourceId=platform-payments-roles) for more information.
  - `collectPayment` boolean — Whether to process electronic payments during the execution of payment runs.
  - `autoApplyCreditMemo` boolean — Whether to automatically apply a posted credit memo to one or more receivables in the payment run. **Note:** This field is only available if you have [Invoice Settlement](https://docs.zuora.com?resourceId=billing-invoice-settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.
  - `autoApplyUnappliedPayment` boolean — Whether to automatically apply unapplied payments to one or more receivables in the payment run. **Note:** This field is only available if you have [Invoice Settlement](https://docs.zuora.com?resourceId=billing-invoice-settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.
  - `numberOfCreditMemos` integer — The total number of credit memos that are successfully processed in the payment run. **Note:** This field is only available if you have the Invoice Settlement feature enabled.
  - `numberOfDebitMemos` integer — The total number of debit memos that are picked up for processing in the payment run. **Note:** This field is only available if you have the Invoice Settlement feature enabled.
  - `numberOfDebitMemosUnprocessed` integer — The total number of debit memos that are not processed in the payment run. **Note:** This field is only available if you have the Invoice Settlement feature enabled.
  - `numberofUnappliedPayments` integer — The number of unapplied payments that are successfully processed in the payment run. **Note:** This field is only available if you have the Invoice Settlement feature enabled.
  - `totalExecutionTime` integer — The total time taken to execute the payment run in milliseconds.
  - `errorMessage` string — The detailed information of the error response.
  - `runDate` string, date — The date and time when the scheduled payment run is to be executed for collecting payments.
  - `nextRunOn` string, date — The date when the next payment run is scheduled to run.
  - `repeatType` 'None' | 'Daily' | 'Weekly' | 'Monthly' — The repeat type of the payment run.
  - `repeatFrom` string — The start date of the scheduled payment run.
  - `repeatTo` string — The end date of of the scheduled payment run.
  - `runTime` integer — The scheduled run time (hour) of day.
  - `timeZone` string — Timezone of the scheduled payment run.
  - `monthlyOnDay` string — The repeat day in a month.
  - `weeklyOnDay` 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat' | 'Sun' — The repeat day in a week. This field is required if you set `repeatType` field to `Weekly`.
  - `accountId` string — The ID of the customer account associated with the payment run.
  - `batch` string — The alias name given to a batch.
  - `billingCycleDay` string — The billing cycle day (BCD), the day of the month when a bill run generates invoices for the account.
  - `currency` string — A currency defined in the web-based UI administrative settings.
  - `paymentGatewayId` string, uuid, nullable — The ID of the gateway instance that processes the payment.
  - `billingRunId` string — The unique identifier of the billing run that the payment run is associated with.

## Other responses

- `500` — Internal server error
- `4XX` — Invalid input

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
