Using Push Confirmation Callbacks

Push Confirmation callbacks provide notifications about the outcome of each disbursement payment, which is provided by the payment processor. They authoritatively confirm whether the transaction has been approved or declined—allowing you to definitively update your books and business applications in near real time. Push Confirmation callbacks can be used by themselves but are required if you choose to use Push Authorization callbacks.

Push Confirmation callbacks can include the following parameters:

Parameter

Description

Type

site_identifier

The ID that identifies your client site.

string

timestamp

The Unix Epoch time of the call.

string

version

The version of the API you’re using. This version must match the version associated with your API key pair.

string

signature

A unique string of characters that is calculated by running the alphabetized, concatenated parameters of the call through an HMAC-SHA256 digest.

string

site_customer_identifier

A unique string ID the merchant creates to identify consumers.

string

site_order_identifier

A unique string ID the merchant creates to identify the order.

string

pnm_order_identifier

The unique, PayNearMe-generated ID for this push order.

string

net_payment_amount

The payment amount after taking out the Site Processing Fee, PNM Processing Fee, and if applicable, the Retailer’s Fee.

dec

net_payment_currency

USD

enum

payment_amount

The total payment amount the consumer submitted online.

dec

payment_currency

USD

enum

pnm_payment_identifier

A unique string ID that PayNearMe generates with each payment.

string

site_payment_identifier

When responding to an Authorization callback, you can optionally return an arbitrary string in the site_payment_identifier field.

If specified, PayNearMe will echo that value back to you during the Confirmation callback. To correlate Authorization and Confirmation calls, use the pnm_payment_identifier parameter rather than the site_payment_identifier.

string

pnm_withheld_amount

The total amount withheld by PayNearMe that is shared with the retailer, site, and parent site, if applicable.

dec

pnm_withheld_currency

USD

enum

status

Indicates whether the disbursements was accepted or declined. Supported values include the following:

  • payment
  • decline

A decline status indicates that the transaction did not complete, and no disbursement payment has been made.

enum

pnm_processing_fee

The amount of the processing fee that PayNearMe charges.

dec

pnm_processing_currency

USD

enum

payment_timestamp

The date and time of the payment in ISO-8601 format.

string

order_payee_identifier

The Site ID of the client making the disbursement payment.

string

due_to_recipient_amount

The amount due to the merchant at settlement

dec

due_to_recipient_currency

USD

enum

due_to_site_amount

The amount due to the client at settlement

dec

due_to_site_currency

USD

enum

site_order_annotation

A merchant-provided description of the order. This field is only echoed in the callback if the site_order_annotation parameter was included in the original
/create_order request.

string

site_processing_fee

The amount of the merchant’s processing fee.

dec

site_processing_currency

USD

enum

payment_bank_name

The name of the bank where this account is held.

string

payment_bank_last4

The last four digits of the account number.

string

payment_type

The type of payment method the consumer used for the disbursement transaction. Supported options include the following:

  • ach_push
  • push_debit
  • paypal_push
  • venmo-push

enum

payment_type_card

The type of payment method that was used for the disbursement. Supported values include the following:

  • Debit Card
  • Paypal
  • Venmo

enum

payment_card_last4

The last four digits of the debit card used with this disbursement.

string

Once you receive the push confirmation callback, you have 10 seconds to respond with an acknowledgment message. Every push confirmation callback, regardless of status, must receive a response containing either the transaction’s pnm_order_identifier or pnm_payment_identifier. If an acknowledgment response is not received within 10 seconds, PayNearMe sends duplicate callbacks once per minute until one of the following occurs

  • PayNearMe receives a response for each callback it has issued for that pnm_order_identifier--including duplicates.
  • 30 minutes have elapsed with no response. After thirty minutes of sending duplicate callbacks, PayNearMe suspends callbacks for the site. For new transactions, callbacks will continue to send, but will be queued until you or PayNearMe manually resumes them. To resume your callbacks, log into your PayNearMe Business Portal, go to Admin > Callback Status, and click Resume. Once callbacks resume, PayNearMe will re-send all the callbacks that did not receive a response. You must respond to these callbacks to avoid re-suspension.

To ensure you don’t post duplicate callbacks as separate payments, configure your server to only post transactions with a unique pnm_order_identifier value.

The following code samples displays an example Push Confirmation callback and the server response. Your server must respond to all Push Confirmation callbacks, even when status=decline or duplicate callbacks are made for the same pnm_payment_identifier.

Push Confirmation Callback for ACH Disbursements

{
  "pnm_order_identifier": "384350950154",
  "pnm_payment_identifier": "384350950154",
  "site_payment_identifier": "56663420181-1647027378",
  "version": "3.0",
  "net_payment_amount": "30.00",
  "net_payment_currency": "USD",
  "payment_amount": "31.00",
  "payment_currency": "USD",
  "timestamp": "1647027379",
  "status": "payment",
  "pnm_withheld_amount": "1.00",
  "pnm_withheld_currency": "USD",
  "due_to_recipient_amount": "30.00",
  "due_to_recipient_currency": "USD",
  "payment_timestamp": "2022-03-11 11:36:18 -0800",
  "payment_type": "ach_push",
  "site_identifier": "S1733026124",
  "payment_bank_name": "Land of Lincoln Cr Un",
  "payment_bank_last4": "1419",
  "signature": "1454ae1a34531aee7c0fe9b5cc7296c8259967c227f629b3c6ded7faac2ade30"
}
{
  "payment_confirmation_response": {
    "version": "3.0",
    "confirmation": {
      "pnm_order_identifier": "384350950154"
    }
  }
}

Push Confirmation Callback for Debit Card Disbursements

{
  "pnm_order_identifier": "54109985767",
  "pnm_payment_identifier": "665806820381",
  "site_customer_identifier": "payout1",
  "site_payment_identifier": "54109985767-1656627993",
  "version": "3.0",
  "net_payment_amount": "100.00",
  "net_payment_currency": "USD",
  "payment_amount": "101.00",
  "payment_currency": "USD",
  "timestamp": "1656627995",
  "status": "payment",
  "pnm_withheld_amount": "1.00",
  "pnm_withheld_currency": "USD",
  "due_to_recipient_amount": "100.00",
  "due_to_recipient_currency": "USD",
  "payment_timestamp": "2022-06-30 15:26:33 -0700",
  "order_payee_identifier": "S1733026124",
  "payment_type": "push_debit",
  "site_identifier": "S1733026124",
  "payment_card_type": "Debit Card",
  "payment_card_last4": "9999",
  "signature":"842edf4fc63a15dcc6176b4fa1061c221389d1e41562a6f3b7263213cb448b70"
}
{
  "payment_confirmation_response": {
    "version": "3.0",
    "confirmation": {
      "pnm_order_identifier": "54109985767"
    }
  }
}

Push Confirmation Callback for PayPal Disbursements

{
  "pnm_order_identifier": "87779493034",
  "pnm_payment_identifier": "958063924562",
  "site_customer_identifier": "468610000",
  "site_payment_identifier": "87779493034-1661292340",
  "version": "3.0",
  "test": "true",
  "net_payment_amount": "500.00",
  "net_payment_currency": "USD",
  "payment_amount": "500.00",
  "payment_currency": "USD",
  "timestamp": "1661292342",
  "status": "payment",
  "pnm_withheld_amount": "20.00",
  "pnm_withheld_currency": "USD",
  "due_to_site_amount": "480.00",
  "due_to_site_currency": "USD",
  "payment_timestamp": "2022-08-23 15:05:39 -0700",
  "order_payee_identifier": "S1733026124",
  "payment_type": "paypal-push",
  "site_identifier": "S1733026124",
  "payment_card_type": "Paypal",
  "signature": "b35e6bcbe9e7ce051d6c4d0c693a70c403a8f325a26eb2a3d043438975529e8a"
}
{
  "payment_confirmation_response": {
    "version": "3.0",
    "confirmation": {
      "pnm_order_identifier": "87779493034"
    }
  }
}

Push Confirmation Callback for Venmo Disbursements

{
  "pnm_order_identifier": "98889493034",
  "pnm_payment_identifier": "169063924562",
  "site_customer_identifier": "579610000",
  "site_payment_identifier": "87779493034-1661292340",
  "version": "3.0",
  "test": "true",
  "net_payment_amount": "500.00",
  "net_payment_currency": "USD",
  "payment_amount": "500.00",
  "payment_currency": "USD",
  "timestamp": "1661292342",
  "status": "payment",
  "pnm_withheld_amount": "20.00",
  "pnm_withheld_currency": "USD",
  "due_to_site_amount": "480.00",
  "due_to_site_currency": "USD",
  "payment_timestamp": "2022-08-23 15:05:39 -0700",
  "order_payee_identifier": "S1733026124",
  "payment_type": "venmo-push",
  "site_identifier": "S1733026124",
  "payment_card_type": "Venmo",
  "signature": "b35e6bcbe9e7ce051d6c4d0c693a70c403a8f325a26eb2a3d043438975529e8a"
}
{
  "payment_confirmation_response": {
    "version": "3.0",
    "confirmation": {
      "pnm_order_identifier": "98889493034"
    }
  }
}