• Getting Started

Html Checkout

Learn how to collect payments from your customers using CoinForBarter in a HTML file

CoinForBarter Standard in HTML

You can integrate CoinForBarter in a bare HTML file without exposing your private key just the same way you integrate with the Inline method.

Example of how you can implement the HTML:


<form method="POST" action="https://checkout.coinforbarter.com/v1">
    <!-- Account public key -->
    <input type="hidden" name="publicKey" value="xxxxxxxxxxxxxxxxxxxxxxxxxx" />
    <!-- Email of customer to charge -->
    <input type="hidden" name="customer" value="jessepinkman@walterwhite.org" />
    <!-- Customer phone number - optional -->
    <input type="hidden" name="customerPhoneNumber" value="0900192039940" />
    <!-- Customer full name - optional -->
    <input type="hidden" name="customerFullName" value="Jesse Pinkman" />
    <!-- Transaction reference id -->
    <input type="hidden" name="txRef" value="bitethtx-019203" />
    <!-- Amount to charge -->
    <input type="hidden" name="amount" value="3400" />
    <!-- Currency amount was set in -->
    <input type="hidden" name="currency" value="DOGE" />
    <!-- Currencies to accept
      Add more currencies to accept in above format or remove all currencies to accept all -->
    <input type="hidden" name="currencies[]" value="BTC" />
    <input type="hidden" name="currencies[]" value="DOGE" />
    <!-- Object containing other data you want to save on this payment | Optional -->
    <input type="hidden" name="meta[consumer_id]" value="23" />
    <input type="hidden" name="meta[consumer_mac]" value="consumer_mac" />
    <!-- Customize the payment screen - optional -->
    <input type="hidden" name="customizations[title]" value="Miss TryPad" />
    <input type="hidden" name="customizations[description]" value="Buy try pads" />
    <input type="hidden" name="customizations[logo]" value="https://example.example.com/logo.png" />
    <!-- Url to redirect user to after payment ends -->
    <input type="hidden" name="redirectUrl" value="https://example.com/" />
    <!-- Payment plan id to add this user to a payment plan you created - optional -->
    <input type="hidden" name="paymentPlan" value="iuiif34735687443" />
    <button type="submit">CoinForBarter CHECKOUT</button>
</form>
            

This will provide the same experience as our CoinForBarter Standard.

That's because, you can pass the same exact standard payload to the HTML form. All you need to do is convert the objects in the Standard payload to their HTML equivalents.

Join Developers Channel on Slack

Join our developers channel to stay up to date on latest news and features. Find answers to your problems and network with other developers. Join Developers Channel.