8Pay
  • Introduction
  • Features
  • Chains
  • Payment flow
  • Sandbox Environment
  • Fees
  • Guides
    • Set up single payments
    • Set up recurring payments
    • Setup automatic buy (DCA) on Dex
  • Integrations
    • Overview
    • Short URLs
    • Buttons
      • One Time
      • Fixed Recurring
      • Variable Recurring
      • On Demand
    • Shopify
    • Woocommerce
    • Streaming Donations
    • JavaScript SDK
  • REST API
    • Overview
    • One Time
      • Payments
      • Transfers
      • Short Urls
    • Wallet to wallet
      • Payments
      • Transfers
    • Fixed Recurring
      • Plans
      • Subscriptions
      • Billings
      • Cancellations
      • Short Urls
      • Transfers
      • Webhook
    • Variable Recurring
      • Plans
      • Subscriptions
      • Billings
      • Cancellation Requests
      • Cancellations
      • Webhook
      • Transfers
      • Short Urls
    • On Demand
      • Plans
      • Subscriptions
      • Allowances
      • Billings
      • Cancellations
      • Webhook
      • Transfers
      • Short Urls
    • Scheduled Payments
      • Schedules
      • Executions
      • Cancellation
      • Transfers
    • Invest (DCA)
      • Strategies
      • Executions
      • Cancellation
    • Webhook Notifications
  • Webhook notifications
    • Overview
    • Events
      • One Time
      • Wallet-to-Wallet
      • Fixed Recurring
      • Variable Recurring
      • On Demand
  • Advanced Features
    • Gas Wallet
    • Autobiller
  • Appendix
    • Categories
    • Tokens
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Buttons

One Time

The available parameters are:

  • chain (string) - chain used for the payment

  • description (string) - payment's description

  • receivers (array) - array of beneficiaries

  • amounts (array) - array of amounts to send to the respective receivers

  • token (string) - token symbol

  • category (string) - category of the payment

  • tag (string) - label used for identification or classification (optional)

  • callbackSuccess (string) - redirect url after success (optional)

  • callbackError (string) - redirect url after failure (optional)

  • webhook (string) - url for server-side notification (optional)

  • extra (string) - json object containing extra parameters that will be sent to webhook (optional)

The following data will be appended to the callbackSuccess url as query parameters:

  • user (string) - address of the user who completed the payment

  • transactionHash (string) - hash of the transaction

Example button

<form action="https://checkout.8pay.network/" method="POST">
    <input type="hidden" name="type" value="one_time">
    <input type="hidden" name="chain" value="bsc">
    <input type="hidden" name="description" value="Ebook">
    <input type="hidden" name="token" value="8PAY">
    <input type="hidden" name="receivers[0]" value="0xe42fD8a58A82fDF624A8a94dA03a0e44F9934Dff">
    <input type="hidden" name="receivers[1]" value="0x5B848132d3a0111d4daB7060b6051961013C71c7">
    <input type="hidden" name="amounts[0]" value="5">
    <input type="hidden" name="amounts[1]" value="2">
    <input type="hidden" name="category" value="Shop">
    <input type="hidden" name="tag" value="ebook_859294">
    <input type="hidden" name="extra[banner]" value="BR69">
    <input type="hidden" name="extra[traffic]" value="facebook">
    <input type="hidden" name="callbackSuccess" value="https://www.google.com/">
    <input type="hidden" name="callbackError" value="https://www.google.com/">
    <input type="image" src="https://cdn.8pay.network/img/buttons/pay_in_crypto_blue.png" border="0" name="submit" alt="8PAY">
</form>
PreviousButtonsNextFixed Recurring

Last updated 1 year ago

Was this helpful?