Skip to content

Create a payment run

Request

Creates a payment run.

Security
bearerAuth
Query
fields[]Array of strings

Allows you to specify which fields are returned in the response.

Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions`
Example:fields[]=id,created_time
payment_run.fields[]Array of stringsdeprecated

Allows you to specify which fields are returned in the response.

Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions`
Example:payment_run.fields[]=id,created_time
summary.fields[]Array of strings

Allows you to specify which fields are returned in the response.

Accepted values `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `number_of_unprocessed_receivables`, `number_of_errors`, `number_of_invoices`, `number_of_payments`, `number_of_credit_memos`, `number_of_debit_memos`, `number_of_unprocessed_debit_memos`, `number_of_unapplied_payments`, `errors_total`, `invoices_total`, `payments_total`, `unprocessed_receivables_total`
Example:summary.fields[]=id,created_time
expand[]Array of strings

Allows you to expand responses by including related object information in a single call. See the Expand responses section of the Quickstart API Tutorials for detailed instructions.

filter[]Array of strings

A case-sensitive filter on the list. See the Filter lists section of the Quickstart API Tutorial for detailed instructions.
Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the "Retrieve a billing document" operation, you can use the filter[] parameter on the related objects such as filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63

page_sizeinteger, [ 1 .. 99 ]

The maximum number of results to return in a single page. If the specified page_size is less than 1 or greater than 99, Zuora will return a 400 error.

Headers
zuora-track-idstring

A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your API calls to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), or quote (').

asyncboolean

Making asynchronous requests allows you to scale your applications more efficiently by leveraging Zuora's infrastructure to enqueue and execute requests for you without blocking. These requests also use built-in retry semantics, which makes them much less likely to fail for non-deterministic reasons, even in extreme high-throughput scenarios. Meanwhile, when you send a request to one of these endpoints, you can expect to receive a response in less than 150 milliseconds and these calls are unlikely to trigger rate limit errors. If set to true, Zuora returns a 202 Accepted response, and the response body contains only a request ID.

Default:false
zuora-entity-idsstring

An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header.

idempotency-keystring

Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. This idempotency key should be a unique value, and the Zuora server identifies subsequent retries of the same request using this value. For more information, see Idempotent Requests.

accept-encodingstring

Include a accept-encoding: gzip header to compress responses, which can reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes. For more information about this header, see Request and Response Compression.

content-encodingstring

Include a content-encoding: gzip header to compress a request. Upload a gzipped file for the payload if you specify this header. For more information, see Request and Response Compression.

Bodyapplication/jsonrequired
apply_credit_memosboolean

If true, any posted credit memos are applied first.

apply_unapplied_paymentsboolean

If true, any unapplied payments are applied first.

batchstring

Identifier of the customer account batch to be included in this payment run.

bill_cycle_daystring

The day of the month to bill multiple customer accounts.

bill_run_idstring

The unique identifier of a bill run.

collect_paymentboolean

Indicates whether to process electronic payments during the execution of payment runs. If the Payment user permission "Process Electronic Payment" is disabled, this field will be ignored.

currencystring

Three-letter ISO currency code.

Example:"USD"
consolidated_paymentboolean

If true, a single payment will be collected for all receivables due on an account.

gateway_idstring

Unique identifier for the payment gateway.

payment_run_datestring, (date-time)

The date and time when the scheduled payment run is to be executed, in yyyy-mm-dd hh:mm:ssZ format. The backend will ignore minutes and seconds in the field value. For example, if you specify 2017-03-01 11:30:37Z for this value, this payment run will be run at 2017-03-01 11:00:00.
You must specify either the payment_run_date field or the target_date field in the request body. If you specify the payment_run_date field, the scheduced payment run is to be executed on the specified payment run date. If you specify the target_date field, the payment run is executed immediately after it is created.

Example:"2024-08-24 14:15:22Z"
target_datestring, (date)

The target date used to determine which receivables to be paid in the payment run. The payments are collected for all receivables with the due date no later than the target date.

Example:"2023-01-01"
{ "apply_credit_memos": true, "apply_unapplied_payments": true, "batch": "string", "bill_cycle_day": "string", "bill_run_id": "string", "collect_payment": true, "currency": "USD", "consolidated_payment": true, "gateway_id": "string", "payment_run_date": "2024-08-24 14:15:22Z", "target_date": "2023-01-01" }

Responses

Default Response

Headers
ratelimit-limitstring

The request limit quota for the time window closest to exhaustion. See rate limits for more information.

ratelimit-remainingnumber

The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.

ratelimit-resetnumber

The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.

zuora-request-idstring

Zuora’s internal identifier for this request.

zuora-track-idstring

A user-supplied identifier for this request. If you supply a zuora-track-id as a request header, Zuora returns the zuora-track-id as a response header.

Bodyapplication/json
idstringread-only

Unique identifier for the object.

updated_by_idstringread-only

Unique identifier of the Zuora user who last updated the object

updated_timestring, (date-time)read-only

The date and time when the object was last updated in ISO 8601 UTC format.

created_by_idstringread-only

Unique identifier of the Zuora user who created the object

created_timestring, (date-time)read-only

The date and time when the object was created in ISO 8601 UTC format.

custom_fieldsobject(CustomFields)

Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.

custom_objectsobjectread-only

The custom objects associated with a Zuora standard object.

apply_credit_memosboolean

If true, any posted credit memos are applied first.

apply_unapplied_paymentsboolean

If true, any unapplied payments are applied first.

batchstring

Identifier of the customer account batch to be included in this payment run.

consolidate_paymentboolean

If true, a single payment will be collected for all receivables due on an account.

bill_cycle_dayinteger, [ 0 .. 31 ]

The day of the month to bill multiple customer accounts.

bill_run_idstring

The unique identifier of a bill run.

collect_paymentboolean

Indicates whether to process electronic payments during the execution of payment runs.

currencystring

Three-letter ISO currency code.

Example:"USD"
state_transitionsobject

The date and time when the payment run executed, in the yyyy-mm-dd hh:mm:ss format.

payment_gateway_idstring

Unique identifier for the payment gateway.

payment_collection_datestring, (date-time)read-only
payment_run_numberstring

Human-readable identifier for this object.

payment_run_datestring, (date-time)

The date and time when the scheduled payment run is to be executed.

target_datestring, (date)

The target date used to determine which receivables to be paid in the payment run. The payments are collected for all receivables with the due date no later than the target date.

Example:"2023-01-01"
statestring

Status of the payment run.

Enum:"processing""pending""completed""canceled""failed"
summaryobject(PaymentRunSummary)read-only

Summary of the payment run.

Response
{ "id": "string", "updated_by_id": "string", "updated_time": "2019-08-24T14:15:22Z", "created_by_id": "string", "created_time": "2019-08-24T14:15:22Z", "custom_fields": { "property1": "string", "property2": "string" }, "custom_objects": { "property1": { … }, "property2": { … } }, "apply_credit_memos": true, "apply_unapplied_payments": true, "batch": "string", "consolidate_payment": true, "bill_cycle_day": 0, "bill_run_id": "string", "collect_payment": true, "currency": "USD", "state_transitions": { "completed": "string", "failed": "string" }, "payment_gateway_id": "string", "payment_collection_date": "2019-08-24T14:15:22Z", "payment_run_number": "string", "payment_run_date": "2019-08-24T14:15:22Z", "target_date": "2023-01-01", "state": "processing", "summary": { "number_of_errors": 0, "number_of_invoices": 0, "number_of_payments": 0, "number_of_credit_memos": 0, "number_of_debit_memos": 0, "number_of_unprocessed_debit_memos": 0, "number_of_unapplied_payments": 0, "number_of_unprocessed_receivables": 0, "errors_total": 0, "invoices_total": 0, "payments_total": 0, "unprocessed_receivables_total": 0 } }