Payments

POST /refund_payment

Changed on

Use the <code>pnm_payment_identifier</code> to refund a payment for the full or partial amount. Include the <code>refund_amount</code> and the <code>refund_currency</code> parameters for partial-amount refunds.</br></br>Only processed payments can be refunded. For ACH payments, this is after the daily batch transfer to the bank. For cards, the cutoff time is based on the card processing network.

Request

  • Base URL
    https://api.paynearme-sandbox.com/json-api
  • Auth
    • OAuth 2
      Client credentials
      Token URLhttps://login.paynearme.com/oauth/token
    • or API key in query parameter signature

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

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.

NOTE: This field is required when authenticating with the HMAC signature method; it is not required when authenticating with OAuth 2.0.

pnm_payment_identifierstring required

The unique, PayNearMe-created identifier for this payment.

refund_amountnumber

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

refund_currencystring

USD

Response

Payment Refunded

OR

Example response

{
  "status": "ok",
  "payment": {
    "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"
    }
  }
}

Changes

    • breaking

      removed the success response with the status

    • info

      api operation id refund_payment was added

    • info

      the request property signature became optional

    2 more changes in this revision