> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Apply payments to an invoice

> As of API version 22, Zuora offers an improved, streamlined method of creating a payment and applying a payment to an invoice with a single API call.

As of API version 22, Zuora offers an improved, streamlined method of creating a payment and applying a payment to an invoice with a single API call.

If you are using an API version earlier than 22.0, or if you want to apply a single payment to multiple invoices, use the original method.

Note that the process described in this topic will create a payment, apply it to an invoice, and send it to the gateway. However, it does not validate the results from the gateway; the success result from the final query only signifies that the status of the payment was updated to "Processed." You must query against the `GatewayResponseCode` for that payment to determine whether the payment was approved or declined by the gateway.

> **Note**
>
> The method of using SOAP API to create InvoicePayment object is not recommended anymore.