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_identifiersite_order_identifierpnm_customer_identifiersite_customer_identifiersite_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_debitflow_creditflow_achflow_retailerflow_apple_payflow_google_payflow_paypalflow_venmoflow_pin4flow_push_debitflow_push_achflow_cash_appflow_push_paypalflow_secure_allflow_edit_scheduleflow_tokenizeflow_hide_saved_payment_methods
link_lifetime_secondsshort_order_urlflow_pay_urlflow_no_pay_urlflow_add_urlflow_no_add_urlflow_return_urlflow_expired_urlflow_error_urlflow_venmo_return_urlflow_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=trueext_customer_enrollment_dateext_customer_date_of_birth_piiext_customer_tax_id_piiflow_bank_oauth_redirect_url
For more information on PayNearMe's Guaranteed ACH solution, see the Guaranteed ACH guide.
