---
title: "POST /reverse_payment"
method: POST
path: "/reverse_payment"
tags: ["Payments"]
---

# POST /reverse_payment

`POST /reverse_payment`

Use the <code>/reverse_payment</code> endpoint to either cancel or refund a payment. Set <code>void_if_not_settled</code> to <code>true</code> to completely cancel a payment that has not settled. The cutoff times for the cancellation window varies by card network and your site’s ACH submission timelines. Settled payments must be refunded by submitting the <code>refund_amount</code> and <code>refund_currency</code> parameters. This call gives you the ability to refund both full and partial amounts.

## Request body

- ReversePayment — Reverse the full or partial amount of a processed payment or void unprocessed payments.
  - `site_identifier` string, required — Identifies your client site.
  - `timestamp` string, required — The Unix Epoch time of the call
  - `version` string, required — The version of the API. This version must match the version associated with your API key pair.
  - `signature` string, required — The HMAC signature that is calculated by running your API Secret Key and the alphabetized, concatenated parameters of the request payload through the SHA256 message digest algorithm.
  - `pnm_payment_identifier` string, required — The unique, PayNearMe-created identifier for this payment.
  - `agent_identifier` string — The name or ID of the client agent cancelling the payment.
  - `void_if_not_settled` string — Set this parameter to <code>true</code> to completely cancel a payment that has not been settled. The cutoff times for the cancellation window varies by card network and your site’s ACH submission timelines. </br></br>Settled payments must be refunded by submitting the <code>refund_amount</code> and <code>refund_currency parameters</code>.
  - `refund_amount` number — The amount to be refunded. This parameter should only be included for partial-amount refunds.
  - `refund_currency` string — USD

## Response `201`

Payment Reversed

- ReversePaymentResponse — The Payments object lists every payment submitted for the order and includes the payment's settlement status in the Merchant Settlements object.
  - `payment_made` string, date-time — The date and time when the customer made the payment.
  - `payment_amount` number — The total amount of the payment including convenience fees.
  - `payment_currency` string — USD
  - `payment_status` 'canceled' | 'refunded' — The status of the payment.
  - `payment_type` 'ach' | 'ach_push' | 'cash' | 'cash_app' | 'credit' | 'debit' | 'paypal' | 'paypal-push' | 'pin4' | 'push-debit' | 'venmo' | 'venmo-push' — The type of payment method used for the transaction. Payment methods prefixed or suffixed with <code>push</code> are for disbursement transactions.
  - `payment_account` string — A short description of the payment method.
  - `payment_method_identifier` string — A unique ID for the payment method.
  - `net_payment_amount` number — The payment amount that is settled to the consumer after all client, retailer (if applicable), and PayNearMe fees have been taken out.
  - `net_payment_currency` string — USD
  - `payment_processing_fee` number — The fee amount charged for processing the transaction.
  - `payment_processing_fee_currency` string — USD
  - `pnm_processing_fee` number — The fee amount that PayNearMe charges for processing the transaction.
  - `pnm_processing_fee_currency` string — USD
  - `settled_to_site` string — If set to <code>true</code>, the payment has been settled to the client's account.
  - `date_settled_to_merchant` string, date — The date in <i>YYYY-MM-DD</i> format when the payment was settled to the client.
  - `pnm_payment_identifier` string — A unique string identifier for the payment.
  - `retailer_identifier` string — A unique PayNearMe-assigned ID for a retailer.
  - `pricing_schedule_name` string — Specifies the name of the pricing schedule (e.g.,<code>agent</code>, <code>agent_recurring</code>, <code>consumer</code>, <code>consumer_recurring</code>,<code>consumer_ivr</code>). Supported values can include site-configured pricing schedules.
  - `site_channel` 'agent' | 'agent_waived' | 'consumer' | 'consumer_ivr' | 'kiosk' | 'agent_recurring' | 'consumer_recurring' — The payment channel where this payment was created.
  - `payment_receipt_text` string — Custom text that can be returned in the authorization callback response. Up to 75 lines of 40 character each can be included.
  - `merchant_settlements` MerchantSettlements — The Merchant Settlements object indicates where and for how much a payment was settled.
    - `settlement_method_identifier` string — A unique, PayNearMe-provided ID for the settlement.
    - `settlement_type` 'net_payment' | 'gross_payment' — Indicates whether the settlment is a <code>net_payment</code> or a <code>gross_payment</code>.
    - `settlement_amount` number — The amount to be settled
    - `settlement_currency` string — USD
  - `refund` Refund — The Refund object indicates the status of the payment refund.
    - `refund_status` 'started' | 'completed' — The status of the refund. Supported options include <code>started</code> and <code>completed</code>.
    - `refund_amount` string — The amount to be refunded.
    - `refund_currency` string — USD
    - `unsettle_to_merchant_amount` string — The amount that will be unsettled from the client account (i.e., the payment amount less the convenience fee)
    - `unsettle_to_merchant_currency` string — USD
    - `unsettled_from_collector_amount` string — The amount that will be unsettled from the collector (if applicable).

---

[API](https://skmtc.net/paynearme/apis/paynearme-api-v3-0.md) · [All operations](https://skmtc.net/paynearme/apis/paynearme-api-v3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paynearme/paynearme-api-v3-0/revisions/44cba4f8b80f/schema)
