/get_smart_token

A secure_smart_token is a unique string of encrypted data values that authenticate PayNearMe orders within your app or website that is running the Embedded Client. The button used to invoke the PayNearMe JS Library requires a Smart Token to initialize the timed session within the iframe. Smart Tokens can be configured at the Site level to expire after a set amount of time or can remain the same for the duration of the order’s lifetime.

How you generate Smart Tokens will depend on how you configure orders. If consumers will be making payments at the time of order generation, use the /create_order call. If payments will be made after order generation, use the /get_smart_token call to regenerate an expired token for an existing order. A typical implementation uses the /get_smart_token call after creating orders via bulk upload. To regenerate the Smart Token for a specific order, use one of the following values:

  • pnm_order_identifier
  • site_order_identifier
  • pnm_customer_identifier
  • site_customer_identifier
  • site_creator_identifier

Configuring the Smart Link

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 consumer data passed in with the order and will display all payment types configured for the merchant site. To enforce specific flows or define specific redirect URLs, use the /get_smart_token call to customize the behavior of the Smart Link. For more information on configuring an encrypted Smart Link see Customizing the Secure Smart Link. Use the following parameters to put the consumer in a specific payment flow in the Embedded Client:
  • flow_debit
  • flow_credit
  • flow_ach
  • flow_retailer
  • flow_apple_pay
  • flow_google_pay
  • flow_paypal
  • flow_venmo
  • flow_pin4
  • flow_push_debit
  • flow_push_ach
  • flow_cash_app
  • flow_push_paypal
  • flow_secure_all
  • flow_edit_schedule
  • flow_tokenize
  • flow_hide_saved_payment_methods
To enforce a fixed, uneditable payment amount, include the payment_amount parameter along with the payment_field_fixed=true parameter.

To specify an expiration date for the Smart Link or return URLs for specific outcomes that can occur in the Embedded Client (e.g., errors, link expiration, etc.), use the following parameters:
  • link_lifetime_seconds
  • short_order_url
  • flow_pay_url
  • flow_no_pay_url
  • flow_add_url
  • flow_no_add_url
  • flow_return_url
  • flow_expired_url
  • flow_error_url
  • flow_venmo_return_url
  • flow_show_all_ppas

Guaranteed ACH

Gaming Operators on the PayNearMe for iGaming platform can use the /get_smart_token call to initiate Guaranteed ACH transactions using Trustly. To initiate a Guaranteed ACH transaction, include the following parameters along with the other required parameters for /get_smart_token calls:
  • flow_trustly=true
  • ext_customer_enrollment_date
  • ext_customer_date_of_birth_pii
  • ext_customer_tax_id_pii
  • flow_bank_oauth_redirect_url

For more information on PayNearMe's Guaranteed ACH solution, see the Guaranteed ACH guide.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

The unique, PayNearMe-defined identifier for this order

string
required
Defaults to S2411573363

Identifies your client site.

string
required

The Unix Epoch time of the call

string
required
Defaults to 3.0

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

string
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.

boolean

Indicates whether to include a debit card payment flow in the UI.

boolean

Indicates whether to include a credit card payment flow in the UI.

boolean

Indicates whether to include the bank account payment flow in the UI.

boolean

Indicates whether to include the cash payment flow in the UI.

boolean

Indicates whether to include the Apple Pay payment flow in the UI.

boolean

Indicates whether to include the Google Pay payment flow in the UI.

boolean

Indicates whether to include the PayPal payment flow in the UI.

boolean

Indicates whether to include the Venmo payment flow in the UI.

boolean

Indicates whether to include the Pin4 disbursement flow in the UI.

boolean

Indicates whether to include the debit disbursement flow in the UI.

boolean

Indicates whether to include the bank account disbursement flow in the UI.

boolean

Indicates whether to include the Cash App payment flow in the UI.

boolean

Indicates whether to include the PayPal disbursement flow in the UI.

boolean

Indicates whether to display all payment types available for your Merchant site.

string

Enables clients to add a suggested payment amount for the order. Use with payment_field_fixed=true to enforce a fixed amount that cannot be modified.

boolean

When true (with payment_amount), the payment amount is fixed and cannot be changed by the consumer. When false, payment_amount is prefilled in the Payment Amount field of the Consumer Portal or Embedded Client and may be edited.

boolean

Gives the consumer the ability to cancel the Autopay schedule associated with the order.

boolean

Indicates whether to include the tokenize flow in the UI.

boolean

Indicates whether to show all payment methods created for the order, regardless of which browser the consumer used to tokenize the payment methods (i.e., removes cookie restrictions enforced by the different browsers)

boolean

When set to true, this setting hides existing, previously tokenized payment methods for all actions (i.e., pay, withdrawal, tokenize, and auto_pay). When set to false, this setting shows all previously tokenized payment methods for all actions. When unset or nil, the Embedded Client will hide saved payment methods for the tokenize action and show saved payment methods for the pay and withdrawal actions.

integer
string

The URL that displays after a successful payment is made.

string

The URL that displays when no payment is made.

string

The URL that displays after a payment method has been captured, tokenized, and successfully added to a consumer’s account.

string

The URL that displays when a payment type is not captured and tokenized.

string

The URL that displays when the payment or tokenization flow completes.

string

The URL that displays when the consumer attempts to access an expired Smart Link URL.

string

The URL that displays when an error occurs in the payment or tokenization flow.

string

The URL that displays after completing a Venmo payment.

boolean
Defaults to true

If set to true, PayNearMe returns a shortened Order Tracking URL in the response.

boolean

Indicates whether to include a guaranteed ACH payment method via Trustly.

string

Records the date of the consumer's first transaction with the client in YYYY-MM-DD format.

string

Records the consumer's birth date in YYYY-MM-DD format. NOTE: Parameters suffixed with _pii contain personal identifying information (PII). PayNearMe encrypts parameter values containing PII before storing and only returns specific and/or redacted information in the response.

string

Records the consumer’s Social Security Number or other Tax ID. NOTE: Parameters suffixed with _pii contain personal identifying information (PII). PayNearMe encrypts parameter values containing PII before storing and only returns specific and/or redacted information in the response.

string

Indicates the URL where consumers should be redirected to when logging into native bank applications that use OAuth login authorization flows. Rather than having to remember and type in a password in a new browser window, OAuth logins enable consumers to log in via the banking app on their phone using saved passwords or biometric authentication (like FaceID or fingerprints). For the Embedded Client, this link should redirect players back to the “Complete Your Payment Details” screen.

string

Identifies the payment method the client wants to reauthorize for a guaranteed ACH payment. This parameter should only be included when a bank revokes a previously authorized payment method. See the Handling an Expired Bank Authorization for more information.

Response

Language
URL
LoadingLoading…
Response
Choose an example:
application/json