Create a payment run

Creates a payment run on a single account, or a batch of customer accounts.

SecuritybearerAuth
Request
query Parameters
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 strings
Deprecated

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_size
integer [ 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.

header Parameters
zuora-track-id
string

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 (').

async
boolean
Default: false

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.

zuora-entity-ids
string

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-key
string

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-encoding
string

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-encoding
string

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.

Request Body schema: application/json
required
apply_credit_memos
boolean

If true, any posted credit memos are applied first.

apply_unapplied_payments
boolean

If true, any unapplied payments are applied first.

batch
string

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

bill_cycle_day
string

The day of the month to bill multiple customer accounts.

bill_run_id
string

The unique identifier of a bill run.

collect_payment
boolean

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.

currency
string

Three-letter ISO currency code.

consolidated_payment
boolean

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

gateway_id
string

Unique identifier for the payment gateway.

payment_run_date
string <date-time>

The date and time when the scheduled payment run is to be executed, in yyyy-mm-dd hh:mm:ss format. The backend will ignore minutes and seconds in the field value. For example, if you specify 2017-03-01 11:30:37 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.

target_date
string <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.

Responses
201

Default Response

400

Bad Request

401

Unauthorized

404

Not Found

405

Method Not Allowed

429

Too Many Requests

500

Internal Server Error

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

post/payment_runs
Request samples
application/json
{
  • "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": "2019-08-24T14:15:22Z",
  • "target_date": "2023-01-01"
}
Response samples
application/json
{
  • "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": {
    },
  • "custom_objects": {
    },
  • "apply_credit_memos": true,
  • "apply_unapplied_payments": true,
  • "batch": "string",
  • "consolidate_payment": true,
  • "bill_cycle_day": 31,
  • "bill_run_id": "string",
  • "collect_payment": true,
  • "currency": "USD",
  • "state_transitions": {
    },
  • "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": {
    }
}