---
title: "Settle a payment"
method: POST
path: "/v1/gateway-settlement/payments/{payment-key}/settle"
tags: ["Payment Gateway Reconciliation"]
---

# Settle a payment

`POST /v1/gateway-settlement/payments/{payment-key}/settle`

If the <a href="https://docs.zuora.com?resourceId=payments-electronic-payment-processing" target="_blank">Asynchronous Payment Statuses</a> feature is not enabled, this API operation sets the Gateway State field of the payment to `Settled` and returns the Payment object as response.

If the Asynchronous Payment Statuses feature is enabled, for ACH and Bank Transfer payments, this API operation sets the Payment Status field to `Processed` and the Gateway State field to `Settled`.

## Path parameters

- `payment-key` string, required

## 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

## Request body

- POSTSettlePaymentRequest
  - `gatewayReconciliationReason` string — The reason of gateway reconciliation.
  - `gatewayReconciliationStatus` string — The status of gateway reconciliation.
  - `payoutId` string — The payout ID from the gateway side.
  - `settledOn` string — The date and time of the transaction settlement. The format is `yyyy-mm-dd hh:mm:ss`.

## Response `200`

OK

- POSTSettlePaymentResponse
  - `accountId` string — The ID of the customer account that the payment is for.
  - `accountNumber` string — The number of the customer account that the payment is for.
  - `amount` number, double — The total amount of the payment.
  - `appliedAmount` number, double — The applied amount of the payment.
  - `authTransactionId` string, nullable — The authorization transaction ID from the payment gateway.
  - `bankIdentificationNumber` string — The first six or eight digits of the credit card or debit card used for the payment, when applicable.
  - `cancelledOn` string, nullable — The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
  - `comment` string, nullable — Comments about the payment.
  - `createdById` string — The ID of the Zuora user who created the refund.
  - `createdDate` string — The date and time when the chargeback is created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-01 15:31:10.
  - `creditBalanceAmount` number, double — The amount that the payment transfers to the credit balance. The value is not `0` only for those payments that come from legacy payment operations performed without the Invoice Settlement feature.
  - `currency` string — A currency defined in the web-based UI administrative settings.
  - `effectiveDate` string — The date and time when the payment takes effect, in `yyyy-mm-dd hh:mm:ss` format.
  - `paymentGatewayNumber` string, nullable — The number of the payment gateway instance.
  - `financeInformation` object — Container for the finance information related to the refund.
    - `bankAccountAccountingCode` string, nullable — The accounting code that maps to a bank account in your accounting system.
    - `bankAccountAccountingCodeType` string, nullable — The type of the accounting code that maps to a bank account in your accounting system.
    - `transferredToAccounting` 'Processing' | 'Yes' | 'No' | 'Error' | 'Ignore' — Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite.
    - `unappliedPaymentAccountingCode` string — The accounting code for the unapplied payment.
    - `unappliedPaymentAccountingCodeType` string — The type of the accounting code for the unapplied payment.
  - `gatewayId` string — The ID of the gateway instance that processes the payment.
  - `gatewayOrderId` string, nullable — A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead.
  - `gatewayReconciliationReason` string — The reason of gateway reconciliation.
  - `gatewayReconciliationStatus` string, nullable — The status of gateway reconciliation.
  - `gatewayResponse` string — The message returned from the payment gateway for the payment. This message is gateway-dependent.
  - `gatewayResponseCode` string — The code returned from the payment gateway for the payment. This code is gateway-dependent.
  - `gatewayState` 'Submitted' | 'NotSubmitted' | 'Settled' | 'FailedToSettle' — The status of the payment in the gateway; specifically used for reconciliation.
  - `id` string — The ID of the payment chargeback.
  - `markedForSubmissionOn` string, nullable — The date and time when a charge was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
  - `number` string — The unique identification number of the payment. For example, P-00000001.
  - `organizationLabel` string — The organization that this object belongs to. Note: This field is available only when the Multi-Org feature is enabled.
  - `paymentMethodId` string — The unique ID of the payment method that the customer used to make the payment.
  - `paymentMethodSnapshotId` string — The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
  - `payoutId` string, nullable — The payout ID from the gateway side.
  - `referenceId` string — The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
  - `refundAmount` number, double — The amount of the payment that is refunded.
  - `secondPaymentReferenceId` string, nullable — The transaction ID returned by the payment gateway if there is an additional transaction for the payment.
  - `settledOn` string — The date and time when the transaction is settled, in `yyyy-mm-dd hh:mm:ss` format.
  - `softDescriptor` string, nullable — A payment gateway-specific field that maps Zuora to other gateways.
  - `softDescriptorPhone` string, nullable — A payment gateway-specific field that maps Zuora to other gateways.
  - `status` string — The status of the payment.
  - `submittedOn` string — The date and time when the payment was submitted, in `yyyy-mm-dd hh:mm:ss` format.
  - `success` boolean — Indicates if the request is processed successfully.
  - `type` 'External' | 'Electronic' — The type of the payment.
  - `unappliedAmount` number, double — The unapplied amount of the payment.
  - `updatedById` string — The ID of the Zuora user who last updated the payment.
  - `updatedDate` string — The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-02 15:36:10.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[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)
