v1

latestOpenAPI 3.0.12026-07-264182324.3 KB
Payments

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.

post/reverse_payment

Request body

site_identifierstring required

Identifies your client site.

timestampstring required

The Unix Epoch time of the call

versionstring required

The version of the API. This version must match the version associated with your API key pair.

signaturestring 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_identifierstring required

The unique, PayNearMe-created identifier for this payment.

agent_identifierstring

The name or ID of the client agent cancelling the payment.

void_if_not_settledstring

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_amountnumber

The amount to be refunded. This parameter should only be included for partial-amount refunds.

refund_currencystring

USD

Response

Payment Reversed

payment_madestring date-time

The date and time when the customer made the payment.

payment_amountnumber

The total amount of the payment including convenience fees.

payment_currencystring

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_accountstring

A short description of the payment method.

payment_method_identifierstring

A unique ID for the payment method.

net_payment_amountnumber

The payment amount that is settled to the consumer after all client, retailer (if applicable), and PayNearMe fees have been taken out.

net_payment_currencystring

USD

payment_processing_feenumber

The fee amount charged for processing the transaction.

payment_processing_fee_currencystring

USD

pnm_processing_feenumber

The fee amount that PayNearMe charges for processing the transaction.

pnm_processing_fee_currencystring

USD

settled_to_sitestring

If set to <code>true</code>, the payment has been settled to the client's account.

date_settled_to_merchantstring date

The date in <i>YYYY-MM-DD</i> format when the payment was settled to the client.

pnm_payment_identifierstring

A unique string identifier for the payment.

retailer_identifierstring

A unique PayNearMe-assigned ID for a retailer.

pricing_schedule_namestring

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_textstring

Custom text that can be returned in the authorization callback response. Up to 75 lines of 40 character each can be included.

Example response

{
  "payment_amount": 25.5,
  "payment_currency": "USD",
  "payment_status": "approved",
  "payment_account": "Bank of America, NA 6655",
  "payment_method_identifier": "d041313f4c04c",
  "net_payment_amount": 25,
  "net_payment_currency": "USD",
  "payment_processing_fee": 0.5,
  "payment_processing_fee_currency": "USD",
  "pnm_processing_fee": 0.5,
  "pnm_processing_fee_currency": "USD",
  "settled_to_site": "false",
  "pnm_payment_identifier": "403443149419",
  "retailer_identifier": "FM690776428",
  "pricing_schedule_name": "consumer",
  "site_channel": "consumer",
  "payment_receipt_text": "Thank you for making your payment to\n Freehold Financial.\n\n\nPayment Ref: 12345678\n\nPayment Confirmation: 403443149419\n\n\nAmount of Payment: $25.00\n\n Convenience Fee: $0.50\n\n Total Cash Tendered: $25.50\n\n\nKeep this receipt as proof of payment.\n\n",
  "merchant_settlements": {
    "settlement_method_identifier": "SM736220738",
    "settlement_type": "net_payment",
    "settlement_amount": 450.23,
    "settlement_currency": "USD"
  },
  "refund": {
    "refund_amount": "210.99",
    "refund_currency": "USD",
    "unsettle_to_merchant_amount": "200",
    "unsettle_to_merchant_currency": "USD",
    "unsettled_from_collector_amount": "0"
  }
}