# Reverse a payment If the Asynchronous Payment Statuses feature is not enabled, this API operation sets the Gateway State field of the payment to Settled, creates a refund for the amount specified in the request, and returns the Refund object as response. If the Asynchronous Payment Statuses feature is enabled, for ACH and Bank Transfer payments that are reversed before they are settled, this API operation sets the Payment Status field to Processed, sets the Gateway State field of the payment to Settled, creates an external refund for the amount specified in the request, and returns the Refund object as response. If the reason code "Payment Reversal" is active in the Reason Codes list, the reason code of the external refund is set to "Payment Reversal". Otherwise, the default reason code in the list is used. Endpoint: POST /v1/gateway-settlement/payments/{payment-key}/chargeback Version: 2026-02-20 Security: bearerAuth ## Header parameters: - `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. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. - `Accept-Encoding` (string) Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it. - `Content-Encoding` (string) Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. - `Zuora-Track-Id` (string) A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora 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 ("), and quote ('). - `Zuora-Entity-Ids` (string) An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header. - `Zuora-Org-Ids` (string) Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs. - `Zuora-Version` (string) The minor API version. For a list of available minor versions, see API upgrades. ## Path parameters: - `payment-key` (string, required) The payment number starting with "P-" or the unique payment ID. ## Request fields (application/json): - `amount` (number, required) The amount that needs to be reversed (chargeback). It cannot be greater than the total Payment amount. Example: 10 - `gatewayReconciliationReason` (string) The reason of gateway reconciliation. - `gatewayReconciliationStatus` (string) The status of gateway reconciliation. - `gatewayResponse` (string) The transaction response returned by the gateway for this transaction. If the transaction was declined, this reason is provided in the message. - `gatewayResponseCode` (string) Response message Code returned by the gateway about the transaction status. - `payoutId` (string) The payout ID from the gateway side. - `referenceId` (string) Unique Id generated by the gateway for each transaction. Use this ID to find the respective Zuora Payment ID. - `secondReferenceId` (string) The second reference Id. Some gateways use two unique transaction IDs. - `settledOn` (string) The date and time of the transaction settlement. The format is yyyy-mm-dd hh:mm:ss. ## Response 200 fields (application/json): - `accountId` (string) The ID of the customer account that the payment is for. - `amount` (number) The total amount of the payment. - `cancelledOn` (string) The date and time when the payment was cancelled, in yyyy-mm-dd hh:mm:ss format. - `comment` (string,null) 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. - `creditMemoId` (string) The ID of the credit memo that is refunded. - `financeInformation` (object) Container for the finance information related to the refund. - `financeInformation.bankAccountAccountingCode` (string) The accounting code that maps to a bank account in your accounting system. - `financeInformation.bankAccountAccountingCodeType` (string) The type of the accounting code that maps to a bank account in your accounting system. - `financeInformation.transferredToAccounting` (string) Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. Enum: "Processing", "Yes", "No", "Error", "Ignore" - `financeInformation.unappliedPaymentAccountingCode` (string) The accounting code for the unapplied payment. - `financeInformation.unappliedPaymentAccountingCodeType` (string) The type of the accounting code for the unapplied payment. - `gatewayId` (string) The ID of the gateway instance that processes the payment. - `gatewayReconciliationReason` (string) The reason of gateway reconciliation. - `gatewayReconciliationStatus` (string) 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` (string) The status of the payment in the gateway; specifically used for reconciliation. Enum: "Submitted", "NotSubmitted", "Settled", "FailedToSettle" - `id` (string) The ID of the payment chargeback. - `markedForSubmissionOn` (string) 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. - `methodType` (string) How an external refund was issued to a customer. Enum: "ACH", "Cash", "Check", "CreditCard", "PayPal", "WireTransfer", "DebitCard", "CreditCardReferenceTransaction", "BankTransfer", "Other" - `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. - `paymentId` (string) The ID of the payment that is refunded. - `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) The payout ID from the gateway side. - `reasonCode` (string) A code identifying the reason for the transaction. - `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. - `refundDate` (string) The date when the refund takes effect, in yyyy-mm-dd format. For example, 2017-03-01. - `refundTransactionTime` (string) The date and time when the refund was issued, in yyyy-mm-dd hh:mm:ss format. - `secondRefundReferenceId` (string) The transaction ID returned by the payment gateway if there is an additional refund. - `settledOn` (string) The date and time when the transaction is settled, in yyyy-mm-dd hh:mm:ss format. - `softDescriptor` (string) A payment gateway-specific field that maps Zuora to other gateways. - `softDescriptorPhone` (string) 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) Returns true if the request was processed successfully. - `type` (string) The type of the payment. Enum: "External", "Electronic" - `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. ## Response 500 fields (application/json): - `reasons` (array) Example: [{"code":"ObjectNotFound","message":"Notification definition with id 6e569e1e05f040eda51a927b140c0ac1 does not exist"}] - `reasons.code` (string) The error code of response. - `reasons.message` (string) The detail information of the error response ## Response 4XX fields (application/json): - `processId` (string) The ID of the process that handles the operation. - `reasons` (array) The container of the error code and message. This field is available only if the success field is false. - `reasons.code` (string) The error code of response. - `reasons.message` (string) The detail information of the error response - `requestId` (string) Unique identifier of the request. - `success` (boolean) Indicates whether the call succeeded.