Create a transaction on the v2 chain
The crypto you would like to charge the customer with. Currently supports ETH, LTC, and XRP. Put them in lowercase, so ltc, eth, or xrp.
The buyer's tunnel ID (Get this from the buyer) - This constantly rotates randomly every month and every time the buyer completes a transaction. This is to prevent spamming them with emails or transactions. This also lets us give you more controls, since there is less risk of merchants spamming our systems.
The price in USD you would want the buyer to pay. (This gets calculated at the time of creation, NOT at the time of payment). For example, if the price of crypto is 100 dollars at the time of creation, but then drops to 80 dollars at the time of payment, the buyer will be charged 100 dollars worth of crypto, NOT 80 dollars.
At the time of creation, you can add notes, which get passed on to you when the buyer pays through callbacks, or in the database when you access it. The data type can be anything, a string, an array, an object, anything.
The expiry of the transaction in milliseconds elapsed since January 1, 1970. You can easily get this with
Date.now()the default is Date.now() + 1800000
No user transactions will return a crypto deposit address that you can show to the buyer for them to deposit crypto into. When they deposit enough, a callback and SSE hook will be fired and you will be notified.
This is the parameter that lets you adjust the required amount of crypto deposited into the generated wallet. Default is 95% and we suggest lowering this number even more on transactions with low charge, since the buyer can run into un-expected crypto transaction fees. For example, if the charge is 100 ETH and accuracy is set to 95%, then we would mark deposits greater than 95 ETH as PAID.
The USD equivalent of the crypto you would like to charge the buyer.
The data you would like us to send back when the buyer has paid. This can be used to keep track of orders and what to give the buyer.
This tells you how much crypto to charge the customer, and how much crypto the API is expecting to be paid.
Show this to your buyer! Without this, they have no place to put their money! This is the wallet where we check for balance changes, and after the payment is made, the crypto is transfered to your wallet.
This is the Coin-Tunnel transaction ID, and you can use this in the other API methods to get the status on the transaction.