Using Targeted Deep Links

Learn how to configure targeted deep links using the PayNearMe /agent_sso endpoint to send agents directly to specific workflows—such as refunds, Autopay setup, or payment cancellation—without manual navigation in the Agent Interface.

Overview

When agents working in your CRM system need to complete a task in the PayNearMe Agent Interface, they normally have to open PayNearMe, search for the consumer's account, and then find the right task button. Deep links remove those steps.

Deep links already take agents directly to a customer or order. Targeted deep links go one step further: the link names the workflow the agent needs and takes the agent directly to the relevant page in the Agent Interface.

Workflow in the LinkWhat the Agent Sees
Take a PaymentThe consumer's account page, ready for a one-time payment
Schedule AutopayThe consumer's account page with the Autopay setup window already open
Refund a PaymentThe Partial Refund page for that payment
Cancel a Future PaymentThe Scheduled Payment page for that future-dated payment
Turn Off AutopayThe Recurring Autopay page for that schedule

For example, a borrower calls their lender and asks to set up automatic payments. The agent clicks one button in the lender's own system. A new browser tab opens with the agent signed in to PayNearMe, on that borrower's account, and with the AutoPay setup window already open. No searching, no navigation, and nothing to memorize.

Targeted deep links add optional parameters to the existing /agent_sso API call. Agents do not need any new training and nothing changes for consumers.

Before You Begin

To use targeted deep links, make sure the following are in place:

  1. Agent SSO is set up for your site. Your PayNearMe Technical Account Manager (TAM) must have configured your site and users for Agent SSO Token Authentication. See Using SSO with the API.
  2. You are using a version 3.0+ API key. Agent SSO is not available with earlier versions.
  3. Targeted deep links are enabled for your site. This setting is off by default. Contact your TAM to enable it.
👍

Your Site Decides Which Workflows to Use

Enabling the targeted deep links feature does not force any workflow. Your system chooses which workflow, if any, each link names. A request that does not include deep_link behaves exactly as it did before.

How It Works

  1. Your system sends an /agent_sso request that includes a deep_link value and, for some workflows, a record identifier.
  2. PayNearMe validates the request and returns an sso_url.
  3. Your system opens the sso_url in the agent's browser.
  4. The agent is signed in, lands on the order, and the workflow you named is already open or on screen.

Each link works once for the order specified in the request. If the agent refreshes the page or returns to the link later, they see the normal order page and the workflow does not re-open.

The sso_url in the response already contains everything the Agent Interface needs. Pass it to the agent's browser as returned, and do not rebuild or edit it.

Choosing a Workflow

Set the deep_link parameter to one of the following values. Some workflows also require a record identifier.

deep_link ValueWhere the Agent LandsRequired Identifier
take_paymentThe order page, ready for a one-time paymentNone
schedule_autopayThe order page with the Autopay setup window openNone
refundThe refund form for the paymentpayment_identifier
cancel_future_paymentThe page for the scheduled paymentschedule_identifier
deactivate_autopayThe page for the Autopay scheduleschedule_identifier

Every targeted deep link also requires the order_identifier parameter, because the workflow opens on that order. The order_identifier can be one of the following parameters:

  • pnm_order_identifier
  • site_order_identifier
  • site_customer_identifier
👍

Consumer's with Multiple Accounts

If using the site_customer_identifier with consumers who have more than one order linked to their account, the Agent Interface will display an Accounts List where the agent must select the correct account before the workflow opens.

Additional Parameters

Include these optional parameters, along with the required parameters, when you make an /agent_sso call.

ParameterDescriptionData TypeRequired?
deep_linkThe workflow to open. Supported values include the following:
  • take_payment
  • schedule_autopay
  • refund
  • cancel_future_payment
  • deactivate_autopay
stringO
payment_identifierThe confirmation number (i.e., pnm_payment_identifier) of the payment to refund. Required when deep_link is refund.stringC
schedule_identifierThe pnm_scheduled_payment_identifier of the scheduled payment or Autopay schedule to act on. Required when deep_link is cancel_future_payment or deactivate_autopay.stringC

R = required, O = optional, C = conditionally required.

🚧

Identifier Rules

Identifier values can be up to 64 characters. Do not send payment_identifier or schedule_identifier without a matching deep_link. If the appropriate deep_link value is not included, the API returns an error rather than ignoring the value.

Example Request

The following example creates a link that opens the refund form for a specific payment. The examples use the Sandbox environment. See Request URLs for Production.

curl -X POST https://api.paynearme-sandbox.com/json-api/agent_sso -L \
     -d agent_email=tracey.monroe%2Bamssso%40paynearme.com \
     -d agent_name=Tracey+Monroe \
     -d agent_role=agent \
     -d order_identifier=0000001462-1A431845 \
     -d deep_link=refund \
     -d payment_identifier=PAYMENT_IDENTIFIER \
     -d site_identifier=S5101017669 \
     -d version=3.0 \
     -d timestamp=1679423246 \
     -d signature=SIGNATURE

{
  "status": "ok",
  "token": "4kxcNJa52tsA99HfuQi6oHqiJp4_CP2KxM_aFg0diU8",
  "token_expires": "2023-03-21 11:28:26 -0700",
  "sso_url": "https://pro.paynearme-sandbox.com/single_sign_on/4kxcNJa52tsA99HfuQi6oHqiJp4_CP2KxM_aFg0diU8?RelayState=0000001462-1A431845&deep_link=refund&payment_id=PAYMENT_IDENTIFIER"
}
📘

Example Values

The identifier and signature values above are placeholders. The sso_url shown is illustrative; always use the exact sso_url the API returns.

When a Link Cannot Open the Workflow

PayNearMe is designed so that an agent never reaches an error page because of a deep link. Problems are caught at one of two points.

When You Request the Link

If the workflow details are missing or invalid, the API refuses the request and returns an error that explains why. Examples include:

  • The deep_link value is not recognized.
  • A required identifier is missing or too long.
  • An identifier is sent without a matching deep_link.
  • Targeted deep links are not enabled for your site.
  • For refund and schedule workflows, the order cannot be found for your site.

Because these are hard errors, a broken link is never handed to an agent.

When the Agent Opens the Link

If something changes between the time you create the link and the time the agent opens it, the agent lands on the consumer's Account page where the task can be completed manually. In some cases the agent also sees a short message/alert banner explaining why.

SituationWhat the Agent Sees
The payment or schedule no longer existsThe Account page
The payment is not eligible for a refundThe Account page with an alert banner
The schedule is a different type than the workflow expects (for example, a recurring Autopay schedule for cancel_future_payment)The Account page with an alert banner
The scheduled payment can no longer be canceledThe Account page with an alert banner
The schedule page is not available for your siteThe Account page with an alert banner
Targeted deep links were turned off after the link was createdThe Account page
The link was already used or the sign-on token expiredThe sign-in page with the following message: "Invalid email or password"

Security and Privacy

  • Links are intended for one use and expire quickly. The sign-on token lasts about a minute, so a forwarded or bookmarked link does not keep working.
  • A workflow can only open on the order the link was created for. A link cannot be redirected to a different consumer's order.
  • Refund and schedule pages keep all of their normal permission and eligibility checks. A deep link is a shortcut to a page, never a way around eligibility rules or agent permissions. The agent's role must still allow the action. For example, refunds require the Refund Electronic Payments permission.
  • If targeted deep links are turned off for your site, workflows stop opening immediately and links behave like plain order links.

Frequently Asked Questions

❓Do Agents Need Training?

Do agents need training?
No. The feature removes steps; it does not add any.

❓Does This Change the Consumer Experience?

No. It only changes how agents arrive at pages they could already reach.

❓Can I Use Only Some of the Workflows?

Yes. Your system decides which workflow, if any, each link names.

❓What Happens if the Client Sends a Link for a Customer with Several Accounts?

The agent lands on the account list, picks the right one, and the workflow opens there.

❓Is This Available to All Clients?

Any client whose agents use the Agent Interface and who has Agent SSO set up can request it.

❓How Do I Turn it On?

Contact your PayNearMe TAM. Enabling it is a site setting change, plus confirmation that your system sends the workflow details.

Related Pages


Did this page help you?