Merchant Tools

Action: https://tokenpayments.io/api/generate
Method: GET/POST (Both work)

Field Required? Description
merchant_id Your Merchant ID can be found at Account Settings page after login.
amountf The original amount you're charging. It can be decimal like 0.0005 ETH or an integer too.
currency The currency in which the original amount you're charging. Please find the complete list which can be used as the currency below.
item_name It should contain identifiable information about the item/service/product being purchased. Restricted to 128 characters.
item_desc It can further contain more information about the item/service/product being purchased. Restricted to 128 characters.
invoice A string that can be used to identify the order. It's not shown to the user. Restricted to 128 characters.
custom A string that can contain extra information and data about the payment. It's not shown to the user. Restricted to 128 characters.
ipn_url This is where you would like to receive the IPN callback.
success_url This is where you would like to redirect the user to after a successful payment.
cancel_url This is where you would like to redirect the user if they click the cancel button.
email This can be used to prefill the email address on the behalf of the user.


Possible "currency" values: Show Accepted Currencies

<form action="https://tokenpayments.io/api/generate" method="post">
<input type="hidden" name="merchant_id" value="YOUR_MERCHANT_ID_HERE">
<input type="hidden" name="amountf" value="AMOUNT_YOU_WANT_TO_CHARGE">
<input type="hidden" name="currency" value="CURRENCY_YOU_WANT_TO_CHARGE">
<input type="hidden" name="invoice" value="">
<input type="hidden" name="custom" value="">
<input type="hidden" name="item_name" value="ITEM_NAME_HERE">
<input type="hidden" name="item_desc" value="ITEM_DESCRIPTION_HERE">
<input type="hidden" name="ipn_url" value="https://website.com/">
<input type="hidden" name="success_url" value="https://website.com/">
<input type="hidden" name="cancel_url" value="https://website.com/">
<input type="hidden" name="email" value="[email protected]">
<input type="submit" value="Submit Payment">
</form>



Form Parameter Details

This helps you setup a payment form so that you can collect payments.

Check Out

IPN Code Samples

Setup your code to process the response each time a payment is made.

Check Out

WooCommerce Plugin

Power your store with TokenPayments by using our plugin.

Download

PHP Class (For IPN)

Authenticate IPN callbacks easily with our class.

Download