Customizing the Secure Smart Link

Smart Link URLs that use Smart Tokens require SSL-encrypted connections. Smart Tokens contain encoded information from the order, such as player name, address, mobile number, email, DOB, and language preferences (if provided). Smart Tokens can be configured to move players directly into specific deposit or withdrawal flows and to expire after a specified number of seconds. Operators can also encode the Smart Token with customized redirect URLs for scenarios like successful deposits, abandoned deposits, expired Smart Links, errors, etc.

The encrypted Smart Link URL (i.e., secure_smart_link) returned in the /create_order, /find_order, and /get_smart_token API responses contains all the player data passed in with the order and will display all payment types configured for the operator site. To enforce specific flows or define specific redirect URLs, use the /get_smart_token call to customize the behavior of the Smart Link. Use the following parameters to update and configure the Smart Token.

NameDescriptionTypeReq
flow_debitIndicates whether to include a debit card deposit flow in the UI.boolO
flow_creditIndicates whether to include a credit card deposit flow in the UI.boolO
flow_achIndicates whether to include the bank account deposit flow in the UI.boolO
flow_retailerIndicates whether to include the cash deposit flow in the UI.boolO
flow_apple_payIndicates whether to include the Apple Pay deposit flow in the UI.boolO
flow_google_payIndicates whether to include the Google Pay deposit flow in the UI.boolO
flow_paypalIndicates whether to include the PayPal deposit flow in the UI.boolO
flow_venmoIndicates whether to include the Venmo deposit flow in the UI.boolO
flow_pin4Indicates whether to include the Pin4 withdrawal flow in the UI.boolO
flow_push_debitIndicates whether to include the debit withdrawal flow in the UI.boolO
flow_push_achIndicates whether to include the bank account withdrawal flow in the UI.boolO
flow_cash_appIndicates whether to include the Cash App deposit flow in the UIboolO
flow_push_paypalIndicates whether to include the PayPal withdrawal flow in the UI.boolO
flow_secure_allIndicates whether to display all payment types available for your operator site.boolO
flow_edit_scheduleGives the player the ability to cancel the Autopay schedule associated with the order.boolO
flow_tokenizeAllows the player to tokenize a payment method for future deposits.boolO
link_lifetime_secondsDefines the number of seconds the Smart Link (i.e., secure_smart_link) will be active and accessible before expiring. In the event of expiration, the operator will need to regenerate the smart token by making another /get_smart_token call.intO
flow_pay_urlThe URL that displays after a successful deposit is made.stringO
flow_no_pay_urlThe URL that displays when no deposit is made.stringO
flow_add_urlThe URL that displays after a payment method has been captured, tokenized, and successfully added to a player’s account.stringO
flow_no_add_urlThe URL that displays when a payment type is not captured and tokenized.stringO
flow_return_urlThe URL that displays when the deposit or tokenization flow completes.stringO
flow_expired_urlThe URL that displays when the player attempts to access an expired Smart Link URL.stringO
flow_error_urlThe URL that displays when an error occurs in the deposit or tokenization flow.stringO
flow_venmo_return_urlThe URL that displays after completing a Venmo deposit.stringO

Configuring for One Payment Type

To drop a player into a specific deposit flow, perform the /get_smart_token call and specify the flow in the request. This call will respond with a regenerated Smart Token that is encrypted with both the order information and the specified deposit flow.

curl -X POST https:// www.paynearme-sandbox.com/json-api/get_smart_token -L\
  -d flow_ach=true \
  -d flow_pay_url=www.successpayurl.com \ 
  -d site_customer_identifier=987654321 \
  -d site_identifier=S2155373459 \
  -d timestamp=1631051815 \
  -d version=2.0 \
  -d signature=2d4a97a97d06ec3bb4a72ab52ff45bd9
{
  "status": "ok",
  "orders": [
    {
      "pnm_order_identifier": "85089038072",
      "site_order_identifier": "5579365601",
      "secure_smart_token": "SA0tAlfH7jy3g2H4g04lT!Qk61bpU8eOyk6uNfDoKgtVZTJSuICycRWXjqtFjjOi!2EldKvsVjiCWlyMCyg4EuNy5B0aQW3wNwrASmVlNWc=",
      "secure_smart_link": "https://www.paynearme-sandbox.com/ssl/SA0tAlfH7jy3g2H4g04lT!Qk61bpU8eOyk6uNfDoKgtVZTJSuICycRWXjqtFjjOi!2EldKvsVjiCWlyMCyg4EuNy5B0aQW3wNwrASmVlNWc=",
      "order_tracking_url": "https://www.paynearme-sandbox.com/85089038072/ch?pay_url=www.successpayurl.com"
    }
  ]
}

Notice that both the secure_smart_link and the order_tracking_url values are returned with this call. Both URLs will display the same UI; however, the Smart Link URL (i.e., secure_smart_link value) encrypts the order information, deposit flows, and return URLs within the Smart Token, preloads all relevant player data (e.g., name, address, saved payment types, etc.) into the payment form, and—if configured—will expire after a specified number of seconds. The order_tracking_url displays specified payment flow codes and the return URLs in cleartext within the Smart Link URL.

The Smart Link URL returned in the call above was configured to only accept deposits via bank accounts. For new payment types, when the player clicks the link, PayNearMe will display a screen like the following.

If the player has a saved bank account, PayNearMe displays the following screen after the Smart Link is clicked.

Configuring for Multiple Payment Types

Rather than offer players all payment types at once, you can encode the Smart Link to only display your preferred payment types. Use this feature for promotional events or as a method of risk mitigation for specific players who may have too many returns or chargebacks associated with certain payment types. Like the call for the single payment type configuration, this call regenerates the Smart Token to encrypt additional parameters.

curl -X POST https://www.paynearme-sandbox.com/json-api/get_smart_token -L \
  -d flow_google_pay=true \
  -d flow_debit=true \
  -d flow_credit=true \
  -d flow_ach=true \
  -d flow_retailer=true \
  -d flow_pay_url=www.successpayurl.com \ 
  -d pnm_order_identifier=987654321 \
  -d site_identifier=S2155373459 \
  -d timestamp=1631133464 \
  -d version=2.0 \
  -d signature=1d526cce620a78b64da951f110cb011a
{
  "status": "ok",
  "orders": [
    {
      "pnm_order_identifier": "87221295581",
      "secure_smart_token": "edlGTjhOj8jKxNYVpugNJ!Dt7hfImBiL4LyQcaIDR0k9akbJ5FyQPNwf0cQRZhDT$Ho83W4UQC0qyPnPzyh40gQjlm7GGzk41VF7NgyRHcLSR2q2fg2fBg==",
      "secure_smart_link": "https://www.paynearme-sandbox.com/ssl/edlGTjhOj8jKxNYVpugNJ!Dt7hfImBiL4LyQcaIDR0k9akbJ5FyQPNwf0cQRZhDT$Ho83W4UQC0qyPnPzyh40gQjlm7GGzk41VF7NgyRHcLSR2q2fg2fBg==",
      "order_tracking_url": "https://www.paynearme-sandbox.com/87221295581/regp?pay_url=www.successpayurl.com"
    }
  ]
}

When a player clicks the encrypted Smart Link generated above (i.e., the value in the secure_smart_link parameter), the following screen displays.