# Reverse an APM payment

Perform a reversal on the funds taken from a sale.

Endpoint: POST /apmPayments/{paymentId}/reversals
Version: 2023-06-01
Security: BasicAuth

## Path parameters:

  - `paymentId` (string, required)
    The identifier of the payment resource.

## Header parameters:

  - `Content-Type` (string, required)
    The content type of the request body.
    Enum: "application/json"

  - `WP-Api-Version` (string, required)
    The API version.
    Enum: "2023-06-01"

## Response 202 fields (application/json):

  - `_actions` (object)
    Actions that can be performed on the payment resource. These are dynamic based on factors such as the payment instrument and state of the payment.

  - `_actions.partialReverse` (object)
    The URL you can invoke to partially reverse the payment. Make sure to check it's present, not always present.

  - `_actions.partialReverse.href` (string)

  - `_actions.reverse` (object)
    The URL you can invoke to reverse the payment. Make sure to check it's present, not always present.

  - `_actions.reverse.href` (string)

  - `_actions.settle` (object)
    The URL you can invoke to settle the payment. Make sure to check it's present, not always present.

  - `_actions.settle.href` (string)

  - `_links` (object)
    Links to resources related to the request.

  - `_links.self` (object)
    The URL you can invoke to fetch the last event for the payment.

  - `_links.self.href` (string)

  - `lastEvent` (string)
    Enum: "authorized", "cancelFailed", "cancelled", "cancelRequested", "sentForSettlement", "settlementFailed", "chargebackReversed", "chargedBack", "disputeExpired", "disputeFundsHeld", "disputeFundsReleased", "disputeReserveReleased", "error", "expired", "disputeInformationRequested", "disputInformationSupplied", "miscellaneous", "pending", "refunded", "refundExpired", "refundFailed", "refundReversed", "refused", "refusedByIssuer", "sentForRefund", "settled", "settlementReversed", "cancelledByCustomer", "signedFormReceived", "unknown", "manuallyAmended"

  - `paymentId` (string)
    The identifier of the payment resource.

## Response 400 fields (application/json):

  - `errorName` (string)

  - `message` (string)

  - `validationErrors` (array)

## Response 401 fields (application/json):

  - `errorName` (string)

  - `message` (string)

## Response 404 fields (application/json):

  - `errorName` (string)

  - `message` (string)

  - `validationErrors` (array)

## Response 500 fields (application/json):

  - `errorName` (string)

  - `message` (string)


