Twetch pay is a simple way to accept payments on your website from a number of wallet providers and payment methods.
Currently supported wallets are Money Button, RelayX and Maxthon VBox.
The simplest Twetch Pay usage looks like this:
Including the TwetchPay embed on your makes
twetchPay available on the browser's
window object. It has one asynchronous method,
pay that resolves with
a payment object upon a successful payment and throws if there was an error.
undefined if the payment was canceled.
An array containing a list of output ojects. Each output object may have the following properties:
to: (string) - bitcoin address
amount: (number) - amount of bitcoin (BSV)
script: (string) - valid bitcoin script using ASM format
A string array of available wallets for use in the widget. Options are:
A function that is called after a successful payment
A function that is called when an error occurs during the payment
Additional properties passed into moneybutton.
Additional propeties passed into relayx
Whether to enable debugging logging
Optional. Set application name for some wallets (such as VBox) that need it. Default: 'Twetch Pay'
Optional. Set application logo for some wallets (such as VBox) that need it. Default: 'https://twetch-app.now.sh/static/favi.png'
Optional. Set prodeuct name for some wallets (such as VBox) that need it. Default: 'Purchase'