post https://api.paynearme-sandbox.com/json-api/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
Security ConsiderationsFor security, PayNearMe recommends setting an expiration time for Smart Tokens.
/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
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.